G
Guest
I have an SQL Server Database with about 125 tables. Each table has an
Identity Column and there are many Relationships setup. I need to create a
stored procedure thta will step through each table and delete the data from
each table and reseed the Identity Column to 1.
I'd like my stored procedure to just step through each table without regards
to the order of the table. This is because I want the procedure to continue
to work after I add additional tables.
Is there a streamlined process that will delete the data from every table
and reseed every Identity Column back to 1?
Any help with a solution for this would be greatly appreciated.
FYI: I have created a script that will rebuild my database from scatch. It
appears to build the database fine, but once I start testing my application
new errors appear, that don't appear in my test database. Plus, for some
reason, some tables just can't be accessed from Microsoft Access. So, using
the script like ths for now is not an option.
In summary, I need to be able to delete all test data from my database so
that I can import new data and send to a customer.
Any help will be greatly appreciated.
Greg
Identity Column and there are many Relationships setup. I need to create a
stored procedure thta will step through each table and delete the data from
each table and reseed the Identity Column to 1.
I'd like my stored procedure to just step through each table without regards
to the order of the table. This is because I want the procedure to continue
to work after I add additional tables.
Is there a streamlined process that will delete the data from every table
and reseed every Identity Column back to 1?
Any help with a solution for this would be greatly appreciated.
FYI: I have created a script that will rebuild my database from scatch. It
appears to build the database fine, but once I start testing my application
new errors appear, that don't appear in my test database. Plus, for some
reason, some tables just can't be accessed from Microsoft Access. So, using
the script like ths for now is not an option.
In summary, I need to be able to delete all test data from my database so
that I can import new data and send to a customer.
Any help will be greatly appreciated.
Greg