Showing posts with label key. Show all posts
Showing posts with label key. Show all posts

Sunday, March 25, 2012

DTS problem

Hi

I am trying to invoke a dts from asp.net and was informed that I need to create a name key pair file and runtime callable wrapper...which consiste sof changing the command line...but I cannot fine the files. I am using web matrix...which I think is the problem.

Has anyone found the same problems...I am looking for the Bin directory in web matrix and tlbimp.exe.

Any help would really be appreciated.

ThanksIt sounds to me like you are trying to do things the complicated way.

Are you wanting to create a new dts with your asp.Net or just execute an existing dts package?

There are plently of stored procedures you can call via standard ADO to excute existing pacakges, if that's what you want to do.|||Hi

Thanks for your reply...I am just trying to invoke a dts from an asp.net web page...I have searched the internet but cannot find any information on how to do this in vb.

Do you know of any good sites?

Thanks|||But it is an existing DTS package right?|||yeah it is

Thanks|||Well the way I normally run a dts package from asp (and it will work from asp.Net as well) is to create a job to execute the package and then (whenever I want to run it) I make an ADO call to the database using sp_start_job.

Now I know there is another stored proc or something that other people use to run the specific dts (and thus you don't need a job) but I can't remember what it was.

If you want to run things from the command line, why not use dtsrun to execute your package?|||Hi

Thanks for the reply...I have found asp code to run the dts...do you know what asp.net uses instead of the 'set'

Thanks|||just in clude a reference to the component in question, then you should be able to just declare the varible the same way you would any other variable.

set in asp is only used for objects, in theory everything in asp.Net is an object so you don't need to diffientate

so if you are using c# something like... (note it's only like this)

using Data.OLEDB;

will set you reference then.

connection myConn = blah blah blah;

will create your connection object.

HTHsqlsql

Friday, February 24, 2012

DTS is not getting the primary key

Hi All,

Using DTS i have imported the data from sybase to MS SQL server and all the data and tables were imported correctly.But the primary keys are not marked why is it like this?
This is not a one time job and this is meant to be for the customers also.I cannot ask the customers to mark the primary keys themselves. Is there a way to get the keys also.While doing DTS I have marked all the options correctly.

Please help.I am not sure why PKs are skipped (never dealt with DTS-ing from Sybase), but you can script PKs on Sybase side, fix the script to ensure syntactical compatibility, and then attach it as an additional step into your package.|||Hi ,

I saw that thread but I think it dint help me as I am not able to figure out where the transfer objects is. They say it is in DTS after u select the source and destination DB ,but I din't find anything like that in the entire process of it. May be the transfer objects method might be there only in cetain version.
I dunno what to do.
I am using the recent version of MS Sql server.
Please help.

Regards,|||How are you connecting to Sybase ODBC or OLEDB? What version of Sybase are you connecting to?|||Hi,

I am connecting to sybase using ODBC and the version is 6.0.2

Thanks|||What version of Sybase 11.9.2, 12, 12.5? Also, have you tried OLEDB? It's much faster than ODBC.

Friday, February 17, 2012

DTS import question

I have a database table that stores personnel records that is imported from another source. I have SSN as a unique key.

Everyday I import data from a text file via DTS that checks for any updates to my records. If the data is updated I update my records, if there is new records I just add them to my table. The problem is every once in a while a duplicate ssn may appear in the text file I import. This causes my import to fail obviously because of the unique key on SSN. How do I allow DTS to continue and just ignore the problematic SSN? Can I write the conflicting SSN or error to a file somewhere?

if you're using a DTS you can check ifsomething has failed and write to an error log or send an email,however, you can't just continue from where the problem occurred,you'll have to manually check the error and sort it before running itagain.
To configure logging for your package, right click on the package inDTS Designer, select 'Package Properties'. Go to 'Logging' tab. In thistab, specify the error file, as well as the SQL Server to which youwant to log the package execution. When logging to SQL Server, theinformation will be logged into sysdtspackagelog and sysdtssteplogtables in the msdb database.
Taken from http://vyaskn.tripod.com/sql_server_dts_best_practices.htm troubleshooting section.
|||

"One way of doing this would be to create a duplicate loading table. On the
UNIQUE index specify WITHIGNORE_DUP_KEY.
This will allow you to load the rows and SQL server will only load a
distinct version of the row based on that index.

You then push the rows that are processed into the real table "
I got the above from the SQL Server news groups and that was exactly what I thought you should do. Run a search on DTS and IGNORE_DUP_KEY on Google . Hope this helps. For more DTS questions check out the link below.
http://www.sqldts.com