Monday, March 12, 2012
Fastest way to convert scripts to use Linked Server?
have to manually modify all of our T-SQL scripts to use Fully qualified
Linked Server Name in order to reference the new database on the new
server. The problem is that this is a very slow update process because
we have to be very careful on which parts of the SQL statment should be
modified. I wonder if is there fastest way or tool available to do this
kind of update?.
Thanks
Rod"Rodusa" <rclwebdesign@.yahoo.com> wrote in message
news:1133198377.065427.178720@.g49g2000cwa.googlegroups.com...
> We recently migrated one of our databases to a new server and now we
> have to manually modify all of our T-SQL scripts to use Fully qualified
> Linked Server Name in order to reference the new database on the new
> server. The problem is that this is a very slow update process because
> we have to be very careful on which parts of the SQL statment should be
> modified. I wonder if is there fastest way or tool available to do this
> kind of update?.
>
In SQL Server 2005 you can use synonyms to provide transparent naming of
remote objects. This works for objects in other schemas, databases and
servers.
On the local server retain the old database and replace each table with a
synonym pointing to the table on the linked server. You won't have to
change a line of code.
David|||We don't have SQL 2005.. That indicates that I will have to stick to
the same process..
Thanks
Fastest way to build a database out of SQL scripts
out of SQL scripts.
The SQL scripts contain the create tables, views, stored
procedures, triggers, constraints, and the tables DATA
records.
What are my options? isql? osql? are there other ways?
Thank youHi
Using the command line utility unless you specify the :r option for the list
of files you are most likely to be creating a connection for each script.
Check out http://tinyurl.com/5299q
You can use a program that uses DMO (or ADO) to open each file and then
execute the commands within them, this can re-use a single connection, and
so be faster.
John
"serge" <sergea@.nospam.ehmail.com> wrote in message
news:pJ%qe.22686$Es6.203309@.wagner.videotron.net.. .
> What is the fastest way to generate an SQL 2000 database
> out of SQL scripts.
> The SQL scripts contain the create tables, views, stored
> procedures, triggers, constraints, and the tables DATA
> records.
> What are my options? isql? osql? are there other ways?
> Thank you|||Hi
Using the command line utility unless you specify the :r option for the list
of files you are most likely to be creating a connection for each script.
Check out http://tinyurl.com/5299q
You can use a program that uses DMO (or ADO) to open each file and then
execute the commands within them, this can re-use a single connection, and
so be faster.
John
"serge" <sergea@.nospam.ehmail.com> wrote in message
news:pJ%qe.22686$Es6.203309@.wagner.videotron.net.. .
> What is the fastest way to generate an SQL 2000 database
> out of SQL scripts.
> The SQL scripts contain the create tables, views, stored
> procedures, triggers, constraints, and the tables DATA
> records.
> What are my options? isql? osql? are there other ways?
> Thank you|||There is a tool called DB Ghost that builds databases from individual
drop/create scripts (schema) and static data insert scripts (data) and
it is, by far, the fastest method to build a database. It beats hand
coded scripts executed via QA or osql by a long way.
DB Ghost can also compare databases, produce a delta upgrade script and
it is possible to execute it via the command line which means that one
tool can give you a fully automated database change management
solution. When you keep the drop/create scripts in a source control
system you also get a full audit trail of changes made.
It's a very powerful way of making changes to SQL Server databases, I
highly recommend you check it out.
Malc|||There is a tool called DB Ghost that builds databases from individual
drop/create scripts (schema) and static data insert scripts (data) and
it is, by far, the fastest method to build a database. It beats hand
coded scripts executed via QA or osql by a long way.
DB Ghost can also compare databases, produce a delta upgrade script and
it is possible to execute it via the command line which means that one
tool can give you a fully automated database change management
solution. When you keep the drop/create scripts in a source control
system you also get a full audit trail of changes made.
It's a very powerful way of making changes to SQL Server databases, I
highly recommend you check it out.
Malc|||> Using the command line utility unless you specify the :r option for the
list
> of files you are most likely to be creating a connection for each script.
> Check out http://tinyurl.com/5299q
> You can use a program that uses DMO (or ADO) to open each file and then
> execute the commands within them, this can re-use a single connection, and
> so be faster.
Thank you John.|||> Using the command line utility unless you specify the :r option for the
list
> of files you are most likely to be creating a connection for each script.
> Check out http://tinyurl.com/5299q
> You can use a program that uses DMO (or ADO) to open each file and then
> execute the commands within them, this can re-use a single connection, and
> so be faster.
Thank you John.