|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I alter the database create permissions?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'. Ornit,
In order to create a database under sql server you have to have rights to the master database because information about your new database exists in there. If you can not get db create rights to the sql process try using the new SQL Express direct mdf reference in your project. -David Sandor Show quote "ornit_s***@yahoo.com" wrote: > 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'. > > > > > > |
|||||||||||||||||||||||