Showing posts with label attempting. Show all posts
Showing posts with label attempting. Show all posts

Sunday, February 26, 2012

DTS Migration Wizard error

I'm using SQL Server 2005 Enterprise x64 and when attempting to migrate a DTS from our SQL Server 2000 Standard x86 server I received the following error message:

DTS Migration Wizard Error

Could not load file or assembly 'Microsoft.SqlServer.Exec80PackageTask, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of it's dependencies. The system cannot find the file specified.

Click Abort to stop the migration of the current package.

Click Retry to retry the operation.

Click Skip to skip the migration of the current task and continue to the next task.

From the error message, it would appear something did not install or register correctly. Any idea on what is missing and how I can fix it?

Hi there,

Did you do a full SSIS install, or did you install the Migration Wizard by itself? I believe you also need choose "Legacy Components" from the setup if you choose to install the Migration Wizard without the rest of the workbench. That might be the cause of the error you're seeing.

Thanks,

~Matt

|||

I chose to install all (full) components, both server and tools, during my installation of SQL Server 2005 Evaluation Edition. I found it strange that the icon said MS Visual Studio Premier Edition -enu instead of SQL Server Business Intelligence Development Studio. I tried a repair on the MS Visual Studio Premier Edition from Add / Remove Programs but it didn't help. I then removed it using Add / Remove Programs. However, when I fire up the SQL Server 2005 Evaluation Edition setup and attempted to reinstall the tools, it said they were already installed and would not let me go any further. Is a reboot of the production server necessary for Windows 2003 Enterprise to realize I uninstalled MS Visual Studio?

Thanks for your response Matt!

|||

The Visual Studio icon will only be labeled "SQL Server Business Intelligence Development Studio" under the SQL Server folder in the start menu. Your old visual studio icons won't change (they all point to the same thing).

You shouldn't have to reboot after installing SQL Server, but if you've done a repair, I'm not sure what state that puts you in. You might want to uninstall it all and start over again.

The Migration Wizard will be looking for the Microsoft.SqlServer.Exec80PackageTask assembly in the GAC - you might want to make sure it's there. This task gets installed when you select "Legacy Components" or the workbench, so doing a full install should give you all the bits you need.

|||That is the strange part. MS Visual Studio 2005 was not previously installed on this machine; it came across when I chose to install every component of the SQL Server 2005 Eval Edition installation. And the icon in the SQL Server folder didn't say BIDS, instead it was labeled MS Visual Studio 2005. Either way, I have now uninstalled MS Visual Studio 2005 and it looks like I will need to reboot my server before it recognizes the change as it will not allow me to re-install them at this point.|||I ended up uninstalling and reinstalling all of SQL Server 2005 and components. Then to address the missing Business Intellligence projects; I finallly found the answer, In MS Visual Studio (BIDS) click on Tools - Import and Export Settings - Import Selected Environment Settings - Yes, Save my current settings and then highlight "Business Intelligence Settings" and click on finish. This will add the Business Intelligence projects to BIDS.

DTS Migration Wizard error

I'm using SQL Server 2005 Enterprise x64 and when attempting to migrate a DTS from our SQL Server 2000 Standard x86 server I received the following error message:

DTS Migration Wizard Error

Could not load file or assembly 'Microsoft.SqlServer.Exec80PackageTask, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of it's dependencies. The system cannot find the file specified.

Click Abort to stop the migration of the current package.

Click Retry to retry the operation.

Click Skip to skip the migration of the current task and continue to the next task.

From the error message, it would appear something did not install or register correctly. Any idea on what is missing and how I can fix it?

Hi there,

Did you do a full SSIS install, or did you install the Migration Wizard by itself? I believe you also need choose "Legacy Components" from the setup if you choose to install the Migration Wizard without the rest of the workbench. That might be the cause of the error you're seeing.

Thanks,

~Matt

|||

I chose to install all (full) components, both server and tools, during my installation of SQL Server 2005 Evaluation Edition. I found it strange that the icon said MS Visual Studio Premier Edition -enu instead of SQL Server Business Intelligence Development Studio. I tried a repair on the MS Visual Studio Premier Edition from Add / Remove Programs but it didn't help. I then removed it using Add / Remove Programs. However, when I fire up the SQL Server 2005 Evaluation Edition setup and attempted to reinstall the tools, it said they were already installed and would not let me go any further. Is a reboot of the production server necessary for Windows 2003 Enterprise to realize I uninstalled MS Visual Studio?

Thanks for your response Matt!

|||

The Visual Studio icon will only be labeled "SQL Server Business Intelligence Development Studio" under the SQL Server folder in the start menu. Your old visual studio icons won't change (they all point to the same thing).

You shouldn't have to reboot after installing SQL Server, but if you've done a repair, I'm not sure what state that puts you in. You might want to uninstall it all and start over again.

The Migration Wizard will be looking for the Microsoft.SqlServer.Exec80PackageTask assembly in the GAC - you might want to make sure it's there. This task gets installed when you select "Legacy Components" or the workbench, so doing a full install should give you all the bits you need.

|||That is the strange part. MS Visual Studio 2005 was not previously installed on this machine; it came across when I chose to install every component of the SQL Server 2005 Eval Edition installation. And the icon in the SQL Server folder didn't say BIDS, instead it was labeled MS Visual Studio 2005. Either way, I have now uninstalled MS Visual Studio 2005 and it looks like I will need to reboot my server before it recognizes the change as it will not allow me to re-install them at this point.|||I ended up uninstalling and reinstalling all of SQL Server 2005 and components. Then to address the missing Business Intellligence projects; I finallly found the answer, In MS Visual Studio (BIDS) click on Tools - Import and Export Settings - Import Selected Environment Settings - Yes, Save my current settings and then highlight "Business Intelligence Settings" and click on finish. This will add the Business Intelligence projects to BIDS.

DTS Migration error message

I get the following error message when attempting to migrate DTS packages from SQL Server 2000 to SQL Server 2005:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index (mscorlib)

Could this be it:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=357132&SiteID=1

-Jamie

DTS load to multiple tables

I have SQL Server 2003 Standard and am attempting to use DTS for a data load/transformation and I’m not sure if I am using the right tool for the job.I have a somewhat denormalized Access database that has to be loaded into a normalized SQL Server database.Values from one row in any of the source tables generally need to be separated and inserted into several destination (SQL Server) tables.There are no unique ids in the source data since it is coming from a 3rd party and the tables are not related to others.I’ve created a DTS Package and have the beginnings of several Transform Data Tasks.Each destination table has an Identity id column, which is calculated automatically.The roadblock I’ve run into is that I can’t figure out how to take each newly created ID and insert it into a new row in another table as a foreign key.Basically, I have to move data from a single input row to new rows in multiple destination tables and create ids (PK, FK) that tie these tables together.The Transform Data Task only allows me to reference one source and one destination, not multiple destinations.I hope this makes sense.Any suggestions would be appreciated.

Here’s a simple example that may help illustrate the problem.My database is much more complex.

Input table is called parcels and each row has three columns:Address, Owner, and Legal_Description.

Output database has two tables that will receive this data:Parcel table will have the Address, Owner and Parcel_ID (auto calculated).Legal table will have Legal_Description, Legal_Desc_ID (auto calculated), and Parcel_ID.

When the row is inserted into the Parcel table, the newly auto calculated Parcel_ID has to be captured.Next create a row into the Legal table and insert the Parcel_ID so the two rows are related.

How can I do this through DTS?Thanks for any suggestions, code snippets, or references.

Due to the complexity of this task, I would suggest maybe doing this in a .NET winforms application. Set up ODBC connections to the two databases. Now write some queries in the Access database to divide the data up appropriately. Next, write insert procedures in the SQL Server database, which return an outparameter which is the id field. To get this, in the insert proc, use the @.@.IDENTITY or the SCOPE_IDENTITY calls to get the id value of the inserted row. Capture this in the .NET application, and pass this in to the insert proc in the related table. Alternatively, keep a cache of the data mappings, maybe in a temporary table or a dataset, and do the inserts as bulk inserts. Then run an update procedure which sets the foreign key based on the database mappings in the original database. So, for example, based on the Legal_Description in the legal table, update the Parcel_Id in the legal table using the owner and address values that used to share a row with the Legal_Description. Either approach should work.

let me know if you need more guidance here. Some of the SQL database engine people, or the SSIS people may be able to point you to a DTS solution that can do this. Alternatively, you could create a DTS solution that inserts into one table, inserts into the other, then calls the update procedure as described above. There is a separate SSIS forum (the new DTS), you may be better posting the question there.

HTH

For more T-SQL tips, check out my blog:

Friday, February 24, 2012

DTS job to Oracle Table.

I'm having a problem with DTS.
I've got a table on a Microsoft SQL 2000 server that I'm attempting to export to an Oracle Table.

The Oracle Table has a Primary key set, that automatically generates it's own keys.
However, using the DTS export job I continually get:

------
Error Source: Microsoft Data Transformation Services (DTS) Data Pump
Error Description:Insert error, column 1 ('INPT_PKT_HDR_ID', DBTYPE_NUMERIC), status 10: Integrity violation; attempt to insert NULL data or data which violates constraints.
Error Help File:sqldts80.hlp
Error Help Context ID:30702
------

Now, I'm not attempting to insert anything into this primary key field, so why oh why am I getting this error message?

I'm using a DTS ActiveX Script to do the transformation as follows:
------
'************************************************* *****
' Visual Basic Transformation Script
' Copy each source column to the
' destination column
'************************************************* *****
Function Main()
DTSDestination("PKT_CTRL_NBR") = DTSSource("PKT_CTRL_NBR")
DTSDestination("CUST_RTE") = DTSSource("CUST_RTE")
Main = DTSTransformStat_OK
End Function
------

So nothing too scarry or difficult there.

I'm using an ODBC Oracle connection to the get to the Oracle table, although I've also tried using the Microsoft OLE DB Provider for Oracle.
Both give me the same error.

Importing data from Oracle to Oracle works.

Can someone please suggest some ideas to fix this problem?

Thanks.It sounds as though you are trying to insert a null value into a column which does not accept them. Can you confirm that there are no NULL or non conforming values in you source table col1?|||Originally posted by SQLSurfer
It sounds as though you are trying to insert a null value into a column which does not accept them. Can you confirm that there are no NULL or non conforming values in you source table col1?

Nope. The initial colum of the source table contains data. This column is being inserted into another column on the destination database.
At no point am I inserting NULL values into any of the columns on the destination as the source columns all contain data.

I believe all of the source columns match upto the destination columns in terms of data types as well (although date fields I'm a bit unsure of how they are mapped across).

Any ideas at all to check would be more than welcome as it's probably something blatantly simple that I've overlooked.|||The error appears to point the finger at column 1 'INPT_PKT_HDR_ID'. What is the SQL datatype of this column and its properties compared to the other DB table?|||Originally posted by SQLSurfer
The error appears to point the finger at column 1 'INPT_PKT_HDR_ID'. What is the SQL datatype of this column and its properties compared to the other DB table?

'INPT_PKT_HDR_ID' only exists in the destination table (ORACLE).

It's set-up as follows:

COLUMNS
======
Column | PK | Data Type | NULL? | Default
---------------
INPT_PKT_HDR_ID | 1 | NUMBER(9) | N |

TRIGGER
======
CREATE OR REPLACE TRIGGER "TESTDB".TIB_INPT_PKT_HDR
BEFORE INSERT ON INPT_PKT_HDR FOR EACH ROW
DECLARE

ID NUMBER(9);

BEGIN

ID := 0;
SELECT INPT_PKT_HDR_SEQ.NEXTVAL INTO ID FROM DUAL;

:NEW.INPT_PKT_HDR_ID := ID;

END;

Tuesday, February 14, 2012

DTS Import Error (Catastrophic Failure).

I am attempting to do an import from an Access Database
which contains tables and Views. Upon running the DTS
import wizard, I am receiving an error "Catastrophic
Failure" and can find no knowledge base articles on. The
file is approximately 3 MegaB in size.

After the import, the table's structure comes but no data
appears. There are fields which have Memo fields as
Datatype.

Expecting ur Help

Thanks, Stan
.If you have datetiem fields in your Access database, consider this:

Access accepts values for datetime fields >= January 1st, 100

MS SQL SERVER accepts values for datatime fields >= January, 1, 1753

Check in your Access database if no datetime filed has a value (due to typing error or so) before January 1, 1753. If it has this is your problem. SQL Server will never imports such date values.

IONUT

DTS global variable problems...

Hey all,

I've recently been attempting a transform data task with a custom query for the source. Using the query, i've attempted to use global params, but it only ever seems to work if there is only one item in the global var. If I return an entire resultset, I get a "EXCEPTION_ACCESS_VIOLATION" instead. I'm trying to use it like "SELECT * FROM whatever WHERE ID IN(?)"

I've pondered this problem for quite some time now and I am wondering if there is a workaround for it. I know it would take much too long to do the same thing in activeX with a transform, so I would rather do it this way if I could.

Thanks in advance,
-KilkaHmmm, I'm not sure why that shouldn't work.... how are you setting your global variable??

An alternative way would be to use an ActiveX task to set the query value (eg. instead of setting a global variable set the query for the transform data task.)|||I've created them when I specify the IN (?) parameter under the parameters button. I then fill them with some ID's from several xls spreadsheets. I know that this procedure is working correctly because I wrote some activeX to spit out the contents of the var, and the size of the var. Everything there is right on the money. Also, when I specified the global variables, I set them as type <empty>, which is what I think im supposed to do according to msdn. I'm thinking that maybe this has something to do with the IN and it's param, as I'm doing this for 1500 items or so.

Thanks rokslide,
-Kilka|||errghhh, you might be running into a length problem... I suspect that there is a maximum length on the sql query for the transform data task...

Could you put the id's into a temp table and then do a join or something?

Can you test it without using so may items? perhaps only 10 or something...
that way you can try and eliminate possible problems...|||No, I've tried that already too. I've reduced the resultset so it only has two elements and I still get the same problem. I've verified that there were only two elements with the activeX script.

-Kilka|||Also,

Just thought that I should mention my global variables both appear as type "Dispatch" under the package properties. I was also thinking that perhaps I should try using another statement other than IN(?) in my data transformation. Is there anything like IN that would give me the same results ?|||apart from using multiple or statements, no, not really unless you create a temp table and join on it...

if you don't try and set the sql using a global variable what happens. does it still fail or does it work, I'm beginning to wonder if the problem isn't somewhere else...|||Ok,

So i've done some more playing around with this, still to no avail. Deleting the global var should and does give me "Global Variable 'chid2' not found'". If I create the variable but don't set it, I get "Invalid character value for cast specification". Finally if I set the var, even if the resultset has just one element, I still get the EXCEPTION_ACCESS_VIOLATION.

This is the error from the log

Step 'Copy Data from Results to Results Step' failed

Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:Provider generated code execution exception: EXCEPTION_ACCESS_VIOLATION
Step Error code: 80040005
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:700

I've looked up this error and made sure that the Transform Data Task is executing on the main thread. I think I've done this right. When I put the param in this task, and it's already been filled, I get "No value given for one or more parameters" when attempting to do a preview.

Also, i've noticed that specifying one param, such as id=? in my source query works fine, it's just a rowset that does not work.|||also, it's just come to my attention that I get the same error when running test under the Tranformations tab of the Transform Data Task properties. The type of tranformation is a copy column.

Thanks in advance,
-Kilka|||So it may not be the querying at all but sme problem with the transform itself. Perhaps columns of the wrong data types or something affecting things?

If you completely replace the whole global variable bit and replace it (temporarily) with a static value and then try and execute it what happens?|||I've already tried that with an IN(1,2,3,4,5,5) in my source query. That seems to have worked fine.

I'd rather be doing as little processing in activeX as possible, but it's starting to look like I'll have to. I can just the global vars fine with activeX, but the problem is going to be performance. If anyone can think of anything else, I would be glad to hear it.

I was also thinking about constructing my string in a activeX object before this transformation, but I'm not sure if I'm allowed to use exec in a source like that because DTS won't know what columns I'm selecting much less moving.

Come to think of it, do you think the problem might be that there are no "," between elements of the global var. I think I'm going to try that next.

Thanks again rokslide,
-Kilka|||here's a thought that may or may not work....

what happens if you add an execute sql stask to your dts package and get it to try and execute the sql statement that is in your data transformation task?

does it still have a problem?? if not you could slip the execute sql task n before your transformation and get it to populate a temp table, then you can have your transformation execute a query that joins to the temp table to determine it's records...

just a thought...|||Yeah, it turns out I'm not in a position to do that. I can't create a temp table. I think my solution will be to cycle through the records using an activeX transformation and only copy the ones I need. I know this is a slow and stupid way to do it...single threaded too :( However, thanks for the help.

Cheers,
-kilka|||So now, I've taken to using a string to use my IN clause. however, there is some wierdness.

Assuming 445 is legit:
If I have 0,0,0,0,445 in the IN clause, I get the correct resultset
If I have 445,0, I get nothing
If I have 0,1,0,0,445 in the IN clause, I get nothing.
If I have 445 in the IN clause, it works fine..

Can anyone shed any light on this problem ?

-Kilka|||Can you post the entire sql statement??|||So I figured it out, got things to work dynamically.

So upon further investigation i've discovered that every data transformation object has a datapump task associated with it. The datapump task can have the source sql statement altered under the disconnected edit tool. I also found out that this variable can be edited using the following VB code:

' 205 (Change SourceSQLStatement)
Option Explicit

Function Main()
Dim oPkg, oDataPump, sSQLStatement

' Build new SQL Statement

sSQLStatement = "select * from <table> where ID IN(" & DTSGlobalVariables("instring2").value & ") OR ID IN (" & DTSGlobalVariables("instring3").value & ")"

' Get reference to the DataPump Task
Set oPkg = DTSGlobalVariables.Parent
Set oDataPump = oPkg.Tasks("DTSTask_DTSDataPumpTask_1").CustomTask

' Assign SQL Statement to Source of DataPump
oDataPump.SourceSQLStatement = sSQLStatement

' Clean Up
Set oDataPump = Nothing
Set oPkg = Nothing

Main = DTSTaskExecResult_Success
End Function

I would run this after I built the instring global variables. I then run the activeX task and finally the transformation task. I'm going to post a big howto at some point when I get time as well.

At present however, I'm now stuck with the fact that I can't go:
DTSDestination("CellPhone") = Left(DTSSource("CellPhone"),Len(DTSSource("CellPhone"))-4)

in the transformation. When I hit parse, it works, however when I hit test/execute the package, I get "Invalid procedure call or argument:'Left'" I know for a fact is the second argument that's causing the problem, but can't figure out why this wouldn't be allowed.

Thanks,
-Kilka|||Hi there,

Actually that was kinda what I was meaning, or something similar,... with your lastest problem you need to check for cellphone values that are less then 4 long. if a value is less then 4 (and possibly 4 as well) your call will fail.

Cheers,
Roko