Solved

How do I attach a database to SQL 2005

Posted on 2007-11-18
5
508 Views
Last Modified: 2010-04-21
I get this message when I try to attach a database to SQL 2005.
=================================================================================
TITLE: Microsoft SQL Server Management Studio Express
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
The server principal "Wardell-Laptop\Wardell Dye" 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
0
Comment
Question by:WDJ98338
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 25

Expert Comment

by:imitchie
ID: 20309120
you need to use an account with higher privileges
0
 

Author Comment

by:WDJ98338
ID: 20309447
Well how do I fix it? Because if I am the administrator then that should be be high enough. What do you think?
0
 
LVL 25

Expert Comment

by:imitchie
ID: 20309504
0
 
LVL 25

Accepted Solution

by:
imitchie earned 250 total points
ID: 20309528
do you know the password for the SA account?
from Management Studio, click on "Connect" above the database tree on the left. Change Authentication fro Windows Authentication to SQL Server Authentication. user name to "SA" and the appropriate password (or blank if you have not set it).

When you are in, from the tree on the left, expand Security, Logins. if you see Wardell-Laptop\Wardell Dye in the list, right-click on it. otherwise, right-click on BuiltIN\Administrators.  Click on Properties. In the top left "Select a page" area, click on "Server roles".  Tick "sysadmin" on the right.  Click OK (bottom) to close the page.

Now try the attach again
0
 

Author Closing Comment

by:WDJ98338
ID: 31409836
I left one thing out and that was I was using Vista. I uninstalled SQL and installed it again and copied the files in the data location and then set up how you told me to set it up.

Thanks for your help
WDJ
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question