I am signing in to produce a new database from CMD through sqlcmd with SA account. Its fact is a note: CREATE DATABASE permission refused in database 'master'.

I am using Home windows server 2003 and SQL 2008. Help me. Thanks ahead of time.

It does not seem like you are really while using sa account, otherwise possibly you have not setup your merchandise account correctly using SQL config mgr. Should you refurbished computer Manager Services, then your service might possibly not have permission to produce the database files.

...Run As Administrator should have the desired effect.

Often the user you are using to operate the SQL Server service will not need certain folders, that is likely why you are getting this error.

Consider one of these simple options:

  • alter the qualifications employed for the service (ick!)
  • use runas /u:... or Run as...
  • add permission for that plan to access individuals folders
  • slowly move the database to some location the service can access

I'd check if the user you're using indeed has CREATE DATABASE permission though. You should check what server roles it goes to, since it appears it's not a sysadmin role.

This can be used query for instance.

select suser_name(role_principal_id) [login ...], 
suser_name(member_principal_id) [... belongs to] 
from sys.server_role_members