This script was created for an Oracle to SQL 2005 migration. It creates a table, and then populates it with the record counts for each table in a given schema. (You will need to replace the xxxx text with your schema name for it to work). I prefer populating a table with this data, then […]
2007-09-24 (first published: 2007-05-24)
1,017 reads
After migrating an Oracle database to SQL 2005, all the identity values were not properly set. This script goes through and sets them all to 1 greater than the max value in the identity column.
2007-09-21 (first published: 2007-05-24)
442 reads
This is how I pull record counts for every user table in a DB... some of my tables are very large and this works for table with our without index very fast.
2007-09-20 (first published: 2007-05-24)
2,950 reads
This script will DELETE ALL constraints within the database that you define and in the following order: Foreign Key, Primary Key and then Unique Key.CAUTION:This script does not print out the ALTER TABLE statements, it drop the constraints immediately, therefore backup your database before testing or using this script. I ran the script below and […]
2007-09-19 (first published: 2007-05-23)
4,077 reads
I made some modifications to D Simmon's original sp. 1. I added dynamic feature to query tables in other databases (not linked servers) from one sp. I know dynamic sql isn't preferable in most cases but this is the route I took for this. 2. I enabled table name to be sent with owner qualification […]
2007-09-18 (first published: 2007-05-22)
602 reads