dbTalk Databases Forums  

Dynamic Database Name

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


Discuss Dynamic Database Name in the microsoft.public.sqlserver.dts forum.



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

Default Dynamic Database Name - 10-15-2003 , 02:53 PM






My development group has an install program that allows
the user to change the default db name to anything they
want. I need to migrate some Access Data (.mdf file)
from the user's hard drive to the installed database
(always a SQL 2000 db) as the destination database for my
DTS package. The source Access db will remain constant
and is not an issue as it is copied to a directory and
controlled by the install program. My quandry is what to
do if the database name is changed at installation. How
do I dynamically alter the database name for my
destination data source. Any help is appreciated.
Thanks,
Lance

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

Default Re: Dynamic Database Name - 10-15-2003 , 03:07 PM






In article <05e201c39356$0e426a50$a301280a (AT) phx (DOT) gbl>, Lance McCaskey
<lmccaskey (AT) riag (DOT) com> writes
Quote:
My development group has an install program that allows
the user to change the default db name to anything they
want. I need to migrate some Access Data (.mdf file)
from the user's hard drive to the installed database
(always a SQL 2000 db) as the destination database for my
DTS package. The source Access db will remain constant
and is not an issue as it is copied to a directory and
controlled by the install program. My quandry is what to
do if the database name is changed at installation. How
do I dynamically alter the database name for my
destination data source. Any help is appreciated.
Thanks,
Lance
Changing the DataPump Source and Destination Tables
(http://www.sqldts.com/default.aspx?213)

Note the table name by default uses the three part form, so this covers
the DB too. You need to pass the DB name into the package, preferably as
a global variable or else read it from within the package. If you edit
the object to remove the BD name on the DataPump then you can just
change the connection instead, but by default the object name includes
the DB, but this is not required.

--
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   
Lance McCaskey
 
Posts: n/a

Default Re: Dynamic Database Name - 10-15-2003 , 04:39 PM



Thanks Darren. I'll give it a shot.
Quote:
-----Original Message-----
In article <05e201c39356$0e426a50$a301280a (AT) phx (DOT) gbl>,
Lance McCaskey
lmccaskey (AT) riag (DOT) com> writes
My development group has an install program that allows
the user to change the default db name to anything they
want. I need to migrate some Access Data (.mdf file)
from the user's hard drive to the installed database
(always a SQL 2000 db) as the destination database for
my
DTS package. The source Access db will remain constant
and is not an issue as it is copied to a directory and
controlled by the install program. My quandry is what
to
do if the database name is changed at installation. How
do I dynamically alter the database name for my
destination data source. Any help is appreciated.
Thanks,
Lance

Changing the DataPump Source and Destination Tables
(http://www.sqldts.com/default.aspx?213)

Note the table name by default uses the three part form,
so this covers
the DB too. You need to pass the DB name into the
package, preferably as
a global variable or else read it from within the
package. If you edit
the object to remove the BD name on the DataPump then
you can just
change the connection instead, but by default the object
name includes
the DB, but this is not required.

--
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
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.