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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Problem creating a database in sql

Author  Topic 

pats
Starting Member

10 Posts

Posted - 2011-05-28 : 11:27:03
Hello everyone.. I am a new member.. Anyway, I am having this problem recently in my laptop. I installed SQL Server 2005 Express Edition and SQL Server Management Studio Express. The installation was successful but when I try to create a new database, it keeps on executing and I wasn't able to create a new one. I already have this installed in my laptop before and I used this in making my project but all of a sudden I cannot create a new database.. So what I did was reinstalled everything but I can't still create a new database.. What's the possible problem of this? By the way, I am using Windows 7 Home Basic.. 64 bit..

I hope you can help me with my problem because I am stuck and I have a project to do.. Thank you in advance.! :D

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-05-28 : 11:30:40
How are you trying to create the database?

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

pats
Starting Member

10 Posts

Posted - 2011-05-28 : 11:44:50
Right click on Database and select New Database.. I'm sorry I'm still new with this..
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-05-28 : 12:18:26
try a create database statement in a query window

create database mydb

That will test whether it is an issue with the gui or the server.
If it doesn't work check the model database and also try specifying locations for the database files.
use xp_cmdshell to execute a dir command on the location to make sure the server can access it ok - you might have to enable it first.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2011-05-28 : 13:54:25
are you getting any error messages?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

pats
Starting Member

10 Posts

Posted - 2011-05-28 : 23:28:24
"try a create database statement in a query window

create database mydb"


I tried creating a new database statement in a query window but I got this error:

Msg 262, Level 14, State 1, Line 1
CREATE DATABASE permission denied in database 'master'.

What's the meaning of this? How can I fix this problem??
Go to Top of Page

pats
Starting Member

10 Posts

Posted - 2011-05-28 : 23:34:24
quote:
Originally posted by jackv

are you getting any error messages?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com




I am not receiving any error messages but I wasn't able to create a new database. When I tried to create a new database it keeps on executing and it will not stop. But then I cannot see the name of the database I am creating in the list of the databases..
Go to Top of Page

pats
Starting Member

10 Posts

Posted - 2011-05-29 : 06:01:01
Please help me solve this problem..
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-05-29 : 10:04:17
>> CREATE DATABASE permission denied in database 'master'.
That's the error message - you just aren't seeing it from the gui.

Is your user sysadmin? Probably not - login as a sysadmin user.

What is your o/s?
Do a search for that error message.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2011-05-30 : 02:51:52
If you don't have the sysadmin rights , ask someone who has sysadmin rights , to add the "dbcreator" server role to your login account

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

pats
Starting Member

10 Posts

Posted - 2011-05-30 : 09:21:33
quote:
Originally posted by nigelrivett

>> CREATE DATABASE permission denied in database 'master'.
That's the error message - you just aren't seeing it from the gui.

Is your user sysadmin? Probably not - login as a sysadmin user.

What is your o/s?
Do a search for that error message.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.


Beer is not cold and it isn't fizzy.



I open the sql as the administrator and I was able to add a new database using the query window. But if I try to create or add a new database using the usual method I am doing "Right click on database and click new database" I can't still create a new one.. Why is it like this? I'm just a bit confused...
Go to Top of Page

pats
Starting Member

10 Posts

Posted - 2011-05-30 : 09:22:02
quote:
Originally posted by jackv

If you don't have the sysadmin rights , ask someone who has sysadmin rights , to add the "dbcreator" server role to your login account

Jack Vamvas
--------------------
http://www.sqlserver-dba.com



I open the sql as the administrator and I was able to add a new database using the query window. But if I try to create or add a new database using the usual method I am doing "Right click on database and click new database" I can't still create a new one.. Why is it like this? I'm just a bit confused...
Go to Top of Page

manju3606
Yak Posting Veteran

78 Posts

Posted - 2011-06-01 : 09:51:42
Tell me you are using windows authentication mode or mixed authentication mode ?

Manju
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-06-01 : 09:57:36
>> I open the sql as the administrator
What do you mean by that?
It's the connection to the serevr (the login) that's important.
Check that the login you are using is a sysadmin (a member of the role).


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

pats
Starting Member

10 Posts

Posted - 2011-06-05 : 08:46:41
Thank you so much for the help.. It is now working well..
Thnak you so much and sorry for the disturb.. :D
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2011-06-06 : 01:27:06
Are yoi able to explain how you solved the problem?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -