SQL - overwrite all sql objects with new ones

ASHISH SINGH 21 Reputation points
2021-07-12T04:35:46.5+00:00

Hi, We are migrating our SQL data warehouse on new contract where we need to recreate all our sql objects like tables, table columns and store procedures with new name.
Here is example -

113613-image.png

Table structure and store procedure logic will remain same so can i have any dynamic query which can migrate all sql objects with new name.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,678 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,552 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Cris Zhan-MSFT 6,601 Reputation points
    2021-07-12T05:54:21.353+00:00

    Hi,

    If there are not many objects that need to be modified, you can use the Generate Script Wizard in SSMS to output the scripts to a new query window or file, then use search and replace the old name with the new name.

    0 comments No comments