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
已提问 3 年前700 查看次数
2 回答
1

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

EXEC rdsadmin.dbo.rds_set_database_online <Name of database>

katit2
已回答 3 年前
0

Thanks for posting your fix! worked for me

Luke
已回答 3 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则