Solved

SQL Server Management Studio error 916

Posted on 2013-01-21
5
566 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to share SSIS Package? 6 37
hyperlink data type in SQL 3 28
Can > be used for a Text field 6 49
How to create a unique rule restriction on a table for two fields 16 84
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

803 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