Unable to Attach Database

  • Thread starter Thread starter Jonathan Wood
  • Start date Start date
J

Jonathan Wood

Using SQL Server Management Studio Express, I need to attach a database (MDF
file) to SQL Server but, When I click the Add... button in the Attach
Databases dialog, I get the following error:

<<<<<<<<<<<<<<<<<<<<<<
Microsoft SQL Server Management Studio Express

ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.Express.ConnectionInfo)

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

There were some links for troubleshooting but, after a series of dialog
boxes, it just came up and said there was no additional information.

The connected database is on my desktop (running Vista as Admin). VS was
shut down so no database should be in used.

Can anyone give me some tips on how I'd start to work this out?

Thanks.
 
It is obviously you did not configure the QL Server 2005/Express security
correctly. Using VISTA make things a bit more complicated.

Prior VISTA, as long as you are local admin, you have full access to SQL
Server. However, with VISTA, a local admin may not be in SQL Server's
sysadmin role any more, you need to explicitly make a SQL Server Login that
maps to your user account and make it appropriate SQL Server's server role
(sysadmin, for example) in order to perform server level tasks, such as
attach/detach database.

Have you applied SQL Server2005 SP2, which is reqired when you use SQL
Server 2005/Express on VISTA box? When you do that, the SP2 would prompt you
for this security change.
 
I've installed the full SQL Server 2005, along with SP2.

Now nothing works. (Please see new post "Missing IIS (PLEASE HELP)")

(I was asked to add priviledges and I added the only one that was there.)

Thanks.
 
Back
Top