Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Sniper83
Starting Member
5 Posts |
Posted - 2008-08-12 : 09:48:10
|
I am using SQL-manager to create queries and the like. I have to check all databases whether a specific table (same name in every database) has a specific field set to identity specification = yes. How can I do that. How can I run a script that runs through every database on the server..? |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-08-12 : 14:25:52
|
You can use Objectproperty() to check whether identity exists in specific table and loop through all tables with sp_MSforeachtable. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-12 : 14:39:37
|
you can use sp_Msforeachdb to run through all dbs in your server |
|
|
Sniper83
Starting Member
5 Posts |
Posted - 2008-08-13 : 02:43:08
|
Thank you very much.. I will try that right away.. :) |
|
|
|
|
|