dbTalk Databases Forums  

make DB name soft in ExecuteSQL task

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


Discuss make DB name soft in ExecuteSQL task in the microsoft.public.sqlserver.dts forum.



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

Default make DB name soft in ExecuteSQL task - 08-16-2003 , 11:08 PM






I'm making a bunch of .dts jobs to move info between databases. I'm trying
to keep the DB names soft, so they can be user configured. So far, with the
Transform Data task, I've been able to use the Dynamic Properties task and
reset the Initial Catalog on the source and dest connections.

What I'm having trouble with is how to make the Execute SQL task use soft db
names.

- Rick



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

Default Re: make DB name soft in ExecuteSQL task - 08-17-2003 , 01:04 AM






Why would you need to ? The ExecuteSQL task relates to a connection and you
have "Softed" these. Are you doing X DB stuff inside ?

--


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

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

Default Re: make DB name soft in ExecuteSQL task - 08-17-2003 , 10:05 AM



Hi Allan, and thanks for asking the details.

Yes, the ExecSQL DOES relate to a connection, but only to 1 connection.
Because I'm transfering data from a source to a destination, and the SQL I
need to run needs to touch data in BOTH the source AND destination. Because
the ExecSQL task only relates to 1 connection, I need to specify a database
name in the actual SQL I'm executing.

I guess I don't know what X DB is...
A simplified example of what I'm doing would be:

ExecSQL Task Connection: Destination Connection
ExecSQL Task SQL Statement:
insert into table1
select A.field1, B.field2
from SourceDB.dbo.tableA A
join table2 B on A.fieldx = B.fieldy

In this case, it would be the SourceDB that I want to make soft.

- Rick



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

Default Re: make DB name soft in ExecuteSQL task - 08-17-2003 , 01:25 PM



If you need to do that then either

1. Change the SQLStatement completely of the ExecuteSQL task
2. Build the statement in an Active Script task and let the DB name be a
global variable
3. Have a dedicated connection to the ExecuteSQL task and simply change
it's Catalog property.


--


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support 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.