Author |
Topic |
DaDukeee
Starting Member
4 Posts |
Posted - 2011-05-20 : 15:28:06
|
Hello all I have a small problem,I am using SQL server management studio express I connect to a database engine and when I try to create a new database I get an error: Create database permission denied in database 'master'. microsoft sql server error 262.I am using win 7 and a have a user called Duke with administrator rights.Please help me out,thank you. |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2011-05-20 : 16:16:10
|
are you using the GUI or are you writing code?USE [master]GOIF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'blddistm') BEGIN ALTER DATABASE [blddistm] SET SINGLE_USER WITH ROLLBACK IMMEDIATE DROP DATABASE [blddistm] ENDGO/****** Object: Database [blddistm] Script Date: 12/23/2008 08:35:29 ******/CREATE DATABASE [blddistm] ON PRIMARY ( NAME = N'blddistm_Data', FILENAME = N'D:\Database\PAERSCBVD0402\Default\blddistm.MDF' , SIZE = 20480KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%) LOG ON ( NAME = N'blddistm_Log', FILENAME = N'D:\Database\PAERSCBVD0402\Default\blddistm.LDF' , SIZE = 76736KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%) COLLATE SQL_Latin1_General_CP1_CI_ASGOEXEC dbo.sp_dbcmptlevel @dbname=N'blddistm', @new_cmptlevel=80GOALTER DATABASE [blddistm] SET ANSI_NULL_DEFAULT OFF GOALTER DATABASE [blddistm] SET ANSI_NULLS OFF GOALTER DATABASE [blddistm] SET ANSI_PADDING OFF GOALTER DATABASE [blddistm] SET ANSI_WARNINGS OFF GOALTER DATABASE [blddistm] SET ARITHABORT OFF GOALTER DATABASE [blddistm] SET AUTO_CLOSE OFF GOALTER DATABASE [blddistm] SET AUTO_CREATE_STATISTICS ON GOALTER DATABASE [blddistm] SET AUTO_SHRINK OFF GOALTER DATABASE [blddistm] SET AUTO_UPDATE_STATISTICS ON GOALTER DATABASE [blddistm] SET CURSOR_CLOSE_ON_COMMIT OFF GOALTER DATABASE [blddistm] SET CURSOR_DEFAULT GLOBAL GOALTER DATABASE [blddistm] SET CONCAT_NULL_YIELDS_NULL OFF GOALTER DATABASE [blddistm] SET NUMERIC_ROUNDABORT OFF GOALTER DATABASE [blddistm] SET QUOTED_IDENTIFIER OFF GOALTER DATABASE [blddistm] SET RECURSIVE_TRIGGERS OFF GOALTER DATABASE [blddistm] SET READ_WRITE GOALTER DATABASE [blddistm] SET RECOVERY FULL GOALTER DATABASE [blddistm] SET MULTI_USER GOALTER DATABASE [blddistm] SET TORN_PAGE_DETECTION ON GOALTER DATABASE [blddistm] SET READ_WRITEALTER DATABASE [blddistm] SET MULTI_USERGO Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxWant to help yourself?http://msdn.microsoft.com/en-us/library/ms130214.aspxhttp://weblogs.sqlteam.com/brettk/http://brettkaiser.blogspot.com/ |
 |
|
DaDukeee
Starting Member
4 Posts |
Posted - 2011-05-20 : 16:40:14
|
I am using the GUI and the sequence of code you wrote is not helping. |
 |
|
X002548
Not Just a Number
15586 Posts |
|
DaDukeee
Starting Member
4 Posts |
Posted - 2011-05-20 : 17:09:29
|
I get this when I execute:Msg 262, Level 14, State 1, Line 4CREATE DATABASE permission denied in database 'master'.Msg 15010, Level 16, State 1, Procedure sp_dbcmptlevel, Line 47The database 'blddistm' does not exist. Supply a valid database name. To see available databases, use sys.databases. Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 1User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 2User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 2ALTER DATABASE statement failed.Msg 5011, Level 14, State 5, Line 3User does not have permission to alter database 'blddistm', or the database does not exist.Msg 5069, Level 16, State 1, Line 3ALTER DATABASE statement failed.but by real problem is that even if i run the smallest of sequences i get this: CREATE DATABASE permission denied in database 'master'. |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
|
DaDukeee
Starting Member
4 Posts |
Posted - 2011-05-21 : 07:14:24
|
Thank you so much yes that did the trick |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-05-21 : 07:43:29
|
I'm glad it works now  No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|