I have an folder with multiple files . i want to select files starting with USA. the flile loop works fine
i tryed to add the parameter instead of USA
but things are not even entering into the loop ...
pls help me
ShanmugaRaj
I have an folder with multiple files . i want to select files starting with USA. the flile loop works fine
i tryed to add the parameter instead of USA
but things are not even entering into the loop ...
pls help me
ShanmugaRaj
Hi,
In SSIS 2005 Pivot Transformation is not giving expected Output.
Input table (Source table) Data:
Month | DaysOfWeek | Expenses |
January | Tuesday | 70 |
January | Thursday | 71 |
January | Friday | 72 |
January | Saturday | 73 |
January | Sunday | 74 |
January | Monday | 75 |
January | Wednesday | 76 |
February | Tuesday | 80 |
February | Thursday | 81 |
February | Friday | 82 |
February | Saturday | 83 |
February | Sunday | 84 |
February | Monday | 85 |
February | Wednesday | 86 |
March | Tuesday | 90 |
March | Thursday | 91 |
March | Friday | 92 |
March | Saturday | 93 |
March | Sunday | 94 |
March | Monday | 95 |
March | Wednesday | 96 |
Expected Output:
Month | Tuesday | Thursday | Friday | Saturday | Sunday | Monday | Wednesday |
January | 70 | 71 | 72 | 73 | 74 | 75 | 76 |
February | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
March | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
Output Generated by SSIS Package:
Month | Tuesday | Thursday | Friday | Saturday | Sunday | Monday | Wednesday |
January | 70 | 71 | 72 | NULL | NULL | NULL | NULL |
February | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
March | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
January | NULL | NULL | NULL | 73 | 74 | 75 | 76 |
Here January is coming as 2 rows?
PIVOT Transformation Configuration:
Input Columns:
Monthà1 (PivotUsage),LineageID=3241
DaysOfWeekà2 (PivotUsage),LineageID=3244
Expensesà3 (PivotUsage),LineageID=3247
Output Columns:
P_Monthà Configured SourceColumn =(LineageID=3241) & PivotKeyValue= (Blank)
P_Tuesdayà Configured SourceColumn =(LineageID=3247) & PivotKeyValue= (Tuesday). This is nothing but Value of columnDaysOfWeek
P_Thursdayà Configured SourceColumn =(LineageID=3247) & PivotKeyValue= (Thursday). This is nothing but Value of column DaysOfWeek
P_Fridayà Configured SourceColumn =(LineageID=3247) & PivotKeyValue= (Friday). This is nothing but Value of columnDaysOfWeek
P_Saturdayà Configured SourceColumn =(LineageID=3247) & PivotKeyValue= (Saturday). This is nothing but Value of columnDaysOfWeek
P_Sundayà Configured SourceColumn =(LineageID=3247) & PivotKeyValue= (Sunday). This is nothing but Value of columnDaysOfWeek
P_Mondayà Configured SourceColumn =(LineageID=3247) & PivotKeyValue= (Monday). This is nothing but Value of columnDaysOfWeek
P_Wednesdayà Configured SourceColumn =(LineageID=3247) & PivotKeyValue= (Wednesday). This is nothing but Value of columnDaysOfWeek
Source Table:
GO
/****** Object: Table [TEST].[PIVOT_THIS_SOURCE] Script Date: 12/02/2012 13:54:58 ******/
SETANSI_NULLSON
GO
SETQUOTED_IDENTIFIERON
GO
SETANSI_PADDINGON
GO
CREATETABLE [TEST].[PIVOT_THIS_SOURCE](
[Month] [varchar](15)NULL,
[DayOfWeek] [varchar](15)NULL,
[Expenses] [int] NULL
)ON [PRIMARY]
GO
SETANSI_PADDINGOFF
Target Table:
GO
/****** Object: Table [TEST].[PIVOTED_OUTPUT] Script Date: 12/02/2012 13:56:14 ******/
SETANSI_NULLSON
GO
SETQUOTED_IDENTIFIERON
GO
SETANSI_PADDINGON
GO
CREATETABLE [TEST].[PIVOTED_OUTPUT](
[Month] [varchar](15)NULL,
[Sunday] [varchar](15)NULL,
[Monday] [varchar](15)NULL,
[Tuesday] [varchar](15)NULL,
[Wednesday] [varchar](15)NULL,
[Thursday] [varchar](15)NULL,
[Friday] [varchar](15)NULL,
[Saturday] [varchar](15)NULL
)ON [PRIMARY]
GO
SETANSI_PADDINGOFF
Insert data Into source:
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('January','Tuesday',70)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('January','Thursday',71)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('January','Friday',72)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('February','Tuesday',80)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('February','Thursday',81)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('February','Friday',82)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('February','Saturday',83)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('February','Sunday',84)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('February','Monday',85)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('February','Wednesday',86)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('March','Tuesday',90)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('March','Thursday',91)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('March','Friday',92)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('March','Saturday',93)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('March','Sunday',94)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('March','Monday',95)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('March','Wednesday',96)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('January','Saturday',73)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('January','Sunday',74)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('January','Monday',75)
INSERT INTO TEST.PIVOT_THIS_SOURCE VALUES('January','Wednesday',76)
Please anyone can correct if I am not doing it in correct way. Why it is not giving expected output?
http://www.rad.pasfu.com/index.php?/archives/14-PIVOT-Transformation-SSIS-Complete-Tutorial.html
http://www.bimonkey.com/2009/06/the-pivot-transformation/
http://www.codeproject.com/Articles/193842/Working-with-Pivot-and-UnPivot-Transformation
http://sujeev.wordpress.com/2011/05/16/pivoting-data-using-t-sql-and-ssis-pivot-transformation/
http://dinesql.blogspot.com.au/2011/08/pivot-and-unpivot-integration-services.html
Thanks Shiven:) If Answer is Helpful, Please Vote
hi.
i need to count how many slicer (dimantions) i have on axis x?
here's the link: http://msdn.microsoft.com/en-us/library/cc313017.aspx
does anyone know how i can obtain more information about the technical and functional specs? i don't have MS partner affiliation, so i can't participate in the ISV Advisory Service.
thanks in advance!
Hi there:
I am trying to connect to the integration service on our server but it keeps giving the error msg "Access denied". Our DBA has already added me into the DCom users group by following this article ( http://technet.microsoft.com/en-us/library/aa337083.aspx ) but still no luck . Do I need to be the local admin of the server on which IS is running?
thanks
Hui
Hello Friends
I'm looking for the number of ways how can we schedule a SSIS Package..
Latestlly i know two
1.SQL AGENT
2.TaskScheduler Using Batch file.
kindly share your knowledge friends
.
Hi,
From DEV we tried to deploy solution to TEST.
I did modify the config file with the TEST SQL SERVER name and installed the package to the default file system deployment location.
Then i tried to deploy the solution from Package Execution Utility.
when i verified the Server name..it was not holding that of the TEst server's name.instead was holding the DEV server's name.
We don't understand why that happened..
Could anyone please let me know what might have happened ??
Thanks!
--------------------------- Radhai Krish | Golden Age is no more far | --------------------------
Hi All,
I am getting below error when the job is running in sql server agent ,Could any one suggest how to resolve this error:
Executed as user: THINK\s_PRD_SQL_ALL. Processed 0 pages for database 'ACHProcess', file
'ACHProcess_Log' on file 1. [SQLSTATE 01000] (Message 4035) BACKUP LOG successfully processed 0 pages
in 0.142 seconds (0.000 MB/sec). [SQLSTATE 01000] (Message 3014) Processed 6 pages
for database 'Application', file 'Application_log' on file 1. [SQLSTATE 01000]
(Message 4035) BACKUP LOG successfully processed 6 pages in 0.133 seconds (0.334 MB/sec).
[SQLSTATE 01000] (Message 3014) Skipping transaction log backup of ASPState [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of CentralServices [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of CLVerify [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of Collect2000 [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of Collections [SQLSTATE 01000]
(Message 0) Processed 0 pages for database 'Config', file 'Config_log' on file 1. [SQLSTATE 01000]
(Message 4035) BACKUP LOG successfully processed 0 pages in 0.112 seconds (0.000 MB/sec). [SQLSTATE 01000]
(Message 3014) Skipping transaction log backup of DBAdmin [SQLSTATE 01000]
(Message 0) Processed 3662 pages for database 'DE3', file 'DE3_log' on file 1. [SQLSTATE 01000]
(Message 4035) BACKUP LOG successfully processed 3662 pages in 0.447 seconds (63.991 MB/sec). [SQLSTATE 01000]
(Message 3014) Processed 0 pages for database 'DebtSales', file 'DebtSales_Log' on file 1. [SQLSTATE 01000]
(Message 4035) BACKUP LOG successfully processed 0 pages in 0.099 seconds (0.000 MB/sec). [SQLSTATE 01000]
(Message 3014) Processed 0 pages for database 'DecisionEngine', file 'DecisionEngine_Repl_log' on file 1. [SQLSTATE 01000]
(Message 4035) BACKUP LOG successfully processed 0 pages in 0.076 seconds (0.000 MB/sec). [SQLSTATE 01000]
(Message 3014) Processed 0 pages for database 'DecisionSupport', file 'DecisionSupport_log' on file 1. [SQLSTATE 01000]
(Message 4035) BACKUP LOG successfully processed 0 pages in 0.067 seconds (0.000 MB/sec). [SQLSTATE 01000]
(Message 3014) Skipping transaction log backup of DEDATA [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of DEDataDev [SQLSTATE 01000]
(Message 0) Processed 0 pages for database 'Dialer', file 'Dialer_log' on file 1. [SQLSTATE 01000]
(Message 4035) BACKUP LOG successfully processed 0 pages in 0.091 seconds (0.000 MB/sec). [SQLSTATE 01000]
(Message 3014) Skipping transaction log backup of DW [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of DW_Select [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of DW_ThinkCash [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of DW_ThinkCashMS [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of DWO_Live [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of DWOK_Live [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of Email [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of EnterpriseWarehouse [SQLSTATE 01000]
(Message 0) Processed 176 pages for database 'ExceptionLogging', file 'ExceptionLogging_log' on file 1. [SQLSTATE 01000]
(Message 4035) BACKUP LOG successfully processed 176 pages in 0.183 seconds (7.494 MB/sec). [SQLSTATE 01000]
(Message 3014) Skipping transaction log backup of I3_Custom [SQLSTATE 01000]
(Message 0) Skipping transaction log backup of I3_IC [SQLSTATE 01000]
(Message 0) Processed 0 pages for database 'Intranet', file 'Intranet_log' on file 1. [SQLSTATE 01000]
(Message 4035) BACKUP LOG successfully processed 0 pages in 0.015 seconds (0.000 MB/sec). [SQLSTATE 01000]
(Message 3014) Processed 0 pages for database 'LeadGen', file 'LeadGen_log' on file 1. [SQLSTATE 01000]
(Message 4035) The backup or restore was aborted. [SQLSTATE 42000] (Error 3204) BACKUP LOG is terminating abnormally. [SQLSTATE 42000]
(Error 3013) BACKUP LOG successfully processed 0 pages in 0.041 seconds (0.000 MB/sec). [SQLSTATE 01000]
(Error 3014). The step failed.
sudha
Hi All,
While extracting data from an excel sheet to a table column i am getting an error as below.
[OLE DB Source [228]] Error: There was an error with output column "Acquisition Details" (1222) on output "OLE DB Source Output" (238). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".
My table column's data type is [nvarchar](max) NULL.
I think my source data is big enough not to fit in the table column.I don't have permission to change the data type of the particular column.
Any suggestion/solution/work around will be highly appreciable.
Thanks in advance.
sarat chandra sahoo
Hi All,
Need C# code in SSIS Sript task which should refresh all excel data which extracts from a table using Microsoft query.
Can anyone help at all ?
Thanks
Sri.Tummala
Hi guys
All the SSIS packages in my project are deployed in sql server ,msdb DB. (server1)
I wanna migrate all the packages to a new server(server2).Can I just take the backup of msdb of server 1 and restore it in msdb of server2.
Will this work or else what would be the way to migrate the packages.
Please help me out..All the help is appreciated
Regards..
Praveen..
When I open the deployment manifest file in order to deploy I get the following message:
Does anyone know what is the problem?
I could not find the exact details on how to create a SSIS script that would ftp files on these forums, so I am adding my code to help save time for anyone else that might be wanting to do something similar. Here is the VB code for my script task to FTP files (hope this helps someone):
' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.
Imports
SystemImports
System.DataImports
System.MathImports
Microsoft.SqlServer.Dts.RuntimePublic
Class ScriptMainPublicSub Main()Try'Create the connection to the ftp serverDim cm As ConnectionManager = Dts.Connections.Add("FTP")'Set the properties like username & passwordcm.Properties(
"ServerName").SetValue(cm, "Enter your Server Name here")cm.Properties(
"ServerUserName").SetValue(cm, "Enter your FTP User Name here")cm.Properties(
"ServerPassword").SetValue(cm, "Enter your FTP Password here")cm.Properties(
"ServerPort").SetValue(cm, "21")cm.Properties(
"Timeout").SetValue(cm, "0") 'The 0 setting will make it not timeoutcm.Properties(
"ChunkSize").SetValue(cm, "1000") '1000 kbcm.Properties(
"Retries").SetValue(cm, "1")'create the FTP object that sends the files and pass it the connection created above.Dim ftp As FtpClientConnection = New FtpClientConnection(cm.AcquireConnection(Nothing))'Connects to the ftp serverftp.Connect()
'Build a array of all the file names that is going to be FTP'ed (in this case only one file)Dim files(0) AsStringfiles(0) =
"Drive:\FullPath\YourFileName"'ftp the file 'Note: I had a hard time finding the remote path directory. I found it by mistake by creating both the FTP connection and task in the SSIS package and it defaulted the remote path setting in the FTP task.ftp.SendFiles(files,
"/Enter Your Remote Path", True, False) ' the True makes it overwrite existing file and False is saying that it is not transferring ASCIIftp.Close()
Catch ex As ExceptionDts.TaskResult = Dts.Results.Failure
EndTryDts.TaskResult = Dts.Results.Success
EndSub
End
Class* Created an SSIS package that includes certain maintenance tasks on a database tables and indexes using BIDs.
* Copied both the resulting package and manifest files from the bin\Deployment directory to the SQL server machine
* Executed the manifest file, so the package deployment wizard started, I selected the server, authentication type and the maintenance plan as the destination for the SSIS package... The package deployed successfully with no errors
* I connected to SSMS to Integration Services and checked that indeed the package was created inside the Stored Packages > MSDB > Maintenance Plans
* I executed the package and it did execute successfully
Now,
* I connected to SSMS to the Database Engine, then navigated to Management > Maintenance Plans, expecting to find the package there so as to set up a schedule for it... But to my surprise it was not there !!!
Shouldn't the deployed package be also seen inside Management > Maintenance Plans !!
Have I missed anything here...?
Please advise
[Note: I am using Visual Studio 2008 and SQL Server 2008 R2]
Luai7
Hi all ,
I have a console application previously created in .net version 2.0 and has a refrence to Microsoft.SQLServer.ManagedDTS.
This refrence is from folder /ProgramFile (X86)/90/Assembles (do not remember exact path.)
My machine has SQL 2005 and SQL 2008 installed along with SSIS component . VS 2010 ultimate edition is installed for Dot net .
Following things happen when I open console application in 2010 keeping version as 2.0.
1) When classes in console application laoded for first time , class has proper refrence to Dts.Runtime.Package namespace and it is referring Microsoft.SQLServer.ManagedDTS dll in 90 folder.
2) But once solution is compiled , appliaction gives an error saying "Dts.Runtime.Package" does not exist .
3) If I change solution version to 4.0 , it compiles properely .
I am trying to resolve this issue . Strange thing is DLL is properely in place .
Any help will be really appreciated .
Thanks
Siddhesh
Siddhesh Sawant
I have scenario where i have 20000 thousand records where i have more than 5000 (not sure about the exact count approximate count)bad records. Never come across such a scenario. Is there a way of segregating bad data with good data using SSIS.
Please let me what should be my approach
Smash126
Scenario
A database server with one job that executes Data Loading package stored on a shared local drive. When this job is executed on the server everything works fine.
There's another server with more memory also being used to test performance. When the package (that is stored on the shared drive) is executed from this location the Errors below are being recorded in my Error Log table. The package still points to the same db and the table in question is there. I think it's some sort of permissions issue but need confirmation so I can provide the client. I'm simply writing data to a staging table for later use.
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x8007000E.Hi
How to copy data from excel file to xlsm in ssis 2005
Hi,
I am new to SSIS.I am using VS2008 and SQL server 2008 R2.I created a small pacakage where there is only one script task.The scrpit task will instatiate a class variable.Theclass is available in a DLL .The problem is that in script editor I added the reference of DLL which i have created ,and in Main() method of ScriptMain.cs i am trying to create an instance of the class avaialble in that DLL.It was very straight forward.I compiled the project.And i started running the package.I got the below error
Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'MyClass, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
or one of its dependencies. The system cannot find the file specified.
File name: 'MyClass, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at ST_c018fc39d61c45bb8d4d9d3195c73f16.csproj.ScriptMain.Main()
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
Running under executable d:\Program Files\Microsoft SQL Server\100\DTS\binn\DtsDebugHost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = ABCD
LOG: DisplayName = MyClass, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///d:/Program Files/Microsoft SQL Server/100/DTS/binn/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: d:\Program Files\Microsoft SQL Server\100\DTS\binn\DtsDebugHost.exe.Config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///d:/Program Files/Microsoft SQL Server/100/DTS/binn/MyClass.DLL.
LOG: Attempting download of new URL file:///d:/Program Files/Microsoft SQL Server/100/DTS/binn/MyClass/MyClass.DLL.
LOG: Attempting download of new URL file:///d:/Program Files/Microsoft SQL Server/100/DTS/binn/MyClass.EXE.
LOG: Attempting download of new URL file:///d:/Program Files/Microsoft SQL Server/100/DTS/binn/MyClass/MyClass.EXE.
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript().
1.I have tried copying the DLL in to GAC.
2.Copied the dll in to VS installed location from where devenv.exe runs. Stiil the issue persits.Please help.
I have attached the screen shots:
Myclass
Hi,
I'm trying to pass a Date as a parameter from SQL Server Job Agent (2008 R2) to an ETL.
/SET "\Package.Variables[pPeriodoDesde].Value";"01/10/2012"
And when I try to execute it, I get the error:
DTExec: Could not set \Package.Variables[pPeriodoDesde].Value value to '01/10/2012'.
The variable in the ETL is a Date Time and package scope is set. I already tried to set the value without "" ( /SET "\Package.Variables[pPeriodoDesde].Value";01/10/2012) but I get the same error.
Any ideas?
Thank you!