M
M
MazzyBob2015-03-25 07:29:22
SQL
MazzyBob, 2015-03-25 07:29:22

How to change the server name in all SQL views, stored procedures and functions?

When developing on MS SQL 2000, the full path to the tables, [server name].[database].[table] was specified in views, stored procedures and functions. Now I am raising a copy of the Databases for testing, and from several, and each is connected to each other. But since server name other requests do not work.
How to change the server name in all SQL views, stored procedures and functions?
By hand is the last option.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
velnick, 2015-03-26
@MazzyBob

I would try to upload procedures and functions to a file via the context menu of the database -> Tasks->Generate Scripts..., and in the file, change what you need by mass replacement. And then roll the resulting script to your test base.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question