sneeri_c
asked on
SQL Database Names
Visual C# Windows Application.
Is it possible and if so how do you query the SQL Database Names when you have the Server Name and Instance?
For instance: I know the server name is SQLSERVER1 and the instance is SQLEXPRESS. How do I get a list of the 3 or 4 databases on that server: master, mydatabase, etc.
Thanks for the help.
Is it possible and if so how do you query the SQL Database Names when you have the Server Name and Instance?
For instance: I know the server name is SQLSERVER1 and the instance is SQLEXPRESS. How do I get a list of the 3 or 4 databases on that server: master, mydatabase, etc.
Thanks for the help.
Used SQL-DMO which provide extensibly feature to manage complete server.
http://www.csharphelp.com/archives2/archive342.html
tried to look this link may be you will get u r answer .......cheers!!!!!!!!!!
tried to look this link may be you will get u r answer .......cheers!!!!!!!!!!
a wise expert once said to use master views rather than tables wherever poss:
SELECT [CATALOG_NAME]
FROM [master].[INFORMATION_SCHE MA].[SCHEM ATA]
SELECT [CATALOG_NAME]
FROM [master].[INFORMATION_SCHE
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select * from master..sysdatabases