CREATE PROCEDURE usp_GetDBOptions AS /*==================================================================================================== NAME: usp_GetDBOptions CREATED BY: SD TYPE: stored procedure (SQL 7) CREATION DATE: 07/31/01 USAGE: Exec usp_GetDBOptions PURPOSE : To return the User options set for the current session. =====================================================================================================*/ /*___________________________________________________________________________________________________*/ SET NOCOUNT ON /* Create temporary table to hold values */ Create Table #Options ( optid int NOT NULL, options_set varchar(25) NOT NULL ) IF @@Error <> 0 BEGIN Raiserror('Failed to create temporary table #Options',16,1) Return(@@Error) END /* Insert values into the Temporary table */ insert into #options values (0,'NO OPTIONS SET') insert into #options values (1,'DISABLE_DEF_CNST_CHK') insert into #options values (2,'IMPLICIT_TRANSACTIONS') insert into #options values (4,'CURSOR_CLOSE_ON_COMMIT') insert into #options values (8,'ANSI_WARNINGS') insert into #options values (16,'ANSI_PADDING') insert into #options values (32,'ANSI_NULLS') insert into #options values (64,'ARITHABORT') insert into #options values (128,'ARITHIGNORE') insert into #options values (256,'QUOTED_IDENTIFIER') insert into #options values (512,'NOCOUNT') insert into #options values (1024,'ANSI_NULL_DFLT_ON') insert into #options values (2048,'ANSI_NULL_DFLT_OFF') if @@options <> 0 select options_set from #options where (optid & @@options) > 0 else select options_set from #options where optid = 0 SET NOCOUNT OFF GO