Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

How do I alter the database create permissions?

Last post 01-12-2007, 3:27 PM by carlcamera. 1 replies.
Sort Posts: Previous Next
  •  01-10-2007, 3:08 PM 26126

    How do I alter the database create permissions?

    Hello again,

    To continue my previous question, I'm working in a very strict environment in a school's computer lab, and I have to ask the system manager (who doesn't know anything about .net and sqlexperss) for any change. I don't really know the environment (except that it uses Novel) and I don't have much experience with sqlexpress my self. What should I ask for in order to solve the "CREATE DATABASE permission denied in database 'master'" problem?

    Bellow, I tried using different connection strings and got different errors, but I belive that the permission issue is the real problem, am I right?

    Thanks alot,

    Ornit

    connectionString:

     

    ConnectionString = @"Provider=SQLNCLI;Server=localhost\SQLExpress;AttachDbFilename=App_Data\mytry.mdf;Trusted_Connection=Yes";

     

    Error message:

     

    An attempt to attach an auto-named database for file App_Data\mytry.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

     

     

     

    connectionString:

     

    ConnectionString = @"Provider=SQLNCLI;Server=localhost\SQLExpress;AttachDbFilename=C:\Documents and Settings\student\My Documents\Visual Studio 2005\WebSites\WebSite4\App_Data\mytry.mdf;Trusted_Connection=Yes";

     

    Error message:

     

    An attempt to attach an auto-named database for file C:\Documents and Settings\student\My Documents\Visual Studio 2005\WebSites\WebSite4\App_Data\mytry.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
    CREATE DATABASE permission denied in database 'master'.

     

     

     

    connectionString:

     

    ConnectionString = @"Provider=SQLNCLI;Server=localhost\SQLExpress;Database=mytry;Trusted_Connection=Yes";

     

    Error message:

     

    Login failed for user 'CLASS-0301\student'.
    Cannot open database "mytry" requested by the login. The login failed.

     

     

     

    connectionString:

     

    ConnectionString = @"Provider=SQLNCLI;Server=localhost\SQLExpress;Database=mytry;Uid=CLASS-0301\student; Pwd=xxx";

     

    Error message:

     

    Login failed for user 'CLASS-0301\student'. The user is not associated with a trusted SQL Server connection.

     

     

     

    connectionString:

     

    ConnectionString = @"Provider=SQLNCLI;Server=localhost\SQLExpress;AttachDbFilename=|DataDirectory|mytry.mdf;Database=mytry;Trusted_Connection=Yes";

     

    Error message:

     

    An attempt to attach an auto-named database for file "C:\Documents and Settings\student\My Documents\Visual Studio 2005\WebSites\try\App_Data\mytry.mdfDatabase=mytry" failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
    CREATE DATABASE permission denied in database 'master'.
  •  01-12-2007, 3:27 PM 26206 in reply to 26126

    Re: How do I alter the database create permissions?

    
    
    strDataSourceName="Provider=SQLNCLI;Server=(local);Database=dbname;UID=uuu;PWD=zzz;"
     
    ...Try that one. 

    Sincerely,

    Carl
    -----
    vine type - content management with standards in mind - vinetype.com
    -----
    Filed under:
View as RSS news feed in XML