Solved

How do I attach a database to SQL 2005

Posted on 2007-11-18
5
494 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Select - column value lookup. 3 40
T-SQL:  Embedding a CTE 5 31
Query / Window function ? 3 13
Help Extract Specific in SQL 8 16
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

930 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now