Home > Archive > MS SQL Server DTS > November 2005 > change db at runtime using global variable









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author change db at runtime using global variable
Test Test

2005-11-22, 8:24 pm

Hello!

Using Dynamic Properties Task, how do I change db name at runtime using
global variable? My DTS pkg has two connections. All I am trying is to
change the db name at run time for a target connection. So, I set up a
global variable "gvDB" on "Catalog" (is this correct?) on the target
connection. I ran the package. The package did change the Catalog name
with the new db name but it did not work bc the "data pump" which has
" destinationobjectnam
e" (dbname.dbo.tablename) property showing the old
dbname tablename. How do I change that? Why "gvDB" did not change
destination db name? What I am missing?

Thanks for your help!



*** Sent via Developersdex http://www.droptable.com ***
Allan Mitchell

2005-11-22, 8:24 pm

Yes Catalog on the connection manager is correct

Here is the answer to the other Q

Go into disconnected edit and change the
DestinationObjectNam
e/SourceObjectName to be

Owner.ObjectName instead of db.owner.objectName

Allan

"Test Test" <farooqhs_2000@yahoo.com> wrote in message
news:#c1m#J67FHA.1000@tk2msftngp13.phx.gbl:

> Hello!
>
> Using Dynamic Properties Task, how do I change db name at runtime using
> global variable? My DTS pkg has two connections. All I am trying is to
> change the db name at run time for a target connection. So, I set up a
> global variable "gvDB" on "Catalog" (is this correct?) on the target
> connection. I ran the package. The package did change the Catalog name
> with the new db name but it did not work bc the "data pump" which has
> " destinationobjectnam
e" (dbname.dbo.tablename) property showing the old
> dbname tablename. How do I change that? Why "gvDB" did not change
> destination db name? What I am missing?
>
> Thanks for your help!
>
>
>
> *** Sent via Developersdex http://www.droptable.com ***


Test Test

2005-11-22, 8:24 pm

Thank you, Allan. It works!!!!



*** Sent via Developersdex http://www.droptable.com ***
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com