![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hello I am writing myself a tool to compare two SQL Server Databases, to find missing or changed objects. I know such tools exist, but I consider it a learning experience. In a second version, my tool should perhaps be able to copy/replace the objects that need to be updated. I think I understood how to use INFORMATION_SCHEMA.xyz to get a list of tables, columns or views. Question a) What I cannot find out is how to get the source sql statement of a view. Is there a way to retrieve that information? If there is, can it be used for stored procedures or user defined functions as well? Question b) As mentioned above, I would like to "copy" missing objects from one db to the other. What way would be best to do that? Can you "remote control" the enterprise manager, to use its script generation for those objects to be copied? Or is it advised to instruct DTS to duplicate the tables, views and other objects? If so, how? I looked into SQL Server Books online and google, but could not really find a good answer. If someone can post a line of response to my questions, or maybe supply a link explaining the things asked, I would really appreciate it. Thanks (and have a good week) Ralf |
![]() |
| Thread Tools | |
| Display Modes | |
| |