dbTalk Databases Forums  

change db at runtime using global variable

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


Discuss change db at runtime using global variable in the microsoft.public.sqlserver.dts forum.



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

Default change db at runtime using global variable - 11-22-2005 , 02:22 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
"destinationobjectname" (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.developersdex.com ***

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: change db at runtime using global variable - 11-22-2005 , 03:27 PM






Yes Catalog on the connection manager is correct

Here is the answer to the other Q

Go into disconnected edit and change the
DestinationObjectName/SourceObjectName to be

Owner.ObjectName instead of db.owner.objectName

Allan

"Test Test" <farooqhs_2000 (AT) yahoo (DOT) com> wrote


Quote:
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
"destinationobjectname" (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.developersdex.com ***


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

Default Re: change db at runtime using global variable - 11-22-2005 , 03:37 PM



Thank you, Allan. It works!!!!



*** Sent via Developersdex http://www.developersdex.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.