2 quick questions relating to copying a database from one
sql server 7 to another sql server 7.
1) Does the sp_detachdb and sp_attachdb procedures
copy all the objects/permissions/jobs etc? I've tested
it and it seems to do so but I can't find any ms doco
2) After I copy the database, I want to remove all the
unwanted records. Since there is about 50 tables
involved, I just want to delete the records in the main
table (tblClient) but I cant find much info on cascade
delete in Books Online.
For eg, if tblClient has clients A, B, C, D, E and F.
I want to remove clients A, B and C from the original database on Server1, and remove clients D, E and F from the newly created db on Server 2.
Is there a simple t-sql command which I can use in query analzyer to enable cascade delete and then simply delete the unwanted client from that one table and thus from the remaining tables? I want to avoid creating triggers and manual deletion etc.