dbTalk Databases Forums  

Hello guys

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


Discuss Hello guys in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
eleftheriak@hotmail.com
 
Posts: n/a

Default Hello guys - 02-21-2005 , 07:57 AM






Do you know how to back up all the DTS packages automatically without
having to put the server name inside the VBscript?

Thanks in advance

BIBIBO


Reply With Quote
  #2  
Old   
Ed Enstrom
 
Posts: n/a

Default Re: Hello guys - 02-21-2005 , 08:30 AM






eleftheriak (AT) hotmail (DOT) com wrote:
Quote:
Do you know how to back up all the DTS packages automatically without
having to put the server name inside the VBscript?

Thanks in advance

BIBIBO
Not sure if this will help you, but I never use the real server name in a script
or DTS package. I always use an alias name (CName). In fact, I do it at the
level of the database. With this approach, I can move a db and its associated
scripts and packages to a different machine and everything continues to work.
All I have to do is change the DNS entry to point to the new machine. This
works for SQL Server, mapped drives, client ODBC connections, etc.

For example, I recently moved my company's data warehouse database to a new,
faster server. All apps referred to "DWprod" as the server name, which was
really an alias. After moving the db, we changed the DNS entry for "DWprod"
and everthing worked fine.

You can also add an entry in the HOSTS file on the machine where your script is
running to point to the target server. By changing the HOSTS file entry every
time you run the script, you can run the same script and have it operate on
different servers. You should run ipconfig/flushdns to clear the cache after
you change HOSTS. Remember to remove the HOSTS file entry when you are done.

HTH

Ed





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

Default Re: Hello guys - 02-21-2005 , 01:16 PM



Nice trick

You can also create an alias using cliconfg and use the same way.

As for the original post of can you move and change in one go then the
answer is no.

Ideally things like Servername should be as has been mentioned i.e.
controlled outside of the package or you should set the package up to
look somewhere to fond the server names and then set internally.




"eenstrom (AT) optonline (DOT) net" <eenstrom (AT) optonline (DOT) net> wrote

Quote:
eleftheriak (AT) hotmail (DOT) com wrote:
Do you know how to back up all the DTS packages automatically without
having to put the server name inside the VBscript?

Thanks in advance

BIBIBO

Not sure if this will help you, but I never use the real server name in a
script
or DTS package. I always use an alias name (CName). In fact, I do it at
the
level of the database. With this approach, I can move a db and its
associated
scripts and packages to a different machine and everything continues to
work.
All I have to do is change the DNS entry to point to the new machine.
This
works for SQL Server, mapped drives, client ODBC connections, etc.

For example, I recently moved my company's data warehouse database to a
new,
faster server. All apps referred to "DWprod" as the server name, which
was
really an alias. After moving the db, we changed the DNS entry for
"DWprod"
and everthing worked fine.

You can also add an entry in the HOSTS file on the machine where your
script is
running to point to the target server. By changing the HOSTS file entry
every
time you run the script, you can run the same script and have it operate
on
different servers. You should run ipconfig/flushdns to clear the cache
after
you change HOSTS. Remember to remove the HOSTS file entry when you are
done.

HTH

Ed


Reply With Quote
  #4  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: Hello guys - 02-22-2005 , 08:22 AM



Do you have an example of setting it internally ?

is it active x + parameter + connection

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

Quote:
Nice trick

You can also create an alias using cliconfg and use the same way.

As for the original post of can you move and change in one go then the
answer is no.

Ideally things like Servername should be as has been mentioned i.e.
controlled outside of the package or you should set the package up to
look somewhere to fond the server names and then set internally.




"eenstrom (AT) optonline (DOT) net" <eenstrom (AT) optonline (DOT) net> wrote in message
news:eenstrom (AT) optonline (DOT) net:
eleftheriak (AT) hotmail (DOT) com wrote:
Do you know how to back up all the DTS packages automatically without
having to put the server name inside the VBscript?

Thanks in advance

BIBIBO

Not sure if this will help you, but I never use the real server name in
a
script
or DTS package. I always use an alias name (CName). In fact, I do it
at
the
level of the database. With this approach, I can move a db and its
associated
scripts and packages to a different machine and everything continues to
work.
All I have to do is change the DNS entry to point to the new machine.
This
works for SQL Server, mapped drives, client ODBC connections, etc.

For example, I recently moved my company's data warehouse database to a
new,
faster server. All apps referred to "DWprod" as the server name, which
was
really an alias. After moving the db, we changed the DNS entry for
"DWprod"
and everthing worked fine.

You can also add an entry in the HOSTS file on the machine where your
script is
running to point to the target server. By changing the HOSTS file entry
every
time you run the script, you can run the same script and have it operate
on
different servers. You should run ipconfig/flushdns to clear the cache
after
you change HOSTS. Remember to remove the HOSTS file entry when you are
done.

HTH

Ed




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

Default Re: Hello guys - 02-22-2005 , 12:58 PM



OK So you can either use the Dynamic properties task to query an
external source or if you are using SQL Server 7 (or 2000) you can grab
it yourself into a variable and do something like

DTSGlobalVariables.Parent.Connection("My Text File
Connection").DataSource = DTSGlobalVariables("File Name).Value






"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote

Quote:
Do you have an example of setting it internally ?

is it active x + parameter + connection

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:umJM7kEGFHA.1932 (AT) TK2MSFTNGP14 (DOT) phx.gbl...
Nice trick

You can also create an alias using cliconfg and use the same way.

As for the original post of can you move and change in one go then the
answer is no.

Ideally things like Servername should be as has been mentioned i.e.
controlled outside of the package or you should set the package up to
look somewhere to fond the server names and then set internally.




"eenstrom (AT) optonline (DOT) net" <eenstrom (AT) optonline (DOT) net> wrote in message
news:eenstrom (AT) optonline (DOT) net:
eleftheriak (AT) hotmail (DOT) com wrote:
Do you know how to back up all the DTS packages automatically
without
having to put the server name inside the VBscript?

Thanks in advance

BIBIBO

Not sure if this will help you, but I never use the real server name
in
a
script
or DTS package. I always use an alias name (CName). In fact, I do
it
at
the
level of the database. With this approach, I can move a db and its
associated
scripts and packages to a different machine and everything continues
to
work.
All I have to do is change the DNS entry to point to the new
machine.
This
works for SQL Server, mapped drives, client ODBC connections, etc.

For example, I recently moved my company's data warehouse database to
a
new,
faster server. All apps referred to "DWprod" as the server name,
which
was
really an alias. After moving the db, we changed the DNS entry for
"DWprod"
and everthing worked fine.

You can also add an entry in the HOSTS file on the machine where
your
script is
running to point to the target server. By changing the HOSTS file
entry
every
time you run the script, you can run the same script and have it
operate
on
different servers. You should run ipconfig/flushdns to clear the
cache
after
you change HOSTS. Remember to remove the HOSTS file entry when you
are
done.

HTH

Ed



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.