找不到对象,因为它不存在或您没有权限

时间:2019-05-10 03:38:11

标签: sql-server database

我正在执行此数据库脚本,但是出现以下问题:

BEGIN TRANSACTION

SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON

COMMIT

BEGIN TRANSACTION
GO

DECLARE @v sql_variant 
SET @v = N'0: unknown, 1: checkin, 2: checkout, 3: staff-checkin, 4: staff-checkout, 5: lunch-out, 6: lunch-in, 7: others'

EXECUTE sp_addextendedproperty N'MS_Description', @v, N'SCHEMA', N'dbo', N'TABLE', N'GB_FingerprintCommand', N'COLUMN', N'Command'
GO

ALTER TABLE dbo.GB_FingerprintCommand SET (LOCK_ESCALATION = TABLE)
GO

COMMIT

SELECT 
    Has_Perms_By_Name(N'dbo.GB_FingerprintCommand', 'Object', 'ALTER') AS ALT_Per, 
    Has_Perms_By_Name(N'dbo.GB_FingerprintCommand', 'Object', 'VIEW 
DEFINITION') AS View_def_Per, 
    Has_Perms_By_Name(N'dbo.GB_FingerprintCommand', 'Object', 'CONTROL') AS Contr_Per   
  

消息15135,级别16,状态8,过程sp_addextendedproperty,第37行[批处理开始第20行]
  对象无效。不允许在'dbo.GB_FingerprintCommand.Command'上使用扩展属性,否则该对象不存在。

     

4902消息,级别16,状态1,第25行
  无法找到对象“ dbo.GB_FingerprintCommand”,因为该对象不存在或您没有权限。

     

信息3902,第16级,状态1,第27行
  COMMIT TRANSACTION请求没有相应的BEGIN TRANSACTION。

0 个答案:

没有答案