Create azure sql user

by Damiaan Peeters 11. June 2012 14:22

Just a small note for myself on creating sql user using the SQL statements.

Connect to the MASTER and create a login.

create login myNewLogin with password = 'myPassword'

The connect to the database itself and give the new login access

create user myNewUser FOR LOGIN myNewLogin

EXEC sp_addrolemember N'db_datareader', N'myNewUser'
EXEC sp_addrolemember N'db_datawriter', N'myNewUser'


There is a lot to read on MSDN

MSSQL error message: "Property Owner is not available for Database [databaseName]"

by Damiaan Peeters 22. June 2008 10:43


When i clicked on the properties of the Database, I got this error on 2 of my Microsoft SQL Server 2005 databases.


TITLE: Microsoft SQL Server Management Studio

Cannot show requested dialog.


Cannot show requested dialog. (SqlMgmt)

Property Owner is not available for Database '[myDatabaseName]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Smo)

For help, click:


I have restored this databases in the past from other server's backup, and my original login is apparerently not available on target server.



You can fix it with 'sp_changedbowner sa'.

I removed '2005' the subject of this post because you can have this error message on the Newer SQL Server 2008 also.

update 2:
The syntax to use in SQL Server Management Studio is:

use myDBName
EXEC sp_changedbowner 'sa'

Certified Umbraco Master, Part of Umbraco Certified partner comm-it, .Net and Azure developer, seo lover. Magician in my spare time.

Month List