Type | Description |
| XML configuration file | An XML file contains the configurations. The XML file can include multiple configurations. |
| Environment variable | An environment variable contains the configuration. |
| Registry entry | A registry entry contains the configuration. |
| Parent package variable | A variable in the package contains the configuration. This configuration type is typically used to update properties in child packages. |
| SQL Server table | A table in a SQL Server database contains the configuration. The table can include multiple configurations. |
Monday, November 29, 2010
IS - Package Configurations
Tuesday, November 23, 2010
IS - Regular Expressions Reference
http://msdn.microsoft.com/en-us/library/ms141827.aspx
Thursday, November 11, 2010
IS - Connection Strings
http://www.mssqltips.com/tip.asp?tip=1405
http://technet.microsoft.com/en-us/library/ee692867.aspx
http://technet.microsoft.com/en-us/library/ee332540.aspx
http://p-sql.spaces.live.com/Blog/cns!CADFA1CB6D2C0E32!349.entry?sa=669353575
Excel Connection String:Microsoft Jet OLE DB 4.0
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\FlatFiles\FlatFile.xls;Extended Properties="EXCEL 8.0;HDR=YES;IMEX=1";
http://support.microsoft.com/kb/194124
Excel 2007:
http://msdn.microsoft.com/en-us/library/bb385832.aspx
Monday, November 8, 2010
TSQL - IDENTITY Property
1) SQL Server allows only ONE identity column per table.
Ex:
Create Table #Identity_Post (RankNumber int identity(1,1),
First_Name varchar(40))
2) Identity(seed,increment)
Ex: identity(1,1) means starting number is 1 and it will add 1 to next number
identity(1000,5) means starting number is 1000 and it will add 5 to next number
3) SET IDENTITY_INSERT [Table_Name] [ON/OFF]
This property is one very usefull, When we want to insert a deleted rowid (identity number) again in the table we can use this property.
Ex:
CREATE TABLE #TempTable (Rowid int IDENTITY(1,1), Name nvarchar(20))
INSERT INTO #TempTable (Name) VALUES ('BiSpecialist')
INSERT INTO #TempTable (Name) VALUES ('BwSpecialist')
INSERT INTO #TempTable (Name) VALUES ('IsSpecialist')
INSERT INTO #TempTable (Name) VALUES ('RsSpecialist')
4) DBCC CHECKIDENT (Database Console Command)
http://msdn.microsoft.com/en-us/library/aa258817(v=sql.80).aspx
DBCC CHECKIDENT
( table_name
[, { NORESEED | { RESEED [, new_reseed_value ] } } ]
) [ WITH NO_INFOMSGS ]
Arguments:
| Argument | Description |
| table_name | Is the name of the table for which to check the current identity value. The table specified must contain an identity column. Table names must comply with the rules for identifiers. |
| NORESEED | Specifies that the current identity value should not be changed. |
| RESEED | Specifies that the current identity value should be changed. |
| new_reseed_value | Is the new value to use as the current value of the identity column. |
| WITH NO_INFOMSGS | Suppresses all informational messages. |
Parameter Specifications:
| DBCC CHECKIDENT statement | Identity correction(s) made |
| DBCC CHECKIDENT ('table_name', NORESEED) | The current identity value is not reset. DBCC CHECKIDENT returns a report indicating the current identity value and what it should be. |
| DBCC CHECKIDENT ('table_name') | If the current identity value for a table is lower than the maximum identity value stored in the column, it is reset using the maximum value in the identity column. |
| DBCC CHECKIDENT ('table_name', RESEED,new_reseed_value) | Current identity value is set to the new_reseed_value. If no rows have been inserted into the table since the table was created, or if all rows have been removed by using the TRUNCATE TABLE statement, the first row inserted after you run DBCC CHECKIDENT uses new_reseed_value as the identity. Otherwise, the next row inserted uses new_reseed_value + the current increment value. |
Exceptions: The following table lists conditions when DBCC CHECKIDENT does not automatically reset the current identity value and provides methods for resetting the value.
| Conditions | Reset Methods |
| The current identity value is larger than the maximum value in the table. | Execute DBCC CHECKIDENT (table_name, NORESEED) to determine the current maximum value in the column, and then specify that value as the new_reseed_value in a DBCC CHECKIDENT (table_name, RESEED, new_reseed_value) command. (or) Execute DBCC CHECKIDENT (table_name, RESEED, new_reseed_value) with new_reseed_value set to a very low value, and then run DBCC CHECKIDENT (table_name, RESEED) to correct the value. |
| All rows are deleted from the table. | Execute DBCC CHECKIDENT (table_name, RESEED, new_reseed_value) with new_reseed_value set to the desired starting value. |
Sunday, November 7, 2010
Friday, November 5, 2010
IS - ScriptTask - Protective Excel
--> Source DB: Adventureworks database
--> Table that i would like to split in to multiple ExcelSeets:
--> Create multiple Excel sheets bassed on distinct Item. ex: File name will be like : Item_20101105.xls
Option Strict Off
Option Explicit On
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Public Class ScriptMain
Public Sub Main()