SQLServer's main environment variable

xiaoxiao2021-03-05  36

Set quoted_identifier off go set ANSI_NULLS ON Go Create Procedure USP_ALLOPERATION AS / * ==================================== ===========================0055-4-21 Author: Thank ====== ========================================================= Revision History =================================================== ======= Rev Date Description ========================================= ================ 1 2005-4-21 generated by Xie ========================= ===================================================== in

ID ', SYSTEM_USER AS' Login Name ', USER AS' User Name 'EXEC master.dbo.sp_who' sa 'SELECT @@ TEXTSIZE SET TEXTSIZE 2048 SELECT @@ TEXTSIZE SELECT @@ TIMETICKS exec master.dbo.sp_monitor SELECT @@ IDLE AS 'IDLE', @@ iO_BUSY AS 'iO_BUSY', @@ CPU_BUSY AS 'CPU_BUSY', @@ CONNECTIONS AS 'CONNECTIONS', @@ tOTAL_READ AS 'tOTAL_READ', @@ TOTAL_WRITE AS 'TOTAL_WRITE', @@ tOTAL_ERRORS AS ' tOTAL_ERRORS ', GETDATE () AS' As of 'SELECT @@ TRANCOUNT AS' TRANCOUNT 'SELECT @@ VERSION AS' VERSION 'SELECT OBJECT_ID (' master.dbo.sp_monitor '), OBJECT_NAME (OBJECT_ID (' master.dbo.sp_monitor ' )), ObjectProperty (Object_ID ('Pubs.dbo.sales'), 'CNSTISCLUSTKEY'

) / * CnstIsClustKey Constraint A primary key with a clustered index. CnstIsColumn Constraint COLUMN constraint. CnstIsDeleteCascade Constraint A foreign key constraint with the ON DELETE CASCADE option. CnstIsDisabled Constraint Disabled constraint. CnstIsNonclustKey Constraint A primary key with a nonclustered index. CnstIsNotTrusted Constraint Constraint was enabled without checking existing rows, so constraint may not hold for all rows. CnstIsNotRepl Constraint The constraint is defined with the nOT fOR REPLICATION keywords. CnstIsUpdateCascade Constraint A foreign key constraint with the ON UPDATE CASCADE option. ExecIsAfterTrigger Trigger AFTER trigger. ExecIsAnsiNullsOn Scalar and Inline Table-valued Function, Procedure, Trigger, View The setting of ANSI_NULLS at creation time. ExecIsDeleteTrigger Trigger DELETE trigger. ExecIsFirstDeleteTrigger Trigger The first trigger fired when a DELETE is executed against the table. ExecIsFirstInsertTrigger Trigger The first trigger fired wh en an INSERT is executed against the table. ExecIsFirstUpdateTrigger Trigger The first trigger fired when an UPDATE is executed against the table. ExecIsInsertTrigger Trigger INSERT trigger. ExecIsInsteadOfTrigger Trigger INSTEAD OF trigger. ExecIsLastDeleteTrigger Trigger The last trigger fired when a DELETE is executed against the table. ExecIsLastInsertTrigger Trigger The last trigger fired when an INSERT is executed against the table. ExecIsLastUpdateTrigger Trigger The last trigger fired when an UPDATE is executed against the table. ExecIsQuotedIdentOn Scalar and Inline Table-valued Function, Procedure, Trigger, View The setting of QUOTED_IDENTIFIER at creation Time. EXECISSTARTUP Procedure Startup Procedure.

ExecIsTriggerDisabled Trigger Disabled trigger. ExecIsUpdateTrigger Trigger UPDATE trigger. HasAfterTrigger Table, View Table or view has an AFTER trigger. HasDeleteTrigger Table, View Table or view has a DELETE trigger. HasInsertTrigger Table, View Table or view has an INSERT trigger. HasInsteadOfTrigger Table, View Table or view has an INSTEAD OF trigger. HasUpdateTrigger Table, View Table or view has an UPDATE trigger. IsAnsiNullsOn Scalar and Inline Table-valued Function, Procedure, Table, Trigger, View 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. IsCheckCnst Any CHECK constraint. IsConstraint Any constraint. IsDefault Any Bound default. Isdefaultcnst Any Default Constraint. Isdeterministic Function, View The Determinism Property of The Function or View. AP plies to scalar- and table-valued functions and views. 1 = Deterministic 0 = Not Deterministic NULL = Not a function or view, or invalid object ID. IsExecuted Any Specifies the object can be executed (view, procedure, function, or trigger) . IsExtendedProc Any Extended procedure. IsForeignKey Any FOREIGN KEY constraint. IsIndexed Table, View A table or view with an index. IsIndexable Table, View A table or view on which an index may be created. IsInlineFunction function Inline function. 1 = Inline function 0 = NOT INLINE FUNCTION NULL = NOT A FUNCTION, OR INVALID Object ID. Ismshipped by Microsoft® SQL ServerTM 2000. IsprimaryKey Any Primary Key Constraint.

IsProcedure Any Procedure. IsQuotedIdentOn Scalar and Inline Table-valued Function, Procedure, Table, Trigger, View, CHECK Constraint, DEFAULT Definition 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. IsReplProc Any Replication procedure. IsRule Any bound rule. IsScalarFunction function Scalar-valued function. 1 = Scalar-valued 0 = Table-valued NULL = Not a function, or invalid object ID. IsSchemaBound function, View A schema bound function or view created with SCHEMABINDING. 1 = Schema-bound 0 = Not schema-bound NULL = Not a function or a view, or invalid object ID. IsSystemTable Table System table. IsTable Table Table. IsTableFunction function Table-valued function. 1 = Table- Valued 0 = Scalar-Valued Null = NOT A FUNCTION, or Invalid Object ID. Istrigger Any Trigger. IsuniqueCnst Any UNIQUE Constraint. Isusertable Table User-Defined Table. IsView View View. Own erId Any Owner of the object. Nonnull = The database user ID of the object owner.NULL = Invalid input. TableDeleteTrigger Table Table has a DELETE trigger.> 1 = ID of first trigger with given type. TableDeleteTriggerCount Table The table has the specified number of DELETE triggers.> 0 = The number of DELETE triggers.NULL = Invalid input. TableFullTextBackgroundUpdateIndexOn Table The table has full-text background update index enabled. TableFulltextCatalogId Table The ID of the full-text catalog in which the full-text index data for ..................

0 = Table is not full-text indexed. TableFullTextChangeTrackingOn Table The table has full-text change-tracking enabled. TableFulltextKeyColumn Table The ID of the column associated with the single-column unique index that is participating in the full-text index definition. TableFullTextPopulateStatus Table 0 = No population 1 = Full population 2 = Incremental population TableHasActiveFulltextIndex Table The table has an active full-text index. TableHasCheckCnst Table The table has a CHECK constraint. TableHasClustIndex Table The table has a clustered index. TableHasDefaultCnst Table The table has a DEFAULT constraint. TableHasDeleteTrigger Table The table has a DELETE trigger. TableHasForeignKey Table The table has a FOREIGN KEY constraint. TableHasForeignRef Table Table is referenced by a FOREIGN KEY constraint. TableHasIdentity Table The table has an identity column. TableHasIndex Table The table has an index of any TYPE. TABLEHASINSERTTRIGER TABLE The Object Has An Insert Trigger. NULL = Invalid input. TableHasNonclustIndex Table The table has a nonclustered index. TableHasPrimaryKey Table The table has a primary key. TableHasRowGuidCol Table The table has a ROWGUIDCOL for a uniqueidentifier column. TableHasTextImage Table The table has a text column. TableHasTimestamp Table The table has a timestamp column. TableHasUniqueCnst Table The table has a UNIQUE constraint. TableHasUpdateTrigger Table The object has an Update trigger. TableInsertTrigger Table The table has an INSERT trigger.> 1 = ID of first trigger with given type. TableInsertTriggerCount Table The table has the specified number of INSERT TRIGGERS.> 0 = The number of insert triggers.null = invalid INPUT.

TableIsFake Table The table is not real. It is materialized internally on demand by SQL Server. TableIsLockedOnBulkLoad Table The table is locked due to a BCP or BULK INSERT job. TableIsPinned Table The table is pinned to be held in the data cache. TableTextInRowLimit Table The maximum bytes allowed for text in row, or 0 if text in row option is not set. TableUpdateTrigger Table The table has an UPDATE trigger.> 1 = ID of first trigger with given type. TableUpdateTriggerCount '* / DECLARE @idoc int DECLARE @doc VARCHAR (1000) set @doc = '

转载请注明原文地址:https://www.9cbs.com/read-33440.html

New Post(0)