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 |  
                                    | Sniper83Starting 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..? |  |  
                                    | sodeepMaster 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. |  
                                          |  |  |  
                                    | visakh16Very 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 |  
                                          |  |  |  
                                    | Sniper83Starting Member
 
 
                                    5 Posts | 
                                        
                                          |  Posted - 2008-08-13 : 02:43:08 
 |  
                                          | Thank you very much.. I will try that right away.. :) |  
                                          |  |  |  
                                |  |  |  |