Solved

SQL Server Management Studio error 916

Posted on 2013-01-21
5
570 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:
Eugene Z 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:Eugene Z
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

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

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.
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 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 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.

679 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