Friday, March 30, 2012

Problem Running Sql Server 2005 Express on Vista

I have been trying to get Sql Server 2005 Express Advanced with SP2 installed and operating on my Vista machine. It seems to install ok but when I open Management Studio Express and try to create a new db or attach an existing one, I get error messages. So although it seems to be installed, I can't really use it.

When I try to create a new database I get:

TITLE: Microsoft SQL ServerManagement Studio Express

----------

Create failed for Database'practice'. (Microsoft.SqlServer.Express.Smo)

For help, click:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Database&LinkId=20476

----------

ADDITIONAL INFORMATION:

An exception occurred whileexecuting a Transact-SQL statement or batch.(Microsoft.SqlServer.Express.ConnectionInfo)

----------

CREATE DATABASE permission denied indatabase 'master'. (Microsoft SQL Server, Error: 262)

For help, click:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=262&LinkId=20476

----------

BUTTONS:

OK

----------

When I try to attach an existing database I get:

TITLE: Microsoft SQL ServerManagement Studio Express

----------

Failed to retrieve data for thisrequest. (Microsoft.SqlServer.Express.SmoEnum)

For help, click:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

----------

ADDITIONAL INFORMATION:

An exception occurred whileexecuting a Transact-SQL statement or batch.(Microsoft.SqlServer.Express.ConnectionInfo)

----------

The server principal"Dave-PC\Dave" is not able to access the database "model"under the current security context. (Microsoft SQL Server, Error: 916)

For help, click:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=916&LinkId=20476

----------

BUTTONS:

OK

----------

I have tried following the links in the error messages but the result is: "We're sorryThereis no additional information about this issue in the Error and EventLog Messages or Knowledge Base databases at this time. You can use thelinks in the Support area to determine whether any additionalinformation might be available elsewhere."

I am successfully using both programs on my XP SP2 machines, so I know how to install and run them on XP, just not on Vista (yet). Any suggestions on how to proceed?

I had alot of VS issues when I switched to Vista. Are you running the management studio as an admin? As a test you may want to turn off UAC and see if that fixes your issue. If it does then you just need to change the permissions that you are running with.

|||

Thanks for the suggestion. It worked and I am able to run Sql Server 2005 Express via Management Studio to create and attached databases.

Question: Do I have to toggle the UAC on and off every time I want to use SQL Server Express (or leave it off always if I am willing to accept the security issues)? Or do I have other options?

|||

I personally turned mine off just because I am the only user of the PC and I'm fairly certain that if I was going to do something harmful to my own PC I'd just turn UAC off at the time I was doing it anyway. There is however a way to set the program to always run in admin mode. I'm on an XP machine right now so I can't post instructions myself but step 3 in the below article should be what you need.

http://4sysops.com/archives/vista%E2%80%99s-uac-8-ways-how-to-elevate-an-application-to-run-it-with-administrator-rights/

|||

Thanks for help. I hope I get equally good advice as I sort out some of my other Vista problems!

No comments:

Post a Comment