dbTalk Databases Forums  

Moving Packages Between Servers

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


Discuss Moving Packages Between Servers in the microsoft.public.sqlserver.dts forum.



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

Default Moving Packages Between Servers - 02-05-2004 , 11:19 AM






I saved my packages as dta files to allow easy transfer between SQL servers.
The problem I have is that the server name I created the package on is
stored inside the connection. My thought is to use dynamic properties to
change this setting but I am having problems with that.

Is there a way to get the SQL instance name that is currently running the
package? For instance if I run it on my production system I get back SQLPROD
but if I run it on my development box I get SQLDEV. I thought about using an
environment variable, but I actually run two instances (QA and Dev) on the
same system. Then I thought about using an ini file but the full path to the
file is stored in the package and that is slightly different between the
systems.

Any thoughts?



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

Default Re: Moving Packages Between Servers - 02-05-2004 , 01:49 PM






The package runs on the PC/Server on which you press GO.

So setting it to the PRD server is all well and good so long as the job is
scheduled otherwise you will get back the calling PC.

If using 2000 you could read HOST_NAME() into a global variable through an
ExecuteSQL task and then assign that tp the correct property.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jason Callas" <JayCallas (AT) hotmail (DOT) com> wrote

Quote:
I saved my packages as dta files to allow easy transfer between SQL
servers.
The problem I have is that the server name I created the package on is
stored inside the connection. My thought is to use dynamic properties to
change this setting but I am having problems with that.

Is there a way to get the SQL instance name that is currently running the
package? For instance if I run it on my production system I get back
SQLPROD
but if I run it on my development box I get SQLDEV. I thought about using
an
environment variable, but I actually run two instances (QA and Dev) on the
same system. Then I thought about using an ini file but the full path to
the
file is stored in the package and that is slightly different between the
systems.

Any thoughts?





Reply With Quote
  #3  
Old   
Jason Callas
 
Posts: n/a

Default Re: Moving Packages Between Servers - 02-05-2004 , 02:16 PM



Thanks for responding Alan.

HOST_NAME does not work because I have two instances of SQL on the same box.
One is referenced SERVERNAME and the other is SERVERNAME\instance.

I did find a solution. With 2000, I am able to pass in global variable
values as part of the command line. When I set up the job, I set the entry
to pass in the @@SERVENAME variable. That way, whichever server I am
creating the job on gets the correct value.

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
The package runs on the PC/Server on which you press GO.

So setting it to the PRD server is all well and good so long as the job is
scheduled otherwise you will get back the calling PC.

If using 2000 you could read HOST_NAME() into a global variable through an
ExecuteSQL task and then assign that tp the correct property.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jason Callas" <JayCallas (AT) hotmail (DOT) com> wrote in message
news:Oe1y1wA7DHA.2416 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I saved my packages as dta files to allow easy transfer between SQL
servers.
The problem I have is that the server name I created the package on is
stored inside the connection. My thought is to use dynamic properties to
change this setting but I am having problems with that.

Is there a way to get the SQL instance name that is currently running
the
package? For instance if I run it on my production system I get back
SQLPROD
but if I run it on my development box I get SQLDEV. I thought about
using
an
environment variable, but I actually run two instances (QA and Dev) on
the
same system. Then I thought about using an ini file but the full path to
the
file is stored in the package and that is slightly different between the
systems.

Any thoughts?







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

Default Re: Moving Packages Between Servers - 02-05-2004 , 02:27 PM



Correct you can also do that You could read that in though in the package as
well to a global variable. Either way is good though

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jason Callas" <JayCallas (AT) hotmail (DOT) com> wrote

Quote:
Thanks for responding Alan.

HOST_NAME does not work because I have two instances of SQL on the same
box.
One is referenced SERVERNAME and the other is SERVERNAME\instance.

I did find a solution. With 2000, I am able to pass in global variable
values as part of the command line. When I set up the job, I set the entry
to pass in the @@SERVENAME variable. That way, whichever server I am
creating the job on gets the correct value.

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:%23vNm5CC7DHA.2764 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
The package runs on the PC/Server on which you press GO.

So setting it to the PRD server is all well and good so long as the job
is
scheduled otherwise you will get back the calling PC.

If using 2000 you could read HOST_NAME() into a global variable through
an
ExecuteSQL task and then assign that tp the correct property.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jason Callas" <JayCallas (AT) hotmail (DOT) com> wrote in message
news:Oe1y1wA7DHA.2416 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I saved my packages as dta files to allow easy transfer between SQL
servers.
The problem I have is that the server name I created the package on is
stored inside the connection. My thought is to use dynamic properties
to
change this setting but I am having problems with that.

Is there a way to get the SQL instance name that is currently running
the
package? For instance if I run it on my production system I get back
SQLPROD
but if I run it on my development box I get SQLDEV. I thought about
using
an
environment variable, but I actually run two instances (QA and Dev) on
the
same system. Then I thought about using an ini file but the full path
to
the
file is stored in the package and that is slightly different between
the
systems.

Any thoughts?









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.