Solved

SQL Server Management Studio error 916

Posted on 2013-01-21
5
565 Views
Last Modified: 2013-01-29
We are trying to detach a database from an old server so we can run it on a new server.

On the old machine, when I stop the destiny service and then try to detach the database I keep getting an error (error 916) saying that it cannot be performed under the current security context. I am using an administrators account.

I tried the MS fix for error 916.. still doesn’t work.

Any ideas?
0
Comment
Question by:dazzaster
5 Comments
 
LVL 42

Accepted Solution

by:
EugeneZ earned 250 total points
ID: 38803607
please verify if you are using sql server Sa role permissions ;
are you local win admin? sql server service is running as win admin too?

Reasons for SQL Server Error 916

<Here are some possible reasons for SQL Server Error 916:
•A login does not have permission to view data of a column selected in the header
•A database is offline and/or its collation is NULL
•Multiple databases with different collations are on the instance and SSMS is unable to retrieve the collation because a database is configured to auto-close>
more
http://www.mssqltips.com/sqlservertip/2761/sql-server-management-studio-error-916/
0
 
LVL 42

Expert Comment

by:EugeneZ
ID: 38803610
btw: what sql server edition\version do you use?
what sSMS version was used?


try to use
sp_detach_db
http://msdn.microsoft.com/en-US/library/ms188031(v=SQL.90).aspx


The following example detaches the AdventureWorks database with skipchecks set to true.

EXEC sp_detach_db 'AdventureWorks', 'true';
0
 
LVL 21

Expert Comment

by:mastoo
ID: 38803817
You don't want to do a backup of the database, copy the backup file, and use that to restore on the new server?
0
 
LVL 35

Assisted Solution

by:David Todd
David Todd earned 250 total points
ID: 38803852
Hi,

A Windows Administrators account is not necessarily a SQL Database Administrators account.

Often in the past they were, but may pay to check you really do have the system admin role on this SQL instance.

Regards
  David

PS And what mastoo said above ... restore of backup better than detaching anything if production
0
 
LVL 1

Author Closing Comment

by:dazzaster
ID: 38834091
Wasn't using SA account
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

911 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

25 Experts available now in Live!

Get 1:1 Help Now