Cannot bring db "online" after taking offline

1

So, I took MS SQL Server DB offline. Now I am trying to bring it online and get error:

TITLE: Microsoft.SqlServer.Smo

Set offline failed for Database 'zzz'.

For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft_SQL_Server&ProdVer=16.100.46041.41_(SMO-master-A)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Set_offline+Database&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

User does not have permission to alter database 'zzz', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed. (Microsoft SQL Server, Error: 5011)

katit2
posta 3 anni fa697 visualizzazioni
2 Risposte
1

Found. Should run special command, SSMS won't do:

EXEC rdsadmin.dbo.rds_set_database_online <Name of database>

katit2
con risposta 3 anni fa
0

Thanks for posting your fix! worked for me

Luke
con risposta 3 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande