sql-server – 生成模式创建脚本的最小访问权限

sql Server 2008中,它正在运行“生成sql Server脚本向导”,尝试为架构中的所有表和视图创建脚本.

当我这样做时,我收到一个错误

Property Text is not available for
DefaultConstraint
‘[DF__aspnet_Ap__Appli__2A4B4B5E]’.
This property may not exist for this
object,or may not be retrievable due
to insufficient access rights.
(Microsoft.sqlServer.Smo

完成此任务需要具体的访问权限是什么?

解决方法

不幸的是,Generate Scripts Wizard会查看sys.sql_expression_dependencies以找出哪些列引用其他列.即使您禁用外键约束的导出,它也会这样做. 因此,您必须向想要使用向导权限的用户提供sys.sql_expression_dependencies中的SELECT以及VIEW(ANY)DEFinitioN.

相关文章

SELECT a.*,b.dp_name,c.pa_name,fm_name=(CASE WHEN a.fm_n...
if not exists(select name from syscolumns where name=&am...
select a.*,pano=a.pa_no,b.pa_name,f.dp_name,e.fw_state_n...
要在 SQL Server 2019 中设置定时自动重启,可以使用 Window...
您收到的错误消息表明数据库 'EastRiver' 的...
首先我需要查询出需要使用SQL Server Profiler跟踪的数据库标...