Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Azure - How can I select sysdatabases table from master database in SQL Azure?

In SQL Azure, I try this:

select * From master.dbo.sysdatabases

And get this error:

Reference to database and/or server name in 'master.dbo.sysdatabases' is not supported in this version of SQL Server

What should I do to be able to run that query in SQL Azure?

like image 647
DupDup Avatar asked May 23 '13 09:05

DupDup


1 Answers

You use the system view sys.databases (without the master qualification, it is not needed)

The system table sysdatabases has been deprecated since SQL Server 2005 (Azure is a later version) and in any case is not supported on Azure

like image 148
gbn Avatar answered Jan 14 '23 06:01

gbn