Transferring Tables From One Database To Another Using SSIS Task Fails..
Jan 2, 2008
I have a SSIS package that transfers a couple of tables from one database to another database on the same server. It works fine in most of the machines we tested with. However on one of the customer machines, it consistently fails with the error message, The Return value was unknown. The process exit code was -1073741795. The step failed.
This package runs as a scheduled job on the sql agent. When i did a sql profiler to see what is going on, i noticed that the last step before the bulk insert, it gets the collation and the schema id of the 2 tables. My guess is, it compares these values from the source and destination databases and makes sure everything is ok before copying.
On a machine where this works, it goes ahead with the the next step which is the bulk insert itself. Whereas on the machines where it doesn't work, it stops right after this step. i.e. it does not even bother to call the 'bulk insert' api. Which makes me think it is doing some kind of validation with these values and it is getting something that is not expected.
If the collation or the schema was an issue, why throw an 'return value unknown' error? Can the error be more specific?
Any other possible reasons for such a behavior? Any clues?
I set up a basic Transfer Database task (online, copy) to copy a DB. It works great except for the fact that it isn't transferring the PK's and FK's. It also looks like it did not transfer the views. Any idea why? Anything else the Transfer Database task doesn't actually transfer?
I want to create an automatic job on SQL 2005 to transfer logins between 2 servers, (Principle and Mirror). If I use the transfer logins task I get the error:
"The database "x" cannot be opened. It is acting as a mirror database."
I guess this is because it is trying to assign the default databases for the logins??
I've also looked at [sp_help_revlogin] procs but that requires manual intervention.
How does everyone else transfer logins in this situation?
I am using the "Transfer SQL Server Objects Task" to copy some tables from database A to database B including data.
The tables, primary key constraints, Foreign key, data and all transfers nicely except for "DEFAULT CONSTRAINTS" on the tables.
I have failed to find any option in the "Transfer SQL Server Objects Task" task to explicitly say "copy default constraints". So I guess logically it should happen automatically but it doesn't. I hope it is not a bug :-)
We are running SQL Server 2012 SP1 64-Bit EE on Windows Server 2008 R2 SP1. I have a SSIS Package which connects to a FTP Site and downloads a file. Then it truncates a table and loads the file data into a table. This package works okay when executed from within VSS and SSMS (In SSISDB, right click on the package and execute). However, when I execute it as a Job it does not run and appears to be failing on the first task which is the FTP Task. SQL job step - Type: SSIS Package; Run as: SQL Server Agent Service Account (domain account called playuser); Authentication: Windows Authentication.In the All Executions Standard Report for the SSISDB Catalog, it only says: FTP Download File: Errors: There were errors during task validation.
Is this because my domain account does not have access to the FTP Site?Is this where I need to come up with a Proxy Account with Credentials?Do I need to set up a SQL Server Login (Proxy Account) with the same username being used in the FTP Batch file?
FTP Commands in a batch file: username password cd omb asc get STRMASTER quit
I seem somehow stuck in some Script Task problems in SSIS on a x64-environment which has SP2 installed already.
If I'm running the package in 32-bit mode, I'm continuously getting the following error "Warning: Precompiled script failed to load. Attempting to recompile. For more information, see the Microsoft Knowledge Base article, KB931846 (http://go.microsoft.com/fwlink/?LinkId=81885)."
on one of the package's scripts -- the given links advises to install SP2... what a useless hint.
And if I switch the project to run in Run64BitRuntime=True , another script tasks complains "ScriptTask_78888010d24c477ea7c8d69f4f5568a5 is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
-- whatever that might mean...
Maybe I should add that the packages were running in 32-bit mode for the last 12 months now. Without any problems like that.
Those effects are occuring since we put SP2 onto the server...
Any comments on this topic? Similar experiences? Maybe yet some solutions too?
I have a SSIS package with an FTP task to download a Excel file and populate a table using an excel connection mnager and a SQL Server Destination and it always fails with the following error when scheduled:
The job failed. The Job was invoked by User sa. The last step to run was step 1 (FTP-DM-CRN_ALLOCATION_COMMENTS).
Executed as user: WEB-INTSQLSYSTEM. The package execution failed. The step failed.
The box on which SQL Server is installed is on a workgroup on the domain and the SQL Server is started up by the Local System user on the box.
I am thinking this has to do with windows security based on all the information that I have read on these kind of error messages. Any input on resolving this will be much appreciated.
I have a Job Step defined to execute a SSIS Package. This SSIS package contains a Script Task. The Job fails with the message "Package execution failed. The step failed."
Since applying July 2007 Microsoft patches it was noted that we were not able to open the editor for the Script Task component in an SSIS package. We received an error dialog with text similar to 'Engine failed with unknown error. (Microsoft.VisualBasic.Vsa.Dt).' All other solutions provided in the forum did not resolve our issue. It was noted somewhere else that the OLE32.dll seemed to have been affected. We reregistered this file using the command 'regsvr32.exe ole32.dll' and suddenly we were able to get into the editor. I don't know why this fixed the issue, but it did for us in our environment. Good luck!
I am trying to execute an SSIS package from a client that contains an Analysis Services Processing Task in the package. The client that does not have SSIS and SSAS installed. We are getting an error
The task "Analysis Services Processing Task" cannot run on this edition of Integration Services. It requires a higher level edition. The same package runs from a server that has both SSIS and SSAS installed. Let me know if someone has come across the same problem.
I have a flat file which is loaded into the database on a daily basis. The file contains rows of strings which I load into a table, specifically to a column of length 8000.
The string has a length of 690, but the format is like 'xxxxxx xx xx..' and so on, where 'xxxx' represents data. So there are spaces, etc present in the middle.
Previously I used SQL 2000 DTS to load the files in, and it was just a Column Transformation with the Col001 from the text file loading straight to my table column. After the load, if I select len(col) it gives me 750 for all rows.
Once I started to migrate this to SSIS, I allocated the Control Flow Task and specified the flat file source and the oledb destination, and gave the output column a type of String and output column width of 8000. But when I run the data flow task it copies only 181 or 231 characters out of the 750 required. I feel it stops where it finds the SPACES and skips the rest.
I specified row delimiters or CR, and LF. I checked the file under UltraEdit and there were no special characters in the file that would cause the problem.
Any suggestions how I can get it to load the full data?
Created a maintenance plan to backup my sharepoint databases. When I execute it the following error occurs: Execution failed. See the maintenance plan and SQL Server Agent job history logs for details: Additional Information: Job 'SharePointBackUp.Backup_SharePoint faild. (SqlManagerUI) - Execute maintenance plan. SharePointBackUP (Error) Messages * Execution failed. See the maintenance plan and SQL Server Agent job history logs for details.
When checking the Maintenance PlansharePointBackUP log it is empty! Under Job History I thinks this: Date 4/18/2008 12:55:35 PM Log Job History (SharePointBackUP.Backup_SharePoint) Step ID 1 Server DESD7 Job Name SharePointBackUP.Backup_SharePoint Step Name Backup_SharePoint Duration 00:00:00 Sql Severity 0 Sql Message ID 0 Operator Emailed Operator Net sent Operator Paged Retries Attempted 0 Message Unable to start execution of step 1 (reason: line(1): Syntax error). The step failed. line 1? Is that line one of the T-SQL statement? Because if that's the case then it's not because I copied and pasted the line in to a query and it executed without error. Under SQL Agent there are no entries! So what bloody log am I suppose to be checking?! This is very frustrating. I then copied and pasted every sql statement in to a query and THEY all ran just fine.
What's going wrong here, and how can I correct it?
I have developed a SQL Server 2005 Integration Services (SSIS) package that includes a Script Task on a 32-bit machine. The PrecompileScriptIntoBinaryCode property is set to True. After I build the package, the .dtsx file includes a <BinaryItem> element for that Task. Package runs fine on the dev machine, both in BIDS and as SQL Server Agent job. When I deploy the package to a 64-bit server, it runs fine when I execute the package ad hoc from SQL Server Management Studio. However, when I schedule the package for execution as a SQL Server Agent job, the package fails with the message: "the script files failed to load." I have reviewed posts on this error from late 2005, but the solutions don't work in this case. Specifically: 1. The Precompile property is already set to True. 2. I have already verified that the script was compiled. Any further suggestions?
I'm using a Business Intelligence project to copy stored procedures and tables from one database to another across servers. I'm having trouble copying tables or stored procedures using the Management.SMO.Transfer class.
I tried copying stored procedure with the property transfer.CopyAllStoredProcedures = true. This didn't work. As a workaround, I used the StringCollection property and executed every string as sql.
Now I'm having trouble copying tables. I don't want to copy all the tables in the database. How do I go about selecting what tables to copy. I tried using ObjectList property and provided the names of the tables in an ArrayList. I get the error
"Transfer cannot process System.String. You need to pass an instance class object."
How can I pass an "instance class object" for something that's in the database? The ScriptTransfer method fails so I can't even see the script that is being generated. There is virtually no documentation for this class.
I have 2 tables with the following structure: CREATE TABLE [dbo].[table1] ( [RID] [int] IDENTITY (1, 1) NOT NULL , [RText] [varchar] (400) NULL , [DateModified] [datetime] NULL ) ON [PRIMARY]
CREATE TABLE [dbo].[Table2] ( [GrpRID] [int] IDENTITY (1, 1) NOT NULL , [GrpID] [varchar] (10) NOT NULL , [RID] [int] NOT NULL , [Status] [bit] NULL , [SortOrder] [int] NULL , [DateModified] [datetime] NULL ) ON [PRIMARY] GO I am transfering 2 table between 2 SQL server based on GrpRID from table2. Since RID is identity in table1 sometimes it is different text for spesific Rid in second server. Some how I need to get the match the right text from server1 to server2 and if text doesn't exists create a bew entry in table1 with the update to table2 wich should reflect correct RID.
I have to pick up a row from Customers and transfer it to CustomerMaster and CustomerDetails. CustomerId of CustomerMaster will be the CustomerId of CustomerDetails while transfer.
I'm using SSIS in Visual Studio 2012. My Execute SQL Task calls a Stored Procedure where I have a TRY-CATCH. Last week there was a problem and the CATCH was executed and logged an error to my error table, but for some reason the Execute SQL Task didn't fail. Is there a setting to make the Execute SQL Task fail when an SP encounters a failure?
I have a database project where objects have been pulled in from the database using schema compare.
Unfortunately CDC tables which are referenced in stored procedures on the database have not been pulled in by the schema compare & hence I cannot build the project and deploy changes back to the database.
I need to copy all the data from all the tables in a database to a copy of this database on another server. What feature of SSIS should I take advantage of to accomplish this?
We have an SLA for 8am, most times the data warehousing jobs complete at 8:05am. Adding an additional process/set of tasks to this package would obviously make matters so I'm trying to update/copy/replicate the data in the fastest manner. Typically we're talking 2 marts (10-20GB) with 2 large tables (5-10 mill records) and 20 marts (0.5 - 5 GB) with many more smaller tables (~40 tables with record count ranging from 1 to a million)
Additionally please indicate if the design/feature you suggest can handle (pushing schema changes and additions to the target server) schema changes or new tablesviews added to the source database.
My only idea so far...is using the import wizard (in Management Studio) to create an SSIS package (top copy all the tables from one server to another) and saving it to the server, Then executing this package after the job is complete. However this would not work if the schema of a table changed, or if a a table is added. Moreover I don't think I can edit this package in visual studio.
I am hoping someone can help me with a problem I am having with SSIS. I am attempting to move certain sql agent jobs from our older sql 2000 server to our new sql 2005 server and I am receiving the error [Transfer Jobs Task] Error: Execution failed with the following error: "The specified '@server' is invalid (valid values are returned by sp_helpserver).".
Does my server name need to be the same if I am using SSIS to transfer jobs? Is there a way to update the server name during the execution process?
This seems like it should be a relatively easy task but has not been so far.
I am transferring DB2 data to SQL server 2005 in ssis. the connection i I am using is the IBM OLEDB driver for DB2 which uses the ODBC connection on the machine. The issue is that while transferring data i get errors reg unicode vs non unicode data. the db2 data is showing unicode data, but when i see the datatype in the db2 database it is a varchar. so when i transfer the data to a varchar in sql server 2005, it errors out....meesageis unicode vs non unicode data. Why is the data from db2 coming across as unicode string. Also the transfer works fine in SQL server 2000, why is is not working in sql server 2005. Please help !!!!
Has any1 noticed that when they are transferring SQL tables from one server (or machine) to another that the primary keys drop from the table (or is it just me). If so, has someone figured out why? and how to rectify this (apparent) error.
I am administering several SQL Servers running SQL Server 2005 SP2 Build 3042. I have a common maintenance plan that runs on each of the servers. The maintenance plan runs fine on all the servers except for one. On the one server the Database Integrity check fails with the following error:
Check Database integrity on Local server connection Databases: <list of databases> Include indexes Task start: 2008-02-21T00:05:42. Task end: 2008-02-21T00:05:46. Failed0) Alter failed for Server €˜XYZ€™
I created a test maintenance plan to just do the integrity check and selected one database only and this also failed with the same error message. I ran this test maintenance plan and configured it for each of the databases in question and it failed each time. If I run the DBCC manually against the databases they all report fine.
I read some of the post that talked about the €œAllow Updates€? being set incorrectly but that does not apply to my problem since my configured and run values are set to 0.
I am using MS Access 2003 SP2 to maintain some data tables. I use SSIS to transfer them to SQL Server 2005, Enterprise Edition.
When I run the SSIS package from within Visual Studio 2005, the package runs without error.
When I try to run the same SSIS package by double-clicking on it in my File System (which invokes the Execute Package Utility, Version: 1.0) none of the tables get copied. Instead all I receive is a message for each table,
Error: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "Data Conversion 1" (49).
The only data conversion I perform is double-byte characters to single-byte characters.
Bob Bojanic, MSFT, made a few suggestions about this in another thread -- but I have created this new thread to help focus on this specific issue. In particular, he asked if we have installed the complete SSIS support for SQL Server 2005, Enterprise Edition, and my network support and database support staff assure me that such complete SSIS support was installed.
Are others having this problem?
Dan
(I just took a look at some of the transformations in the Data Conversion task, and many of them are using an Output Alias identical to the Input Column name. Might that be causing the problem? I will try changing the Output Alias for some tables and see if they then transfer correctly. The "identical name" Output Alias values were created by the Migration Wizard for a DTS 2000 package.)
Hi everyone Can any one help me I am using Tranfer databse object task when I am trying to run it its throwing exception can not send null value in login name????
Help anyone!! I fighting with the same error. I've tried all the suggestions on the web and more. Nothing seems to work. Has anyone found an answer from Microsoft?
Error: The Execute method on the task returned error code 0x80131500 (ERROR : errorCode=-1073548784 description=Executing the query "EXEC dbo.sp_grantdbaccess @loginame = N'sctcsssoadmin', @name_in_db = N'ssoadmin' " failed with the following error: "User, group, or role 'ssoadmin' already exists in the current database.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. helpFile= helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}). The Execute method must succeed, and indicate the result using an "out" parameter.
Dim dbConnectionManager As ConnectionManager = Dts.Connections(0) Dim dbConnectionRaw As Object = dbConnectionManager.AcquireConnection(Nothing) Dim dbConnection As OdbcConnection = CType(dbConnectionRaw, OdbcConnection)
I get this error:
Unable to cast COM object of type 'System.__ComObject' to class type 'System.Data.Odbc.OdbcConnection'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
I'm just trying to get a basic database connection from the DTS package in my script task. Is there a better way to do this? Preferably, I would use ADO.NET rather than the old COM stuff. However, if SSIS still requires the use of COM, that's fine as well, as long as I can fix the above code.
Hi, I have to transfer data from JDEdwards source system to SQL Server 2005 using SSIS. Is it possible for me to connect to JDEdwards directly from ODBC Connection Manager provided by SSIS. If not then what is the way to implement this
I am trying to load the data from one data base to another using the Task->Generate Script->tables (data only). Â So I saved the script of the data and when tried to run the script to the destination DB, getting the below error when ran the script.
Error: Visual Studio has encountered an exception. This may be caused by an extension.You can get more information by running the application together with the /log parameter on the command line, and then examining the file'C:UsersKK67AppDataRoamingMicrosoftAppEnv10.0ActivityLog.xm'. When tried opening the folder using the above path... don't see anything for AppData folder from that path.
In my SSIS package, I have a backup database task. When I run the package with DestinationAutoFolderPath set to a folder ("Network Service" account has full permission on this folder) and DestinationCreationType set to Auto, the task works just fine creating a backup with its own name. (similar to database_date<count>).
But what I want is in my front-end I am allowing the user to specify the name of the backup file. So I want the task to create the backup file in the name I supply. I set the DestinationCreationType to manual and in the application code added the DestinationManualList with the path from the UI.
Now the pacakge runs fine but does not take any backup. There is no errors as well. If I set the FailPackageOnFailure and FailParentOnFailure to true, then I am getting the DTSExecResult.Failure but I am not getting the actual error from the backup database task.
Hi, I have a sendmail task in my ssis package. In the From field, if i hardcode my from and to address as user@company.com it works fine and mail is sent. But i want to read the from and to values from a database table. SO i defined the package level variables and getting the values into the variables. SO at From if i specify the variable name it gives a compiel time error"the address in th from line is mal formed. it is either missing @ character or not valid". how do i specify teh variable for from address? I feel, may be i can use expression, but i don't know how to do that. Can anyone help me with this?