Quantcast
Channel: SQL Server Integration Services forum
Viewing all 24688 articles
Browse latest View live

SSIS SMO Connection Timeout

$
0
0

Hi,

I am using SSIS 2008. I have few jobs in sysjobs table. I want to transfer some of the jobs to some other DB (sysjobs table). I am using the "Transfer Job Task".

As my server is present in a remote location, the connection is getting timeout in 15 sec. Even if I am trying to test the SMO connection.

Can you help me in setting the connection time out to 120. Either by any connection string or by setting any property in the SMO connection manager.

Also is there any other way to transfer some of the jobs present in the sys jobs table to another table using SSIS.

Thanks

Mithilesh


FileSysTask Delay Validation doesn't prevent connection validation error

$
0
0

Hi,

I have a file system task which moves (renames) a file to another directory.  I've set delay validation to true on the file sys tasks.  The problem is that the directory doesn't exist at the time of validation.  Another file sys task in the same package creates the dir prior to the rename task.  The package runs fine but the validation raises errors so the result is failure.

If I understand correctly, it seems delay vaildation property does not stop the aquireconnection from happening during validation phase.  Is that right?  How do I get rid of these errors and result in success?

Error: 2010-12-17 03:33:01.66
   Code: 0xC001000E
   Source: ControlFlowPackage
   Description: The connection "C:\P1\FAIL" is not found. This error is thrown by Connections collection when the specific connection element is not found.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started:  3:33:00 AM
Finished: 3:54:22 AM
Elapsed:  1282.36 seconds

TIA,

Josh

How to Zip the files in a folder using SSIS package

$
0
0
I need to create a package to zip all the files in the folder and have to FTP the Zip file to vendor. Please help me how can I do this in SSIS?

SSIS - True Lovers

$
0
0

Hello Experts,

I have one text file which content the following detail

Col1        | Col2|    Col3|     Col4|     Col5   --> with | delimiter
0000005|  01|          1|        OBG|    OBG
0000005|  01          |2|        GP|      GP
0000106|  01|          1|        IM|       IM
0000107|  01|1|GM|GM
0000107|  01|1|SN|SN
0000107|  01|1|FM|FM
0000108|  01|1|GP|GP
0000108|  01|2|GS|GS
0000109|  01|1|FM|FM
0000111|  01|1|P|P

0000112|  01|1|D|D

So here I want the output same as  col1, Col2, Col3, But I have to Merge the Col4 Rows by delimiter ,which Highlighted mention below. 
Col1        | Col2    |Col3|     Col4
0000005|     01|       1|     OBG,GP
0000106|     01|       1|      IM
0000107|  01|1|GM,SN,FM
0000108|  01|1|GP
0000109|  01|1|FM
0000111|  01|1|P

0000112|  01|1|D

Please Explain your answares briefly...I am the new to SSIS.

Appreciated your Help.

Multiple SSIS Packages need Access table to "compact and repair"

$
0
0

I am moving multple SSIS packages over to a new server, most of them write out to an Access Database. All of the packafes currently have a script task to 'compact and repair' but I am looking for a way to compact and and repair all databases on the server in one step.

I was wondering if there is way to automate this process without too much scripting, or if there is a simpler method than the script task?

If I go into Access setting and set 'compact on close' will that do the same as the compact and repair script task when the package runs?

how to pass variable from one package to another

$
0
0

hello everone,

i am creating package  name "package 1"  where i am using Execute SQL task Component

and in this package i am defining variable name result  its data type is object

and in it i am executing query "Select id from test"  storing this result in above variable  "result" after this i am using

execute package task componet from which i will call my second project name "Package 2"

in package 2 i am using Execute SQl task component and in it i am executing query "select name ,age from test where id=?"

now i want that id should come from my package 1 but i am not getting how to do it is it possible in SSIS

Kindly provide some link or solution for this kind of problem.

iSeries Bad Characters cannot translate with IBMDASQL in SSIS

$
0
0

I am using the IBMDASQL driver in SSIS to transfer from iSeries to SQL Server 2012. But the application programmers have some bad habits that mean character fields sometimes contain X'00' and X'FF' usually at the end of the meaningful data. I was hoping I could somehow use a translate table, but the nearest I get is the "Force Translate". I set this to zero (use the iSeries specific code page (is it code page?)) but that did not fix the problem.

Any ideas would be most welcome.

Thanks in advance,
Frank

SSIS Dynamic Flat File Destination Connection.

$
0
0

I have to select data from a table’s and dump it into flat files, the flat file structures are of two types

Detail---10 columns

Summary---3 columns

SELECT * FROM TABLE 1_DETAIL               -- FLATFILE_1_DETAIL   

SELECT * FROM TABLE 1_SUMMARY       -- FLATFILE_1_SUMMARY

SELECT * FROM TABLE 2_DETAIL               -- FLATFILE_2_DETAIL

SELECT * FROM TABLE 2_SUMMARY       -- FLATFILE_2_SUMMARY

SELECT * FROM TABLE 3_DETAIL               -- FLATFILE_3_DETAIL

SELECT * FROM TABLE 3_SUMMARY       -- FLATFILE_3_SUMMARY

All the above flat files are in the same folder. The metadata remain the same i.e., the same files will be re-written each time the package is executed as the table data changes. The above scenario is only for one legacy, and I have three legacies that is total of 18 files and as of now I am giving 18 flat file connections but instead I wanted to know if we can just have one connection manager and make the connections dynamic.

My idea is to have a table as follows:

ID             Column A                                                   Column B

1                      SELECT * FROM TABLE 1_DETAIL                             FLATFILE_1_DETAIL   

2                      SELECT * FROM TABLE 1_SUMMARY                         FLATFILE_1_SUMMARY

And so on as above...

The OleDB Connection has to pick from Column A (Where ID=1) and the Flat File Connection has to pick up from Column B (Where ID=1). Using the Foreach Loop the connections should be looped over to other ID’s.

I have tried a lot but am missing some logic probably in the result sets and expressions, can somebody help me with this.




Bharat Yendluri


Capture the Process tab detail in the text file in SSIS

$
0
0
Hello,
 
In my project I have to fetch the progress tab/ Execution result tab detail into text file.I could not use tablea for the logging.
 
Can anyone tell how i can do this? please explain me briefly? I am new to SSIS.
please giveme your suggestion.

Cross Apply - DateRollup With Acceptable Gap

$
0
0

Hi,

I am pulling  data  From OLEDB Source

MemID      Indicator     EffectDate      EndDate
1                 y              20100401      20100801
1                 y              20110129       20120506
2                 y             20100606        20111231
2                 y             20120101        20120601


If the MemID  is same  and Indicator is same then it should look for dates .

See the MemID 2 ,  Enddate is 20111231 AND again  started in 20120101 SO there in no gap in  ENDDATE AND  EFFECTDATE
Then the record Detination should come LIKE   

  • MemID      RiskInd     EffectDate      EndDate
    1                 y              20100401      20100801
    1                 y              20110129       20120506
    2                  y              20100606       20120601

I should do this in ssis , Between Source and Destination components

Thanks,




SSIS Transaction

$
0
0

I am just started working on SSIS. I created one package and want to impliment the transactions.

 

The purpose of the package is to truncate the destination table and insert the records into destination table from flat file

 

i taken execute sql task to truncate the table and dataflow task to insert the records into destination table.

 

at the package level i given transaction option as required and isolation level is readcommitted.

 

when i run the package my execution stops at dataflow task and it is always yellow.

 

If i am using delete statement instead of truncate than it is working fine.

 

is truncate table creating any problem? I need to use truncate.

 

please suggest me how to impliment transaction using truncate and dataflow task.

 

 

 

 

 

data import from a text file into a SQL 2008 database

$
0
0

Here is the error I get

- Copying to [dbo].[Customers] (Error)
    Messages
    * Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "The statement has been terminated.".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "Violation of PRIMARY KEY constraint 'aaaaaCustomers_PK'. Cannot insert duplicate key in object 'dbo.Customers'.".
     (SQL Server Import and Export Wizard)
    
    * Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "Destination Input" (35)" failed because error code 0xC020907B occurred, and the error row disposition on "input "Destination Input" (35)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
     (SQL Server Import and Export Wizard)
    
    * Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Destination - Customers" (22) failed with error code 0xC0209029 while processing input "Destination Input" (35). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.
     (SQL Server Import and Export Wizard)
    
My Server is Windows 2008 R2


Jeffrey Phelps

SSIS Package fails with Execute Process Task when run from SQL Agent Job

$
0
0

I have an SSIS 2008 package running on Win 2008 64-bit server. The package has an Execute Process Task that runs a net use command using cmd.exe to make a connection.

This runs successfully when tested from the command prompt and runs successfully when the package is run in Visual Studio 2008. However, when the package is called from a SQLAgent job the package fails with the error (actual servernames and passwords removed):

Failing Task Name = EPT Connect mapped drive Error Code = -1073573551 Error Detail = In Executing "C:\WINNT\system32\cmd.exe" "/C net use
\\servername\foldername /USER:userid password" at "", The process exit code was "1" while the expected was "0".

I have determined that a successfull connection should provide a exit code of 0.

The job runs under a proxy account but as explained when the package has run from within VS 2008 it was also tested to run under the proxy account and is successful.

It is not a 64-bit issue as I have tested it by running the package using the 32-bit version of dtexec.exe and the same problem occurs.

Also I have found that by running a simple command process within the Execute Process Task such as dir *.* it is successful when run from the job indicating that it is in fact something related to the net use command itself when run from inside a job.

I have run out of ideas to pursue this - would appreciate anyone's help ?

 

insert records into dynamically get table using ssis

$
0
0

I have list of tables in excel. Using this list I want to insert records from source database to destination database with the same tablename.

I tried Excel Source to load into Recordset destination. Using DataViewer, the data is apssing correctly. Then After Recordset destination, I have Foreach loop to insert records for each table from source table to destination table (same table name) and different location (from source datbase to destination database). Within Foreach loop, I have Execute SQL task which has a dynamic

Sql Statement:

insert into [dbo].[@tablename]
 select * from [efi_dot_com].[dbo].[@tablename]

Resultset: Single row

ConnectionType: OLE DB

SQLSourceType: Direct input

Get an error

[Execute SQL Task] Error: Executing the query "insert into [dbo].[@tablename]
 select * from [ef..." failed with the following error: "Invalid object name 'efi_dot_com.dbo.@tablename'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

I created a variable Tablename with object type.

I have not created a variable to hold sql statement. Do I need it? If so woudl you please explain to me?

Help - SQL 2012 SSIS Toolbox is empty

$
0
0

I see many options to make the toolbox work, like 1) right clicking and clicking refresh (can't do that because there is no refresh option in the dropdown on the right click), 2) reset the toolbox, remove the .tdb's from the appdata... etc folder, go to the registry and clean out the toolbox cache keys from the HKCU... (that didn't work).   I was thinking that maybe when SQL 2012 was released, all the old "fixes" vanished to be replaced by a new "fix".

I'm curious as to what the fix is.  I have WPF, COM, Silverlight, .Net Framework, Activities and Workflow, but at this point, I need a way to convert ntext to text to save data to a flat text file.   VS_ISBROKEN.  I made several attempts to take my concatenated field (two fields separated by a comma and used as a single field and delimited with a pipe) and import it as DT_TEXT but no matter how much I jump around and cuss, the file still thinks it is DT_NTEXT so I decided maybe I should just add a conversion.  So I clicked the toolbox and (I think I remember it also did this when SQL 2008 SSIS came out - but can't remember how I fixed it back then) BINGO, Toolbox is empty.

What sort of choices do I have here to make this work? 


R, J



Loading Excel Files Placed on a Sql Server Filetable Share

$
0
0

I am attempting to create an excel data source for a file that is located on a Sql Server Filetable network share. When setting up the source, I receive a very nondescript error.  If the file is placed on a system drive, there is no issue and the Excel application itself has no issue opening the file from the Filetable share.  Attempting to diagnose the problem, I created a console app that attempts to load the workboook via the Jet driver. The error information is:

The Microsoft Jet database engine cannot open the file ''.  It is already opened exclusively by another user, or you need permission to view its data.

Again, there is no issue here if the file is on a fixed drive. I have also tried mapping a drive to the share and get the same error. The only workaround I've found is to copy the file to a temp directory on a fixed drive, but this really isn't an acceptable solution. 

Any ideas about what's causing this and how to resolve it?

Login at website using ssis

$
0
0

Hello friends

Actually in ssis pkg after some step i do  login at site https://www.donotcall.gov.au/industry/ using my login and password then then upload my data file there and choose an option  at site then site will return me some data file and save in database.. and this is daily based task..

Can i do this task automatically.??

Please Friends help me in this .

Regards

Bi_group

SSIS Wizard cannot import text columns longer then 255 using Excel source

$
0
0
(Applies to SQLServer 2005 SP1)

We have found that using the SSIS "Import and Export Wizard" using the "Microsoft Excel" data source that there appears to be a maximum column length of 255 characters for any row.

Even when defining the destination table columns as nvarchar(4000), the wizard fails with the errors shown below.

We have found no workaround except manually changing the imput data. There doesn't appear to be any "Advanced" options for the Excel importer as there are for the flat-text importer. So, no question here, just posting the bug so that *next* time someone searches the web for an answer, this post comes up


Messages
Error 0xc020901c: Data Flow Task: There was an error with output column "English String" (18) on output "Excel Source Output" (9). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)

Error 0xc020902a: Data Flow Task: The "output column "English String" (18)" failed because truncation occurred, and the truncation row disposition on "output column "English String" (18)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
(SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task: The PrimeOutput method on component "Source - Sheet1$" (1) returned error code 0xC020902A. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.
(SQL Server Import and Export Wizard)

Error 0xc0047021: Data Flow Task: Thread "SourceThread0" has exited with error code 0xC0047038.
(SQL Server Import and Export Wizard)

Error 0xc0047039: Data Flow Task: Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.
(SQL Server Import and Export Wizard)

Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error code 0xC0047039.
(SQL Server Import and Export Wizard)




edit: After searching further this is documented under "Excel Source" in BOL which provides a registry-based workaround.  I guess the issue is that the wizard considers truncation to be  a 'fail' case and there's no easy way to override this behaviour, specify the column types nor determine which line is in error)

Truncated text. When the driver determines that an Excel column contains text data, the driver selects the data type (string or memo) based on the longest value that it samples. If the driver does not discover any values longer than 255 characters in the rows that it samples, it treats the column as a 255-character string column instead of a memo column. Therefore, values longer than 255 characters may be truncated. To import data from a memo column without truncation, you must make sure that the memo column in at least one of the sampled rows contains a value longer than 255 characters, or you must increase the number of rows sampled by the driver to include such a row. You can increase the number of rows sampled by increasing the value of TypeGuessRows under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel registry key.
)

can't insert dt_str to char type

$
0
0
Hi,

Having problem with OLE-DB connection to informix.

Created a flat file has two columns and 2 row:
1|a
2|b

tried to load it to a informix table:
create table t
( c1  int,
  c2 char
);

2 rows inserted, but only column c1 got data.

Changed c2 from char to varchar then ok.

thanks for any help.

gg


East Asian characters being changed to ??? in script data flow task

$
0
0

I have a script component in a data flow task to apply some logic to records and output to a different table.  It all works fine until I get to records which contain Chinese or Japanese characters.  It seems to transform the characters to ??????

I'm running SSIS 2008 R2.  Below is the code.  It works perfectly for non Asian character strings. Is there another connection type I should be using when dealing with unicode fields?

' Microsoft SQL Server Integration Services Script Component ' Write scripts using Microsoft Visual Basic 2008. ' ScriptMain is the entry point class of the script. Imports System Imports System.Data Imports System.Math Imports System.String Imports System.Data.SqlClient Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper Imports Microsoft.SqlServer.Dts.Runtime.Wrapper <Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute> _ <CLSCompliant(False)> _ Public Class ScriptMain Inherits UserComponent Dim connMgr As IDTSConnectionManager100 Dim sqlConn As SqlConnection Public Overrides Sub AcquireConnections(ByVal Transaction As Object) connMgr = Me.Connections.HuthwaiteDMConnection sqlConn = CType(connMgr.AcquireConnection(Nothing), SqlConnection) End Sub Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)

Dim iCols As Int16 Dim i As Int16 Dim strQuery As String Dim strColG As String strQuery = "Select Verify_email_Address, ProgramID, Organization, AssessKey, Exam_Name, Exam, Attempts, ISNULL(MaxAttempt,0), ISNULL(MinAttempt,0), Start_Date, Finish_Date, LoadDate, Total_Points" iCols = Row.GroupCount For i = 1 To iCols Select Case i Case 1 If IsNullOrEmpty(Row.G1) = False Then StrColG = Row.G1.ToString If IsNullOrEmpty(Row.G1) = False Then strQuery = strQuery & " ," & strColG & " as G1" Case 2 If IsNullOrEmpty(Row.G2) = False Then strColG = Row.G2.ToString If IsNullOrEmpty(Row.G2) = False Then strQuery = strQuery & " ," & strColG & " as G2" Case 3 If IsNullOrEmpty(Row.G3) = False Then strColG = Row.G3.ToString If IsNullOrEmpty(Row.G3) = False Then strQuery = strQuery & " ," & strColG & " as G3" Case 4 If IsNullOrEmpty(Row.G4) = False Then strColG = Row.G4.ToString If IsNullOrEmpty(Row.G4) = False Then strQuery = strQuery & " ," & strColG & " as G4" Case 5 If IsNullOrEmpty(Row.G5) = False Then strColG = Row.G5.ToString If IsNullOrEmpty(Row.G5) = False Then strQuery = strQuery & " ," & strColG & " as G5" Case 6 If IsNullOrEmpty(Row.G6) = False Then strColG = Row.G6.ToString If IsNullOrEmpty(Row.G6) = False Then strQuery = strQuery & " ," & strColG & " as G6" Case 7 If IsNullOrEmpty(Row.G7) = False Then strColG = Row.G7.ToString If IsNullOrEmpty(Row.G7) = False Then strQuery = strQuery & " ," & strColG & " as G7" Case 8 If IsNullOrEmpty(Row.G8) = False Then strColG = Row.G8.ToString If IsNullOrEmpty(Row.G8) = False Then strQuery = strQuery & " ," & strColG & " as G8" Case 9 If IsNullOrEmpty(Row.G9) = False Then strColG = Row.G9.ToString If IsNullOrEmpty(Row.G9) = False Then strQuery = strQuery & " ," & strColG & " as G9" Case 10 If IsNullOrEmpty(Row.G10) = False Then strColG = Row.G10.ToString If IsNullOrEmpty(Row.G10) = False Then strQuery = strQuery & " ," & strColG & " as G10" End Select Next strQuery = strQuery & " From Corrected_PostAssessment where ProgramID = " & "'" & Row.ProgramID & "'" Dim command As New SqlCommand(strQuery, sqlConn) Dim reader As SqlDataReader = command.ExecuteReader While reader.Read() With Output0Buffer .AddRow() .VerifyemailAddress = reader(0) .ProgramID = Row.ProgramID .Organization = reader(2) .AssessKey = reader(3) .ExamName = reader(4) .Exam = reader(5) .Attempts = reader(6) .MaxAttempt = reader(7) .MinAttempt = reader(8) .StartDate = reader(9) .FinishDate = reader(10) .LoadDate = reader(11) .TotalPoints = reader(12) If Row.GroupCount >= 1 Then .G1 = reader(13) If Row.GroupCount >= 2 Then .G2 = reader(14) If Row.GroupCount >= 3 Then .G3 = reader(15) If Row.GroupCount >= 4 Then .G4 = reader(16) If Row.GroupCount >= 5 Then .G5 = reader(17) If Row.GroupCount >= 6 Then .G6 = reader(18) If Row.GroupCount >= 7 Then .G7 = reader(19) If Row.GroupCount >= 8 Then .G8 = reader(20) If Row.GroupCount >= 9 Then .G9 = reader(21) If Row.GroupCount >= 10 Then .G10 = reader(22) End With End While reader.Close() End Sub End Class

Any insight will be greatly appreciated.

Regards,

Bill Webster

Viewing all 24688 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>