I executed the task Take offline
of a SQL Server 2008 R2 database.
I cant bring it online!
I tried with
USE master;
GO
ALTER DATABASE [DBNAME] SET ONLINE
I get an error.
User does not have permission to alter database 'DBNAME', the database does not exist, or the database is not in a state that allows access checks.
I also tried using the task Bring online
and I get the exact same error.
Can anyone help me asap?
Start the SQL Server, in the dialog window for the Server name enters the name of the instance that you want to connect with. From the Authentication drop down box, select the SQL Server Authentication and for the field Login and the Password enter your credentials then click the Connect button.
Bringing Database Online Using SSMSLogin to SQL Server Management Studio. In the Object Explorer, right-click the offline database. In the right-click menu select Tasks >> Bring Online. On selecting Bring Online, a popup window will open and display the status of the action.
Steps to Bring MS SQL Database Online Once you are done with transferring the database files, you will require to bring the database online again. For that, again expand the Databases option and locate your offline database. Right click the database and select Tasks >> Bring Online.
I think you're going to need to login with the SA account, or some other account with sysadmin privileges, and then run your code to put it back online. While you're in there, add sysadmin to your account, too. If you don't own the database, you may need to talk to someone else to get the SA password, or ask them to do it for you. Unless you don't have the SA password or it's been dumbed down for security reasons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With