Wrox Programmer Forums
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 3rd, 2004, 03:35 AM
Authorized User
 
Join Date: May 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jitu
Default New to DTS

Dear p2p participants.

RE: [iMoving Data from Sybase (ODBC) to SQL Server using VB.NET][/i]

I wonder if you can help me with the following problem.

I would like to transfer data from a ODBC Database i.e. Sybase to my SQL Server 2000 database. I can run this from a DTS Import/Export wizard however I would like to put this into an application so that end users do require permissions to complete this task.

The problem is that the source data is not the same every time therefore a part of the application allows the user to enter a SELECT Statement which will query the source database and then it will need to dynamically create the tables on the destination database and then populate them with the data.

Is there any good examples on how to achieve the above?

I have looked at the generated bas file which maps the table as part of the script i.e.

    oCustomTask1.Name = "Create Table TEST_V324_Data Task"
    oCustomTask1.Description = "Create Table TEST_V324_Data Task"
    oCustomTask1.SQLStatement = "CREATE TABLE [TEST_V324_Data] (" & vbCrLf
    oCustomTask1.SQLStatement = oCustomTask1.SQLStatement & "[TraId] varchar (10) NOT NULL, " & vbCrLf
    oCustomTask1.SQLStatement = oCustomTask1.SQLStatement & "[OwnTab] varchar (9) NOT NULL, " & vbCrLf
    oCustomTask1.SQLStatement = oCustomTask1.SQLStatement
....

However since we do not now which tables are going to be selected we cannot hard code the mapping.

Any information / guidance would be greatly appreciated.

thank you in advance.

thanks




Jitu Tivari
__________________
Jitu Tivari
 
Old June 3rd, 2004, 09:02 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Like I asked before:

WHY are you doing it this way? Why can't you just Query Sybase- why do you need it in SQL server?

Why can't you just use a DTS package to transfer ALL of the data out of Sybase and they Query Sql Server?

What your trying to do seems so outside of a normal proccess- there are no examples for it. I expect it to be difficult to do.. And I'd like to come up with another SOLUTION to the business challenge you have, rather than encourage you to do something the wrong way.


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old June 3rd, 2004, 10:06 AM
Authorized User
 
Join Date: May 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jitu
Default

Hi

Thank you for your reply.

We are not allowed to use the SYBASE database. currently we are outputing the data into a text file and then comparing them.

do you know of any good docs/Books/tutorials on how to compare the datasets and then re-apply them to the database?

I do not mind using the Import/Export Wizard in \MSSQL server however in the future i would like to automate that as much as possible.


thanks


Jitu Tivari

Jitu Tivari
 
Old June 3rd, 2004, 01:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

You can create a job that runs the DTS package.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee





Similar Threads
Thread Thread Starter Forum Replies Last Post
What is DTS? galaxy@net SQL Server DTS 4 November 26th, 2007 05:14 AM
New to DTS jasimbo SQL Server DTS 0 October 7th, 2005 06:28 AM
New to DTS nals SQL Server DTS 3 May 18th, 2005 04:06 PM
dts calls a lot of dts steffi_ma SQL Server DTS 2 May 24th, 2004 07:18 PM
DTS problem :( meemee SQL Server 2000 1 March 4th, 2004 06:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.