Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query for administration

Status
Not open for further replies.

penzk001

Technical User
Mar 11, 2003
82
MT
Hi,

I need to run a particular query on all the databases of an enviroment. The report must include the database name which I thing I can obtain it from (
set isolation to dirty read;
database sysmaster;
select name from sysdatabases
where name not in ('sysmaster','sysutils');)
and to check if a user has connect to any database in this database or not (select count(username) from sysusers where username = 'user001';).

How can I implement it, so that I can run an SQL script
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top