Could not create table on 'master' database

Hello,

     I am new to the SQL Azure. When I tried to create table on master DB, i get following error.

Msg 262, Level 14, State 1, Line 1CREATE TABLE permission denied in database 'master'.

I tried to change role to 'db_owner' but have received following error.

Msg 15151, Level 16, State 1, Line 1Cannot alter the role 'db_owner', because it does not exist or you do not have permission.

I logged into master DB using the credentials I created while creating DB on the Azure. This is supposed to be 'sa'.

My question is, does SQL Azure allow to create objects (tables, stores procedures, triggers) on master DB. If yes, what am I doing wrong? If no, why?

My guess is that SQL Azure is not less than the On premises DB. It must be allowing objects creation on master DB.

I have found a similar question on forum but I did not get the answer. Here is the link --> https://social.msdn.microsoft.com/Forums/azure/en-US/cbff1bd2-358f-4106-b238-ec369941099d/master-database-cannot-alter-the-role-dbowner.

FYI, I have gone through following resources but haven't got solution for my problem.

1) https://iainhunter.wordpress.com/2011/06/20/copying-databases-and-creating-users-and-logins-for-sql-azure/

2) http://www.c-sharpcorner.com/forums/thread/126589/create-database-permission-denied-in-database-master.aspx

3) http://stackoverflow.com/questions/20656943/how-do-you-change-the-owner-of-an-azure-database

4) https://msdn.microsoft.com/en-us/library/azure/ee336235.aspx

Thanks in advance.

February 4th, 2015 7:49am

Hi amtindia,

For all intents and purposes, master is a read-only DB.  Master is a system database that is created per logical server in Azure SQL Database.  The two main purposes of master are 1) managing logins for your server's databases allowing you to create, alter, and drop logins and 2) providing read-only views of DMVs/metrics/metadata.  You are not charged for master and thus the restriction on creating tables/stored procs/triggers.


Free Windows Admin Tool Kit Click here and download it now
February 4th, 2015 9:11am

Hi amtindia,

For all intents and purposes, master is a read-only DB.  Master is a system database that is created per logical server in Azure SQL Database.  The two main purposes of master are 1) managing logins for your server's databases allowing you to create, alter, and drop logins and 2) providing read-only views of DMVs/metrics/metadata.  You are not charged for master and thus the restriction on creating tables/stored procs/triggers.


February 4th, 2015 9:13am

Hi amtindia,

For all intents and purposes, master is a read-only DB.  Master is a system database that is created per logical server in Azure SQL Database.  The two main purposes of master are 1) managing logins for your server's databases allowing you to create, alter, and drop logins and 2) providing read-only views of DMVs/metrics/metadata.  You are not charged for master and thus the restriction on creating tables/stored procs/triggers.


Free Windows Admin Tool Kit Click here and download it now
February 4th, 2015 5:10pm

Hi amtindia,

For all intents and purposes, master is a read-only DB.  Master is a system database that is created per logical server in Azure SQL Database.  The two main purposes of master are 1) managing logins for your server's databases allowing you to create, alter, and drop logins and 2) providing read-only views of DMVs/metrics/metadata.  You are not charged for master and thus the restriction on creating tables/stored procs/triggers.


February 4th, 2015 5:10pm

Hi amtindia,

For all intents and purposes, master is a read-only DB.  Master is a system database that is created per logical server in Azure SQL Database.  The two main purposes of master are 1) managing logins for your server's databases allowing you to create, alter, and drop logins and 2) providing read-only views of DMVs/metrics/metadata.  You are not charged for master and thus the restriction on creating tables/stored procs/triggers.


Free Windows Admin Tool Kit Click here and download it now
February 4th, 2015 5:10pm

Hi amtindia,

For all intents and purposes, master is a read-only DB.  Master is a system database that is created per logical server in Azure SQL Database.  The two main purposes of master are 1) managing logins for your server's databases allowing you to create, alter, and drop logins and 2) providing read-only views of DMVs/metrics/metadata.  You are not charged for master and thus the restriction on creating tables/stored procs/triggers.


February 4th, 2015 5:10pm


My question is, does SQL Azure allow to create objects (tables, stores procedures, triggers) on master DB. If yes, what am I doing wrong? If no, why?

My guess is that SQL Azure is not less than the On premises DB. It must be allowing objects creation on master DB.

For the answer of the question, you can read Joseph's. Azure SQL, so far, is less than the premise DB except its cloud-based advantage. There're many limitations like less T-SQL features supported. Azure SQL Database Transact-SQL Reference

more links for your reference.
Preview features
Managing Databases and Logins in Azure SQL Database


February 5th, 2015 1:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics