Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
astralis
Yak Posting Veteran
62 Posts |
Posted - 2013-03-05 : 23:05:18
|
I've had a SQL Server 2008 Express running for several years with no problem, including adding new databases.Today I went to add a new database and received this message:CREATE DATABASE permission denied in database 'master'. (.Net SqlClient Data Provider)The help files that I've found state that this is a problem when installing SQL Server, but this SQL Server Express has been installed for years and I haven't added or removed any new users on SQL Server nor on Windows.Please advise. |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-03-05 : 23:23:36
|
If you have been able to create databases using the same login in the past, and if nothing else has changed, check if the Windows password has expired.Examine the call stack to see if you get any additional information.Login to SQL Server using SSMS and try to create a database to verify that you are able to do so. |
|
|
astralis
Yak Posting Veteran
62 Posts |
Posted - 2013-03-05 : 23:27:52
|
quote: Originally posted by James K If you have been able to create databases using the same login in the past, and if nothing else has changed, check if the Windows password has expired.
Windows password has not expired. I'm actually creating the database on the server's machine.quote: Examine the call stack to see if you get any additional information.
I'll check but I don't know if I can interpret it.quote: Login to SQL Server using SSMS and try to create a database to verify that you are able to do so.
That's what I was doing on the server's machine. |
|
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-03-05 : 23:45:46
|
Because of the error message I assumed that you were connecting from a .Net client using SMO or ADO.Net etc.If you are using SSMS and still not able to create the database: 1. for testing purposes, connect using a login that has sysadmin privileges and see if that user is able to create databases.2. if they are, then grant privilege to the less privileged user:USE [master]GO GRANT CREATE ANY DATABASE TO TheLessPrivilegedUser; Even though nothing that you know of has changed, obviously something must have - I just don't have enough information to say what that might be. |
|
|
astralis
Yak Posting Veteran
62 Posts |
Posted - 2013-03-06 : 00:33:17
|
Interesting. That user no longer has admin privileges. Instead of using SQL Authentication, I used Windows Authentication, and now I can do what I need to do.But I never removed admin privileges from the user via SQL Authentication and no one but me can access the server.Maybe, just maybe, I've always used Windows Authentication. I would think I'd remember something like that.I appreciate your help.Hopefully this post can help someone for such a simple fix. |
|
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-03-06 : 08:33:01
|
If you are logged in to SSMS on a sysadmin account, and if you are getting that error message, I don't know what could be causing that.If you do find out, can you post back, so all can learn? |
|
|
|
|
|
|
|