10 2008 档案
QA:附加数据库时,如果数据库主密钥的密码丢失怎么办?
摘要:当一个数据库被附加到一个新得sql server实例后,它的数据库主密钥(database master key)默认不会被服务器主密钥(service master key)保护.在这种情况下,我们需要自己修改这种状态,使它被服务器主密钥保护。但如果忘记了数据库主密钥得密码,则无法完成这项操作.如何解决这一问题:在原始实例上为db1的数据库添加新的密码,这样我们就可以在新的实例中使用这个密码了.在原始实例上执行一下代码:[代码]在新实例中:[代码] 阅读全文
posted @ 2008-10-12 22:06 stswordman 阅读(1192) 评论(0) 推荐(0) 编辑
impersonate c#
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System; using System.Security.Principal; using System.Runtime.InteropServices; namespace imper... 阅读全文
posted @ 2008-10-10 16:29 stswordman 阅读(842) 评论(0) 推荐(0) 编辑
运行sp_xp_cmdshell_proxy_account 出现的错误
摘要:运行sp_xp_cmdshell_proxy_account 存储过程可能出现以下几种错误:sp_xp_cmdshell_proxy_account 'domain\account','p@5$word'Msg 15137, Level 16, State 1, Procedure sp_xp_cmdshell_proxy_account, Line 1An error occurred during the execution of sp_xp_cmdshell_proxy_account.Possible reasons: the provided account was invalid 阅读全文
posted @ 2008-10-07 14:05 stswordman 阅读(2758) 评论(0) 推荐(2) 编辑
在SQL Server Agent中应用凭据
摘要:Sql server Agent是一种windows服务,用于执行各种管理任务。这些任务可能会涉及到一些对windows资源的访问(例如创建/删除文件等)。但是SQL Server中用户权限只在SQL Server范围内有效,无法扩展到SQL Server以外,这就意味着当执行job的安全上下文缺少相应权限时,job会失败。所以我们需要寻找另外一种方法来解决这个问题:凭据。首先看一下凭据的定义:凭据是包含连接到 SQL Server 外部资源所需的身份验证信息(凭据)的记录。此信息由 SQL Server 在内部使用。大多凭据都包含一个 Windows 用户名和密码。利用凭据中存储的信息,通过 阅读全文
posted @ 2008-10-06 10:38 stswordman 阅读(4933) 评论(7) 推荐(1) 编辑