Solved

How do I attach a database to SQL 2005

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

760 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

17 Experts available now in Live!

Get 1:1 Help Now