AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

    • Início
    • system&network
    • Ubuntu
    • Unix
    • DBA
    • Computer
    • Coding
    • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / dba / Perguntas / 121712
Accepted
jmoreno
jmoreno
Asked: 2015-11-21 09:33:50 +0800 CST2015-11-21 09:33:50 +0800 CST 2015-11-21 09:33:50 +0800 CST

Lista de propriedades do objeto

  • 772

Existe uma função ou visão do sistema que retorna todos os nomes de propriedades disponíveis?

Eu estava procurando por 'SYSTEMDATAACCESS' e 'USERDATAACCESS' que não estão listados na página MSDN OBJECTPROPERTY . Eu adicionei um comentário sobre eles, mas estou me perguntando se há outros que eu não conheço ... já que é SQL, eu esperaria que eles estivessem disponíveis como metadados consultáveis ​​em algum lugar, mas não consegui encontrar nada. As propriedades nos metadados estão em algum lugar?

EDIT: Embora não seja realmente relevante para minha pergunta, aqui está um exemplo de uso de acesso a dados do sistema. select OBJECTPROPERTY(OBJECT_ID('sys.dm_db_stats_properties'), 'SYSTEMDATAACCESS')

sql-server
  • 2 2 respostas
  • 1718 Views

2 respostas

  • Voted
  1. Best Answer
    Martin Smith
    2015-11-21T11:30:33+08:002015-11-21T11:30:33+08:00

    Existe uma função ou visão do sistema que retorna todos os nomes de propriedades disponíveis?

    Não. Não há nem mesmo algo que retorne os nomes de todas as funções incorporadas disponíveis (como OBJECTPROPERTYela própria).

    Esses valores de propriedade são documentados OBJECTPROPERTYEX, embora também pareçam funcionar OBJECTPROPERTYe provavelmente devam ser documentados lá (o tipo de retorno é int, portanto, não há razão para que eles não devam ser suportados lá e é mais conveniente trabalhar com essa função sem precisando de uma conversão de sql_variant.)

    Para valores de propriedade totalmente não documentados (como minlenpara INDEXPROPERTY), não tenho conhecimento de nenhuma maneira de determiná-los.

    • 2
  2. BateTech
    2015-12-22T08:29:38+08:002015-12-22T08:29:38+08:00

    Aqui está um script que permitirá consultar todos os nomes e valores de propriedade documentados usando a OBJECTPROPERTYEXfunção https://msdn.microsoft.com/en-us/library/ms188390.aspx

    OBJECTPROPERTYEXcontém todas as mesmas propriedades que OBJECTPROPERTY, mas retorna um SQL_Varianttipo em vez de int, e portanto tem mais opções, como BaseTypequal retornará um char(2).

    Aqui está o Script SQL com alguns exemplos de como usar:

      CREATE TABLE #tmpObjectPropertyEX_List (PropertyName nvarchar(50), PropertyAppliesTo nvarchar(256), PropertyDesc nvarchar(3000));
      INSERT INTO #tmpObjectPropertyEX_List (PropertyName, PropertyAppliesTo, PropertyDesc) 
       SELECT [PropertyName] = N'BaseType', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Identifies the base type of the object. When the specified object is a SYNONYM, the base type of the underlying object is returned. Nonnull = Object type Base data type: char(2)'     UNION ALL SELECT [PropertyName] = N'CnstIsClustKey', [PropertyAppliesToType] = N'Constraint', [PropertyDesc] = N'PRIMARY KEY constraint with a clustered index. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'CnstIsColumn', [PropertyAppliesToType] = N'Constraint', [PropertyDesc] = N'CHECK, DEFAULT, or FOREIGN KEY constraint on a single column. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'CnstIsDeleteCascade', [PropertyAppliesToType] = N'Constraint', [PropertyDesc] = N'FOREIGN KEY constraint with the ON DELETE CASCADE option. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'CnstIsDisabled', [PropertyAppliesToType] = N'Constraint', [PropertyDesc] = N'Disabled constraint. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'CnstIsNonclustKey', [PropertyAppliesToType] = N'Constraint', [PropertyDesc] = N'PRIMARY KEY constraint with a nonclustered index. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'CnstIsNotRepl', [PropertyAppliesToType] = N'Constraint', [PropertyDesc] = N'Constraint is defined by using the NOT FOR REPLICATION keywords. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'CnstIsNotTrusted', [PropertyAppliesToType] = N'Constraint', [PropertyDesc] = N'Constraint was enabled without checking existing rows. Therefore, the constraint may not hold for all rows. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'CnstIsUpdateCascade', [PropertyAppliesToType] = N'Constraint', [PropertyDesc] = N'FOREIGN KEY constraint with the ON UPDATE CASCADE option. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'ExecIsAfterTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'AFTER trigger. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'ExecIsAnsiNullsOn', [PropertyAppliesToType] = N'Transact-SQL function, Transact-SQL procedure, Transact-SQL trigger, view', [PropertyDesc] = N'The setting of ANSI_NULLS at creation time. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'ExecIsDeleteTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'DELETE trigger. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'ExecIsFirstDeleteTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'The first trigger fired when a DELETE is executed against the table. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'ExecIsFirstInsertTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'The first trigger fired when an INSERT is executed against the table. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'ExecIsFirstUpdateTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'The first trigger fired when an UPDATE is executed against the table. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'ExecIsInsertTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'INSERT trigger. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'ExecIsInsteadOfTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'INSTEAD OF trigger. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'ExecIsLastDeleteTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'Last trigger fired when a DELETE is executed against the table. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'ExecIsLastInsertTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'Last trigger fired when an INSERT is executed against the table. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'ExecIsLastUpdateTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'Last trigger fired when an UPDATE is executed against the table. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'ExecIsQuotedIdentOn', [PropertyAppliesToType] = N'Transact-SQL function, Transact-SQL procedure, Transact-SQL trigger, view', [PropertyDesc] = N'Setting of QUOTED_IDENTIFIER at creation time. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'ExecIsStartup', [PropertyAppliesToType] = N'Procedure', [PropertyDesc] = N'Startup procedure. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'ExecIsTriggerDisabled', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'Disabled trigger. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'ExecIsTriggerNotForRepl', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'Trigger defined as NOT FOR REPLICATION. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'ExecIsUpdateTrigger', [PropertyAppliesToType] = N'Trigger', [PropertyDesc] = N'UPDATE trigger. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'ExecIsWithNativeCompilation', [PropertyAppliesToType] = N'Transact-SQL Procedure', [PropertyDesc] = N'Procedure is natively compiled. 1 = True 0 = False Base data type: int Applies to: SQL Server 2014 through SQL Server 2016.'      UNION ALL SELECT [PropertyName] = N'HasAfterTrigger', [PropertyAppliesToType] = N'Table, view', [PropertyDesc] = N'Table or view has an AFTER trigger. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'HasDeleteTrigger', [PropertyAppliesToType] = N'Table, view', [PropertyDesc] = N'Table or view has a DELETE trigger. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'HasInsertTrigger', [PropertyAppliesToType] = N'Table, view', [PropertyDesc] = N'Table or view has an INSERT trigger. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'HasInsteadOfTrigger', [PropertyAppliesToType] = N'Table, view', [PropertyDesc] = N'Table or view has an INSTEAD OF trigger. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'HasUpdateTrigger', [PropertyAppliesToType] = N'Table, view', [PropertyDesc] = N'Table or view has an UPDATE trigger. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsAnsiNullsOn', [PropertyAppliesToType] = N'Transact-SQL function, Transact-SQL procedure, table, Transact-SQL trigger, view', [PropertyDesc] = N'Specifies that the ANSI NULLS option setting for the table is ON, meaning all comparisons against a null value evaluate to UNKNOWN. This setting applies to all expressions in the table definition, including computed columns and constraints, for as long as the table exists. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'IsCheckCnst', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'CHECK constraint. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'IsConstraint', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Constraint. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsDefault', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Bound default. 1 = True 0 = False Base data type: int Applies to: SQL Server 2008 through SQL Server 2016.'   UNION ALL SELECT [PropertyName] = N'IsDefaultCnst', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'DEFAULT constraint. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'IsDeterministic', [PropertyAppliesToType] = N'Scalar and table-valued functions, view', [PropertyDesc] = N'The determinism property of the function or view. 1 = Deterministic 0 = Not Deterministic Base data type: int'   UNION ALL SELECT [PropertyName] = N'IsEncrypted', [PropertyAppliesToType] = N'Transact-SQL function, Transact-SQL procedure, table, Transact-SQL trigger, view', [PropertyDesc] = N'Indicates that the original text of the module statement was converted to an obfuscated format. The output of the obfuscation is not directly visible in any of the catalog views in SQL Server 2005. Users without access to system tables or database files cannot retrieve the obfuscated text. However, the text is available to users that can either access system tables over the DAC port or directly access database files. Also, users that can attach a debugger to the server process can retrieve the original procedure from memory at run time. 1 = Encrypted 0 = Not encrypted Base data type: int'     UNION ALL SELECT [PropertyName] = N'IsExecuted', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Specifies the object can be executed (view, procedure, function, or trigger). 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsExtendedProc', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Extended procedure. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'IsForeignKey', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'FOREIGN KEY constraint. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsIndexed', [PropertyAppliesToType] = N'Table, view', [PropertyDesc] = N'A table or view with an index. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'IsIndexable', [PropertyAppliesToType] = N'Table, view', [PropertyDesc] = N'A table or view on which an index may be created. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsInlineFunction', [PropertyAppliesToType] = N'Function', [PropertyDesc] = N'Inline function. 1 = Inline function 0 = Not inline function Base data type: int'      UNION ALL SELECT [PropertyName] = N'IsMSShipped', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'An object created during installation of SQL Server. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsPrecise', [PropertyAppliesToType] = N'Computed column, function, user-defined type, view', [PropertyDesc] = N'Indicates whether the object contains an imprecise computation, such as floating point operations. 1 = Precise 0 = Imprecise Base data type: int'   UNION ALL SELECT [PropertyName] = N'IsPrimaryKey', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'PRIMARY KEY constraint. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsProcedure', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Procedure. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'IsQuotedIdentOn', [PropertyAppliesToType] = N'CHECK constraint, DEFAULT definition, Transact-SQL function, Transact-SQL procedure, table, Transact-SQL trigger, view', [PropertyDesc] = N'Specifies that the quoted identifier setting for the object is ON, meaning double quotation marks delimit identifiers in all expressions involved in the object definition. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'IsQueue', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Service Broker Queue 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsReplProc', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Replication procedure. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'IsRule', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Bound rule. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'IsScalarFunction', [PropertyAppliesToType] = N'Function', [PropertyDesc] = N'Scalar-valued function. 1 = Scalar-valued function 0 = Not scalar-valued function Base data type: int'     UNION ALL SELECT [PropertyName] = N'IsSchemaBound', [PropertyAppliesToType] = N'Function, Procedure, view', [PropertyDesc] = N'A schema bound function or view created by using SCHEMABINDING. 1 = Schema-bound 0 = Not schema-bound Base data type: int'   UNION ALL SELECT [PropertyName] = N'IsSystemTable', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'System table. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsSystemVerified', [PropertyAppliesToType] = N'Computed column, function, user-defined type, view', [PropertyDesc] = N'The precision and determinism properties of the object can be verified by SQL Server. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsTable', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'IsTableFunction', [PropertyAppliesToType] = N'Function', [PropertyDesc] = N'Table-valued function. 1 = Table-valued function 0 = Not table-valued function Base data type: int'     UNION ALL SELECT [PropertyName] = N'IsTrigger', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Trigger. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'IsUniqueCnst', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'UNIQUE constraint. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'IsUserTable', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'User-defined table. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'IsView', [PropertyAppliesToType] = N'View', [PropertyDesc] = N'View. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'OwnerId', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'Owner of the object. System_CAPS_noteNote The schema owner is not necessarily the object owner. For example, child objects (those where parent_object_id is nonnull) will always return the same owner ID as the parent. Nonnull = Database user ID of the object owner. NULL = Unsupported object type, or object ID is not valid. Base data type: int'    UNION ALL SELECT [PropertyName] = N'SchemaId', [PropertyAppliesToType] = N'Any schema-scoped object', [PropertyDesc] = N'The ID of the schema associated with the object. Nonnull = Schema ID of the object. Base data type: int'   UNION ALL SELECT [PropertyName] = N'SystemDataAccess', [PropertyAppliesToType] = N'Function, view', [PropertyDesc] = N'Object accesses system data, system catalogs or virtual system tables, in the local instance of SQL Server. 0 = None 1 = Read Base data type: int'   UNION ALL SELECT [PropertyName] = N'TableDeleteTrigger', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a DELETE trigger. >1 = ID of first trigger with the specified type. Base data type: int'      UNION ALL SELECT [PropertyName] = N'TableDeleteTriggerCount', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'The table has the specified number of DELETE triggers. Nonnull = Number of DELETE triggers Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableFullTextMergeStatus', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Whether a table that has a full-text index that is currently in merging. 0 = Table does not have a full-text index, or the full-text index is not in merging. 1 = The full-text index is in merging. Applies to: SQL Server 2008 through SQL Server 2016.'    UNION ALL SELECT [PropertyName] = N'TableFullTextBackgroundUpdateIndexOn', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'The table has full-text background update index (autochange tracking) enabled. 1 = TRUE 0 = FALSE Base data type: int Applies to: SQL Server 2008 through SQL Server 2016.'   UNION ALL SELECT [PropertyName] = N'TableFulltextCatalogId', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'ID of the full-text catalog in which the full-text index data for the table resides. Nonzero = Full-text catalog ID, associated with the unique index that identifies the rows in a full-text indexed table. 0 = Table does not have a full-text index. Base data type: int Applies to: SQL Server 2008 through SQL Server 2016.'   UNION ALL SELECT [PropertyName] = N'TableFullTextChangeTrackingOn', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has full-text change-tracking enabled. 1 = TRUE 0 = FALSE Base data type: int Applies to: SQL Server 2008 through SQL Server 2016.'    UNION ALL SELECT [PropertyName] = N'TableFulltextDocsProcessed', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Number of rows processed since the start of full-text indexing. In a table that is being indexed for full-text search, all the columns of one row are considered as part of one document to be indexed. 0 = No active crawl or full-text indexing is completed. > 0 = One of the following:  The number of documents processed by insert or update operations since the start of full, incremental, or manual change tracking population. The number of rows processed by insert or update operations since change tracking with background update index population was enabled, the full-text index schema changed, the full-text catalog rebuilt, or the instance of SQL Server restarted, and so on.  NULL = Table does not have a full-text index. Base data type: int Note   This property does not monitor or count deleted rows. Applies to: SQL Server 2008 through SQL Server 2016.'   UNION ALL SELECT [PropertyName] = N'TableFulltextFailCount', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'The number of rows that full-text search did not index. 0 = The population has completed. >0 = One of the following:  The number of documents that were not indexed since the start of Full, Incremental, and Manual Update change tracking population. For change tracking with background update index, the number of rows that were not indexed since the start of the population, or the restart of the population. This could be caused by a schema change, rebuild of the catalog, server restart, and so on  NULL = Table does not have a Full-Text index. Base data type: int Applies to: SQL Server 2008 through SQL Server 2016.'     UNION ALL SELECT [PropertyName] = N'TableFulltextItemCount', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Nonnull = Number of rows that were full-text indexed successfully. NULL = Table does not have a full-text index. Base data type: int Applies to: SQL Server 2008 through SQL Server 2016.'      UNION ALL SELECT [PropertyName] = N'TableFulltextKeyColumn', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'ID of the column associated with the single-column unique index that is part of the definition of a full-text index and semantic index. 0 = Table does not have a full-text index. Base data type: int Applies to: SQL Server 2008 through SQL Server 2016.'    UNION ALL SELECT [PropertyName] = N'TableFulltextPendingChanges', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Number of pending change tracking entries to process. 0 = change tracking is not enabled. NULL = Table does not have a full-text index. Base data type: int Applies to: SQL Server 2008 through SQL Server 2016.'      UNION ALL SELECT [PropertyName] = N'TableFulltextPopulateStatus', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'0 = Idle. 1 = Full population is in progress. 2 = Incremental population is in progress. 3 = Propagation of tracked changes is in progress. 4 = Background update index is in progress, such as autochange tracking. 5 = Full-text indexing is throttled or paused. 6 = An error has occurred. Examine the crawl log for details. For more information, see the Troubleshooting Errors in a Full-Text Population (Crawl) section of Populate Full-Text Indexes. Base data type: int Applies to: SQL Server 2008 through SQL Server 2016.'      UNION ALL SELECT [PropertyName] = N'TableFullTextSemanticExtraction', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table is enabled for semantic indexing. 1 = True 0 = False Base data type: int Applies to: SQL Server 2012 through SQL Server 2016.'   UNION ALL SELECT [PropertyName] = N'TableHasActiveFulltextIndex', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has an active full-text index. 1 = True 0 = False Base data type: int Applies to: SQL Server 2008 through SQL Server 2016.'      UNION ALL SELECT [PropertyName] = N'TableHasCheckCnst', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a CHECK constraint. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableHasClustIndex', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a clustered index. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableHasDefaultCnst', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a DEFAULT constraint. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableHasDeleteTrigger', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a DELETE trigger. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'TableHasForeignKey', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a FOREIGN KEY constraint. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'TableHasForeignRef', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table is referenced by a FOREIGN KEY constraint. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableHasIdentity', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has an identity column. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'TableHasIndex', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has an index of any type. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'TableHasInsertTrigger', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Object has an INSERT trigger. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableHasNonclustIndex', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'The table has a nonclustered index. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'TableHasPrimaryKey', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a primary key. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableHasRowGuidCol', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a ROWGUIDCOL for a uniqueidentifier column. 1 = True 0 = False Base data type: int'   UNION ALL SELECT [PropertyName] = N'TableHasTextImage', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a text, ntext, or image column. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableHasTimestamp', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a timestamp column. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableHasUniqueCnst', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a UNIQUE constraint. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'TableHasUpdateTrigger', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'The object has an UPDATE trigger. 1 = True 0 = False Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableHasVarDecimalStorageFormat', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table is enabled for vardecimal storage format. 1 = True 0 = False'    UNION ALL SELECT [PropertyName] = N'TableInsertTrigger', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has an INSERT trigger. >1 = ID of first trigger with the specified type. Base data type: int'     UNION ALL SELECT [PropertyName] = N'TableInsertTriggerCount', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'The table has the specified number of INSERT triggers. >0 = The number of INSERT triggers. Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableIsFake', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table is not real. It is materialized internally on demand by the Database Engine. 1 = True 0 = False Base data type: int'     UNION ALL SELECT [PropertyName] = N'TableIsLockedOnBulkLoad', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table is locked because a bcp or BULK INSERT job. 1 = True 0 = False Base data type: int'      UNION ALL SELECT [PropertyName] = N'TableIsMemoryOptimized', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table is memory optimized 1 = True 0 = False Base data type: int For more information, see In-Memory OLTP (In-Memory Optimization). Applies to: SQL Server 2014 through SQL Server 2016.'   UNION ALL SELECT [PropertyName] = N'TableIsPinned', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table is pinned to be held in the data cache. 0 = False This feature is not supported in SQL Server 2005 and later versions.'    UNION ALL SELECT [PropertyName] = N'TableTextInRowLimit', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has text in row option set. > 0 = Maximum bytes allowed for text in row. 0 = text in row option is not set. Base data type: int'     UNION ALL SELECT [PropertyName] = N'TableUpdateTrigger', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has an UPDATE trigger. > 1 = ID of first trigger with the specified type. Base data type: int'    UNION ALL SELECT [PropertyName] = N'TableUpdateTriggerCount', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has the specified number of UPDATE triggers. > 0 = The number of UPDATE triggers. Base data type: int'   UNION ALL SELECT [PropertyName] = N'UserDataAccess', [PropertyAppliesToType] = N'Function, View', [PropertyDesc] = N'Indicates the object accesses user data, user tables, in the local instance of SQL Server. 1 = Read 0 = None Base data type: int'      UNION ALL SELECT [PropertyName] = N'TableHasColumnSet', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Table has a column set. 0 = False 1 = True For more information, see Use Column Sets.'   UNION ALL SELECT [PropertyName] = N'Cardinality', [PropertyAppliesToType] = N'Table (system or user-defined), view, or index', [PropertyDesc] = N'The number of rows in the specified object. Applies to: SQL Server 2012 through SQL Server 2016.'     UNION ALL SELECT [PropertyName] = N'TableTemporalType', [PropertyAppliesToType] = N'Table', [PropertyDesc] = N'Specifies the type of table. 0 = non-temporal table 1 = history table for system-versioned table 2 = system-versioned temporal table Applies to: SQL Server 2016 Community Technology Preview 2 (CTP2) through SQL Server 2016.'     
      ;
    
      --List all available object properties: 
      SELECT * FROM #tmpObjectPropertyEX_List ORDER BY 1, 2;
    
      --List all object properties for a given object:
      SELECT 
         objectName = isnull(SCHEMA_NAME(o.schema_id) + '.', '') + o.name
        , op.PropertyName
        , op.PropertyAppliesTo
        , PropertyValue = OBJECTPROPERTYEX(o.object_id, op.PropertyName)
        , o.*
      FROM sys.objects o 
        cross apply #tmpObjectPropertyEX_List op
      WHERE o.object_id = object_id('dbo.MyObjectName')
        and OBJECTPROPERTYEX(o.object_id, op.PropertyName) is not null
      ;
    

    Para recriar a lista de valores:

    1. copie e cole a tabela HTML do URL do MSDN acima no Excel e selecione "corresponder à formatação de destino" ao colar para que os colspans não sejam copiados. Isso fornecerá várias linhas por propriedade, com as linhas adicionais prefixadas com 2 caracteres de tabulação.
    2. copie todos os resultados do Excel para o Notepad ++ (se você copiar diretamente para o Notepad ++, ele não incluirá as 2 guias prefixadas nas linhas adicionais por propriedade).
    3. Localizar/Substituir: "\r\n\t\t" por " " (dois espaços). Isso move tudo para uma linha por propriedade, com 3 colunas
    4. Encontre/Substitua quaisquer aspas simples "'" por duas aspas simples "''" ...ou "'" ou algo que não interrompa a instrução SQL
    5. Cole novamente no Excel e adicione esta fórmula na célula D de cada linha para criar a instrução SQL Select:
      =IF(ROW(A1)=1,"","UNION ALL ") & " SELECT [PropertyName] = N' "&A1&"', [PropertyAppliesToType] = N'"&B1&"', [PropertyDesc] = N'"&C1&"' "

    6. Copie/cole os resultados da fórmula do Excel da coluna D de volta no Notepad++ e localize/substitua: "\r\n" por "\t", para obter tudo em uma linha.

    7. Copie/cole a instrução 'SELECT' de volta na instrução de inserção abaixo
    • 2

relate perguntas

  • SQL Server - Como as páginas de dados são armazenadas ao usar um índice clusterizado

  • Preciso de índices separados para cada tipo de consulta ou um índice de várias colunas funcionará?

  • Quando devo usar uma restrição exclusiva em vez de um índice exclusivo?

  • Quais são as principais causas de deadlocks e podem ser evitadas?

  • Como determinar se um Índice é necessário ou necessário

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    conectar ao servidor PostgreSQL: FATAL: nenhuma entrada pg_hba.conf para o host

    • 12 respostas
  • Marko Smith

    Como fazer a saída do sqlplus aparecer em uma linha?

    • 3 respostas
  • Marko Smith

    Selecione qual tem data máxima ou data mais recente

    • 3 respostas
  • Marko Smith

    Como faço para listar todos os esquemas no PostgreSQL?

    • 4 respostas
  • Marko Smith

    Listar todas as colunas de uma tabela especificada

    • 5 respostas
  • Marko Smith

    Como usar o sqlplus para se conectar a um banco de dados Oracle localizado em outro host sem modificar meu próprio tnsnames.ora

    • 4 respostas
  • Marko Smith

    Como você mysqldump tabela (s) específica (s)?

    • 4 respostas
  • Marko Smith

    Listar os privilégios do banco de dados usando o psql

    • 10 respostas
  • Marko Smith

    Como inserir valores em uma tabela de uma consulta de seleção no PostgreSQL?

    • 4 respostas
  • Marko Smith

    Como faço para listar todos os bancos de dados e tabelas usando o psql?

    • 7 respostas
  • Martin Hope
    Jin conectar ao servidor PostgreSQL: FATAL: nenhuma entrada pg_hba.conf para o host 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane Como faço para listar todos os esquemas no PostgreSQL? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh Por que o log de transações continua crescendo ou fica sem espaço? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland Listar todas as colunas de uma tabela especificada 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney O MySQL pode realizar consultas razoavelmente em bilhões de linhas? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx Como posso monitorar o andamento de uma importação de um arquivo .sql grande? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison Como você mysqldump tabela (s) específica (s)? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas Como posso cronometrar consultas SQL usando psql? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas Como inserir valores em uma tabela de uma consulta de seleção no PostgreSQL? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas Como faço para listar todos os bancos de dados e tabelas usando o psql? 2011-02-18 00:45:49 +0800 CST

Hot tag

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help
subwaysurfers
my femboy roommate

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve