Article ID: 156498 - View products that this article applies to.
This article was previously published under Q156498
This article has been archived. It is offered "as is" and will no longer be updated.
SQL Server 6.5 introduces the @@options global variable, which records the current state of a number of user options. While you can select @@options to determine the current settings, it only returns an integer, which can be difficult to interpret. This article describes how to create a stored procedure you can run for a more meaningful display of @@options.
Run the following script as the system administrator (SA) with either ISQL or ISQL/w:
If you then run sp_currentopts, you will get a result set listing the current user options set for your connection. For example, suppose a database administrator (DBA) runs the following commands:
A user who then logged on and ran sp_currentopts would receive the following:
Likewise, if a user logs on to a system where the sp_configure 'user options' setting is set to 0 (zero) and then issues a SET ANSI_WARNINGS ON command, sp_currentopts would return the following:
options_set ------------------------- ANSI_WARNINGS ANSI_PADDING ANSI_NULLS ARITHABORT QUOTED_IDENTIFIER ANSI_NULL_DFLT_ON
options_set ------------------------- ANSI_WARNINGS
Contact us for more help
Connect with Answer Desk for expert help.