From: Roy Goldhammer on
Hello there

I have database with over 200 tables, 50 views, 600 procedures, 150 funtions
and 20 triggers.

as a demen from my manager i need to transfer it to database with 10 schemas
with some list of what is going to relate to some schema.

To move objects to some schema is simple but to change it in all the objects
of database can take me weeks.

Is there a better way to do this?


From: Erland Sommarskog on
Roy Goldhammer (royg(a)yahoo.com) writes:
> I have database with over 200 tables, 50 views, 600 procedures, 150
> funtions and 20 triggers.
>
> as a demen from my manager i need to transfer it to database with 10
> schemas with some list of what is going to relate to some schema.
>
> To move objects to some schema is simple but to change it in all the
> objects of database can take me weeks.
>
> Is there a better way to do this?

Sounds like you should look at www.downloads.com for search/replace
tools. You have all source code under version control I hope? Check
it out let the tool loose on the files. One such tool is WildEdit,
available from www.textpad.com.

If you don't have the code under version control but only in SQL Server,
script it out to individual files. Put it under version control while
you're at it.


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx