dbTalk Databases Forums  

DTS package question..

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS package question.. in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sender
 
Posts: n/a

Default DTS package question.. - 09-18-2003 , 04:58 PM






I have created a package and saved it in a .dts file. Everything is working
fine. The packages copies the data from a table called Customers in a Excel
file. I copied the package to another SQL Sever machine which has the same
database. I can execute the package there also. So far so good.

Now here is the problem. For example, on my SQL Server the databasename is
"MY_DATABASE" and in another SQL Server (another machine) the databasename
is "YOUR_DATABASE" (however the name of the table i.e. CUSTOMERS is same in
both the databases) . How can I specify the DATABASE NAME when I execute a
package using DTSRUN utility.

Please tell me the steps.

Thanks.



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS package question.. - 09-18-2003 , 05:13 PM






In article <OEiZPAjfDHA.892 (AT) TK2MSFTNGP12 (DOT) phx.gbl>, Sender
<user (AT) domain (DOT) com> writes
Quote:
I have created a package and saved it in a .dts file. Everything is working
fine. The packages copies the data from a table called Customers in a Excel
file. I copied the package to another SQL Sever machine which has the same
database. I can execute the package there also. So far so good.

Now here is the problem. For example, on my SQL Server the databasename is
"MY_DATABASE" and in another SQL Server (another machine) the databasename
is "YOUR_DATABASE" (however the name of the table i.e. CUSTOMERS is same in
both the databases) . How can I specify the DATABASE NAME when I execute a
package using DTSRUN utility.

Please tell me the steps.

Thanks.

When calling DTSRUN you can use the /A parameter to set a global
variable in your package. You can then use the Dynamic Properties task
to set change a task property value and set it to a global variable
value.

So using /A pass a value of [databasename].[dbo].[Customers] into a
global variable, and use the Dynamic Properties task to set the
SourceObjectName property of your DataPump task with this global
variable.

You could just pass in the database name via /A and override the
connection's database (Catalog property) but for this to work you would
first have to use Disconnected Edit to change the DataPump tasks
SourceObjectName property and remove the database part from the object
name, as by default the DataPump task uses a three part name for the
SourceObjectName property.

Make sense?

If you want help with the dtsrun command line syntax, try the DTSRUNUI
tool. Just type DTSRUNUI in the Windows Run command box. Select the
package and click Advanced. Use the command line generation option
available.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #3  
Old   
sql_master
 
Posts: n/a

Default Re: DTS package question.. - 10-20-2003 , 04:33 PM




Another way to solve this is to use data link connections.

Unfortunatly you should have to modify your package again :-(

The main idea is to have udl files with the connection properties, which
can be easily modifyied in other servers.


--
Posted via http://dbforums.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.