SQL Serverの高度な構成オプションを確認しようとしてもエラーが発生する場合は、次のことが役立つ場合があります。
例
たとえば、次のコードを実行してデータベースメールXPの構成値を確認する場合:
EXEC sp_configure 'Database Mail XPs' 次のエラーが発生します:
Msg 15123, Level 16, State 1, Procedure sp_configure, Line 62 The configuration option 'Database Mail XPs' does not exist, or it may be an advanced option.
show advanced optionsを設定する必要があります 1へのサーバー構成オプション 。
show advanced optionsを設定します 1へ
show advanced optionsを設定する方法は次のとおりです 1へ :
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO 結果:
Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install. Commands completed successfully. Commands completed successfully.
それで全部です。これで、show advanced optionsが設定されました 1へ 。
RECONFIGURE ステートメントは値を更新し、構成設定でサーバーの再起動が必要ない場合は、現在実行中の値を更新する必要があることを指定します。
幸い、show advanced options サーバーを再起動する必要はありません。
結果をテストする
これで、DatabaseMailXPの構成値を正常に確認できます。
EXEC sp_configure 'Database Mail XPs' 結果:
+-------------------+-----------+-----------+----------------+-------------+ | name | minimum | maximum | config_value | run_value | |-------------------+-----------+-----------+----------------+-------------| | Database Mail XPs | 0 | 1 | 0 | 0 | +-------------------+-----------+-----------+----------------+-------------+
この場合、Database Mail XPs オプションが無効になっています(0に設定) )。 1に設定する必要があります 有効にするために。
非表示show advanced options
必要な作業が完了したら、show advanced optionsを設定することをお勧めします デフォルト値の0に戻します (詳細オプションは非表示になります):
sp_configure 'show advanced options', 0;
GO
RECONFIGURE;
GO 注意
高度なオプションは、経験豊富なデータベース管理者または認定されたSQLServer技術者のみが変更することをお勧めします。