使 SQL Server 数据库联机 [英] Bring SQL Server database online

查看:32
本文介绍了使 SQL Server 数据库联机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我执行了 SQL Server 2008 R2 数据库的离线任务.

I executed the task Take offline of a SQL Server 2008 R2 database.

我不能把它放到网上!

我试过

USE master;
GO

ALTER DATABASE [DBNAME] SET ONLINE

出现错误.

用户无权更改数据库DBNAME",数据库不存在,或者数据库未处于允许访问的状态检查.

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.

我也尝试使用任务 Bring online 并且我得到完全相同的错误.

I also tried using the task Bring online and I get the exact same error.

谁能尽快帮我?

推荐答案

我认为您需要使用 SA 帐户或其他具有 sysadmin 权限的帐户登录,然后运行您的代码使其重新联机.当您在那里时,也将 sysadmin 添加到您的帐户中.如果您不拥有该数据库,您可能需要与其他人交谈以获取 SA 密码,或请他们为您完成.除非您没有 SA 密码或出于安全原因将其简化.

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.

这篇关于使 SQL Server 数据库联机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆