SQL Server エージェントの固定データベース ロールSQL Server Agent Fixed Database Roles
適用対象:Applies to: SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
Azure SQL Managed InstanceAzure SQL Managed Instance
Azure SQL Managed InstanceAzure SQL Managed Instance
重要
現在、Azure SQL Managed Instance によって、すべてではありませんが、ほとんどの SQL Server エージェントの機能がサポートされています。On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported. 詳細については、Azure SQL Managed Instance と SQL Server の T-SQL の相違点に関するページを参照してください。See Azure SQL Managed Instance T-SQL differences from SQL Server for details.
SQL ServerSQL Server には、次の msdb データベースの固定データベース ロールが用意されています。これらのロールを使用することで、管理者は SQL ServerSQL Server エージェントへのアクセスをより細かく制御できます。has the following msdb database fixed database roles, which give administrators finer control over access to SQL ServerSQL Server Agent. 特権レベルの低いロールから順に、次に示します。The roles listed from least to most privileged access are:
SQLAgentUserRoleSQLAgentUserRole
SQLAgentReaderRoleSQLAgentReaderRole
SQLAgentOperatorRoleSQLAgentOperatorRole
上記のどのロールのメンバーでもないユーザーが SQL ServerSQL Server の SQL Server Management StudioSQL Server Management Studioに接続しても、オブジェクト エクスプローラーには [SQL Server エージェント] ノードは表示されません。When users who are not members of one of these roles are connected to SQL ServerSQL Server in SQL Server Management StudioSQL Server Management Studio, the SQL Server Agent node in Object Explorer is not visible. SQL ServerSQL Server エージェントを使用するユーザーは、上記のいずれかの固定データベース ロールのメンバーであるか、または固定サーバー ロール sysadmin のメンバーである必要があります。A user must be a member of one of these fixed database roles or a member of the sysadmin fixed server role to use SQL ServerSQL Server Agent.
SQL Server エージェントの固定データベース ロールの権限Permissions of SQL Server Agent Fixed Database Roles
SQL ServerSQL Server エージェントのデータベース ロールの各権限の相互関係は、同心構造になっています。 SQL ServerSQL Server エージェント オブジェクト (警告、オペレーター、ジョブ、スケジュール、プロキシなど) に対して、高いレベルの特権を持つロールは、低いレベルの特権を持つロールの権限を継承します。The SQL ServerSQL Server Agent database role permissions are concentric in relation to one another -- more privileged roles inherit the permissions of less privileged roles on SQL ServerSQL Server Agent objects (including alerts, operators, jobs, schedules, and proxies). たとえば、最も特権レベルの低い SQLAgentUserRole のメンバーが proxy_A へのアクセスを許可された場合、 SQLAgentReaderRole および SQLAgentOperatorRole の両方のメンバーは、proxy_A へのアクセスが明示的に許可されていなくても、このプロキシへのアクセス権が自動的に与えられていることになります。For example, if members of least-privileged SQLAgentUserRole have been granted access to proxy_A, members of both SQLAgentReaderRole and SQLAgentOperatorRole automatically have access to this proxy even though access to proxy_A has not been explicitly granted to them. これは、セキュリティに影響することがあります。セキュリティ上の影響については、次のセクションの各ロールの説明に記載します。This may have security implications, which are discussed in the following sections about each role.
SQLAgentUserRole の権限SQLAgentUserRole Permissions
SQLAgentUserRole には、 SQL ServerSQL Server エージェントの固定データベース ロールのうち、最も低い特権レベルが設定されています。SQLAgentUserRole is the least privileged of the SQL ServerSQL Server Agent fixed database roles. オペレーター、ローカル ジョブ、ジョブ スケジュールのみに対する権限があります。It has permissions on only operators, local jobs, and job schedules. SQLAgentUserRole のメンバーは、所有しているローカル ジョブおよびジョブ スケジュールのみに対する権限を持っています。Members of SQLAgentUserRole have permissions on only local jobs and job schedules that they own. このメンバーが、マルチサーバー ジョブ (マスター サーバーとターゲット サーバーのジョブ) を使用することはできません。また、ジョブの所有権を変更して、所有していないジョブへのアクセス権を得ることもできません。They cannot use multiserver jobs (master and target server jobs), and they cannot change job ownership to gain access to jobs that they do not already own. SQLAgentUserRole のメンバーは、 SQL Server Management StudioSQL Server Management Studio の [ジョブ ステップのプロパティ] ダイアログ ボックスでのみ、使用できるプロキシのリストを表示できます。SQLAgentUserRole members can view a list of available proxies only in the Job Step Properties dialog box of SQL Server Management StudioSQL Server Management Studio. SQLAgentUserRole のメンバーに対しては、 SQL Server Management StudioSQL Server Management Studio オブジェクト エクスプローラーには [ジョブ] ノードだけが表示されます。Only the Jobs node in SQL Server Management StudioSQL Server Management Studio Object Explorer is visible to members of SQLAgentUserRole.
重要
SQL ServerSQL Server エージェント データベース ロール のメンバーに対してプロキシへのアクセスを許可する前に、セキュリティ上の影響について検討してください。Consider the security implications before granting proxy access to members of the SQL ServerSQL Server Agent database roles. SQLAgentReaderRole および SQLAgentOperatorRole は、自動的に SQLAgentUserRole のメンバーになります。The SQLAgentReaderRole and the SQLAgentOperatorRole are automatically members of the SQLAgentUserRole. つまり、 SQLAgentReaderRole および SQLAgentOperatorRole のメンバーは、 SQLAgentUserRole に許可されたすべての SQL ServerSQL Server エージェント プロキシにアクセスし、これらのプロキシを使用できることになります。This means that members of SQLAgentReaderRole and SQLAgentOperatorRole have access to all SQL ServerSQL Server Agent proxies that have been granted to the SQLAgentUserRole and can use those proxies.
次の表に、 SQL ServerSQL Server エージェント オブジェクトに対する SQLAgentUserRole の権限の概要を示します。The following table summarizes SQLAgentUserRole permissions on SQL ServerSQL Server Agent objects.
アクションAction | オペレーターOperators | ローカル ジョブLocal jobs (所有しているジョブのみ)(owned jobs only) |
ジョブ スケジュールJob schedules (所有しているスケジュールのみ)(owned schedules only) |
プロキシProxies |
---|---|---|---|---|
作成/変更/削除Create/modify/delete | いいえNo | はいYes ジョブの所有権は変更できません。Cannot change job ownership. |
はいYes | いいえNo |
リストの表示 (列挙)View list (enumerate) | はいYes sp_notify_operator および Management Studio の [ジョブのプロパティ] ダイアログ ボックスで使用できるオペレーターのリストを取得できます。Can get list of available operators for use in sp_notify_operator and the Job Properties dialog box of Management Studio. |
はいYes | はいYes | はいYes プロキシのリストは、Management Studio の [ジョブ ステップのプロパティ] ダイアログ ボックスにのみ表示できます。List of proxies only available in the Job Step Properties dialog box of Management Studio. |
有効化/無効化Enable/disable | いいえNo | はいYes | はいYes | 利用不可Not applicable |
プロパティの表示View properties | いいえNo | はいYes | はいYes | いいえNo |
実行/停止/開始Execute/stop/start | 利用不可Not applicable | はいYes | 適用なしNot applicable | 適用なしNot applicable |
ジョブ履歴の表示View job history | 利用不可Not applicable | はいYes | 適用なしNot applicable | 適用なしNot applicable |
ジョブ履歴の削除Delete job history | 利用不可Not applicable | いいえNo 所有しているジョブのジョブ履歴を削除するには、 SQLAgentUserRole のメンバーは、 sp_purge_jobhistory に対する EXECUTE 権限が明示的に許可されている必要があります。Members of SQLAgentUserRole must explicitly be granted the EXECUTE permission on sp_purge_jobhistory to delete job history on jobs that they own. 他のジョブのジョブ履歴は削除できません。They cannot delete job history for any other jobs. |
適用なしNot applicable | 適用なしNot applicable |
アタッチ/デタッチAttach/detach | 適用なしNot applicable | 適用なしNot applicable | はいYes | 利用不可Not applicable |
SQLAgentReaderRole の権限SQLAgentReaderRole Permissions
SQLAgentReaderRole には、すべての SQLAgentUserRole の権限、および使用できるマルチサーバー ジョブのリスト、ジョブのプロパティ、およびジョブの履歴を表示する権限が含まれています。SQLAgentReaderRole includes all the SQLAgentUserRole permissions as well as permissions to view the list of available multiserver jobs, their properties, and their history. このロールのメンバーは、所有しているジョブとジョブ スケジュールだけでなく、使用できるすべてのジョブとジョブ スケジュール、およびそのプロパティのリストを表示することもできます。Members of this role can also view the list of all available jobs and job schedules and their properties, not just those jobs and job schedules that they own. SQLAgentReaderRole のメンバーは、ジョブの所有権を変更して、所有していないジョブへのアクセス権を得ることはできません。SQLAgentReaderRole members cannot change job ownership to gain access to jobs that they do not already own. SQLAgentReaderRole のメンバーに対しては、 SQL Server Management StudioSQL Server Management Studio オブジェクト エクスプローラーには [ジョブ] ノードだけが表示されます。Only the Jobs node in SQL Server Management StudioSQL Server Management Studio Object Explorer is visible to members of the SQLAgentReaderRole.
重要
SQL ServerSQL Server Agentdatabaseroles のメンバーに対してプロキシへのアクセスを許可する前に、セキュリティ上の影響について検討してください。Consider the security implications before granting proxy access to members of the SQL ServerSQL Server Agentdatabaseroles. SQLAgentReaderRole のメンバーは、自動的に SQLAgentUserRole のメンバーになります。Members of SQLAgentReaderRole are automatically members of the SQLAgentUserRole. つまり、 SQLAgentReaderRole のメンバーは、 SQLAgentUserRole に対して許可されたすべての SQL ServerSQL Server エージェント プロキシにアクセスし、これらのプロキシを使用できることになります。This means that members of SQLAgentReaderRole have access to all SQL ServerSQL Server Agent proxies that have been granted to SQLAgentUserRole and can use those proxies.
次の表に、 SQL ServerSQL Server エージェント オブジェクトに対する SQLAgentReaderRole の権限の概要を示します。The following table summarizes SQLAgentReaderRole permissions on SQL ServerSQL Server Agent objects.
アクションAction | オペレーターOperators | ローカル ジョブLocal jobs | マルチサーバー ジョブMultiserver jobs | ジョブ スケジュールJob schedules | プロキシProxies |
---|---|---|---|---|---|
作成/変更/削除Create/modify/delete | いいえNo | 可 (所有しているジョブのみ)Yes (owned jobs only) ジョブの所有権は変更できません。Cannot change job ownership. |
いいえNo | 可 (所有しているスケジュールのみ)Yes (owned schedules only) | いいえNo |
リストの表示 (列挙)View list (enumerate) | はいYes sp_notify_operator および Management Studio の [ジョブのプロパティ] ダイアログ ボックスで使用できるオペレーターのリストを取得できます。Can get list of available operators for use in sp_notify_operator and the Job Properties dialog box of Management Studio. |
はいYes | はいYes | はいYes | はいYes プロキシのリストは、Management Studio の [ジョブ ステップのプロパティ] ダイアログ ボックスにのみ表示できます。List of proxies only available in the Job Step Properties dialog box of Management Studio. |
有効化/無効化Enable/disable | いいえNo | 可 (所有しているジョブのみ)Yes (owned jobs only) | いいえNo | 可 (所有しているスケジュールのみ)Yes (owned schedules only) | 適用なしNot applicable |
プロパティの表示View properties | いいえNo | はいYes | はいYes | はいYes | いいえNo |
プロパティの編集Edit properties | いいえNo | 可 (所有しているジョブのみ)Yes (owned jobs only) | いいえNo | 可 (所有しているスケジュールのみ)Yes (owned schedules only) | いいえNo |
実行/停止/開始Execute/stop/start | 適用なしNot applicable | 可 (所有しているジョブのみ)Yes (owned jobs only) | いいえNo | 適用なしNot applicable | 適用なしNot applicable |
ジョブ履歴の表示View job history | 利用不可Not applicable | はいYes | はいYes | 適用なしNot applicable | 適用なしNot applicable |
ジョブ履歴の削除Delete job history | 利用不可Not applicable | いいえNo 所有しているジョブのジョブ履歴を削除するには、 SQLAgentReaderRole のメンバーは、 sp_purge_jobhistory に対する EXECUTE 権限が明示的に許可されている必要があります。Members of SQLAgentReaderRole must explicitly be granted the EXECUTE permission on sp_purge_jobhistory to delete job history on jobs that they own. 他のジョブのジョブ履歴は削除できません。They cannot delete job history for any other jobs. |
いいえNo | 適用なしNot applicable | 適用なしNot applicable |
アタッチ/デタッチAttach/detach | 適用なしNot applicable | 適用なしNot applicable | 適用なしNot applicable | 可 (所有しているスケジュールのみ)Yes (owned schedules only) | 適用なしNot applicable |
SQLAgentOperatorRole の権限SQLAgentOperatorRole Permissions
SQLAgentOperatorRole には、 SQL ServerSQL Server エージェントの固定データベース ロールのうち、最も高いレベルの特権が設定されています。SQLAgentOperatorRole is the most privileged of the SQL ServerSQL Server Agent fixed database roles. これには、 SQLAgentUserRole および SQLAgentReaderRole のすべての権限が含まれています。It includes all the permissions of SQLAgentUserRole and SQLAgentReaderRole. このロールのメンバーは、オペレーターおよびプロキシのプロパティを表示することも、サーバー上で使用できるプロキシおよび警告を列挙することもできます。Members of this role can also view properties for operators and proxies, and enumerate available proxies and alerts on the server.
SQLAgentOperatorRole のメンバーは、ローカル ジョブおよびスケジュールに関する追加の権限を持っています。SQLAgentOperatorRole members have additional permissions on local jobs and schedules. すべてのローカル ジョブを実行、停止、または開始したり、サーバー上のローカル ジョブのジョブ履歴を削除できます。They can execute, stop, or start all local jobs, and they can delete the job history for any local job on the server. また、サーバー上のすべてのローカル ジョブおよびスケジュールを、有効または無効にすることもできます。They can also enable or disable all local jobs and schedules on the server. ローカル ジョブまたはスケジュールを有効または無効にするには、このロールのメンバーはストアド プロシージャ sp_update_job および sp_update_schedule を使用する必要があります。To enable or disable local jobs or schedules, members of this role must use the stored procedures sp_update_job and sp_update_schedule. SQLAgentOperatorRole のメンバーは、ジョブまたはスケジュールの名前か ID を指定するパラメーター、および @enabled パラメーターのみを指定できます。Only the parameters that specify the job or schedule name or identifier and the @enabled parameter can be specified by members of SQLAgentOperatorRole. 他のパラメーターを指定すると、ストアド プロシージャの実行は失敗します。If they specify any other parameters, execution of these stored procedures fails. SQLAgentOperatorRole のメンバーは、ジョブの所有権を変更して、所有していないジョブへのアクセス権を得ることはできません。SQLAgentOperatorRole members cannot change job ownership to gain access to jobs that they do not already own.
SQLAgentOperatorRole のメンバーに対しては、 オブジェクト エクスプローラーには[ジョブ] ノード、[警告] ノード、 [オペレーター] SQL Server Management StudioSQL Server Management Studio ノード、および [プロキシ] ノードのみが表示されます。The Jobs, Alerts, Operators, and Proxies nodes in SQL Server Management StudioSQL Server Management Studio Object Explorer are visible to members of SQLAgentOperatorRole. このロールのメンバーに表示されないのは、 [エラー ログ] ノードだけです。Only the Error Logs node is not visible to members of this role.
重要
SQL ServerSQL Server Agentdatabaseroles のメンバーに対してプロキシへのアクセスを許可する前に、セキュリティ上の影響について検討してください。Consider the security implications before granting proxy access to members of the SQL ServerSQL Server Agentdatabaseroles. SQLAgentOperatorRole のメンバーは、自動的に SQLAgentUserRole および SQLAgentReaderRole のメンバーになります。Members of SQLAgentOperatorRole are automatically members of SQLAgentUserRole and SQLAgentReaderRole. つまり、 SQLAgentOperatorRole のメンバーは、 SQLAgentUserRole または SQLAgentReaderRole に対して許可されたすべての SQL ServerSQL Server エージェント プロキシにアクセスし、これらのプロキシを使用できることになります。This means that members of SQLAgentOperatorRole have access to all SQL ServerSQL Server Agent proxies that have been granted to either SQLAgentUserRole or SQLAgentReaderRole and can use those proxies.
次の表に、 エージェント オブジェクトに対する SQLAgentOperatorRole SQL ServerSQL Server の権限の概要を示します。The following table summarizes SQLAgentOperatorRole permissions on SQL ServerSQL Server Agent objects.
アクションAction | 警告Alerts | オペレーターOperators | ローカル ジョブLocal jobs | マルチサーバー ジョブMultiserver jobs | ジョブ スケジュールJob schedules | プロキシProxies |
---|---|---|---|---|---|---|
作成/変更/削除Create/modify/delete | いいえNo | いいえNo | 可 (所有しているジョブのみ)Yes (owned jobs only) ジョブの所有権は変更できません。Cannot change job ownership. |
いいえNo | 可 (所有しているスケジュールのみ)Yes (owned schedules only) | いいえNo |
リストの表示 (列挙)View list (enumerate) | はいYes | はいYes sp_notify_operator および Management Studio の [ジョブのプロパティ] ダイアログ ボックスで使用できるオペレーターのリストを取得できます。Can get list of available operators for use in sp_notify_operator and the Job Properties dialog box of Management Studio. |
はいYes | はいYes | はいYes | はいYes |
有効化/無効化Enable/disable | いいえNo | いいえNo | はいYes SQLAgentOperatorRole のメンバーは、ストアド プロシージャ sp_update_job を使用し、 @enabled パラメーターおよび @job_id (または @job_name) パラメーターの値を指定することにより、所有していないローカル ジョブを有効または無効にできます。SQLAgentOperatorRole members can enable or disable local jobs they do not own by using the stored procedure sp_update_job and specifying values for the @enabled and the @job_id (or @job_name) parameters. このロールのメンバーが、このストアド プロシージャに対して他のパラメーターを指定した場合、プロシージャの実行は失敗します。If a member of this role specifies any other parameters for this stored procedure, execution of the procedure will fail. |
いいえNo | はいYes SQLAgentOperatorRole のメンバーは、ストアド プロシージャ sp_update_schedule を使用し、 @enabled パラメーターおよび @schedule_id (または @name) パラメーターの値を指定することにより、所有していないスケジュールを有効または無効にできます。SQLAgentOperatorRole members can enable or disable schedules they do not own by using the stored procedure sp_update_schedule and specifying values for the @enabled and the @schedule_id (or @name) parameters. このロールのメンバーが、このストアド プロシージャに対して他のパラメーターを指定した場合、プロシージャの実行は失敗します。If a member of this role specifies any other parameters for this stored procedure, execution of the procedure will fail. |
適用なしNot applicable |
プロパティの表示View properties | はいYes | はいYes | はいYes | はいYes | はいYes | はいYes |
プロパティの編集Edit properties | いいえNo | いいえNo | 可 (所有しているジョブのみ)Yes (owned jobs only) | いいえNo | 可 (所有しているスケジュールのみ)Yes (owned schedules only) | いいえNo |
実行/停止/開始Execute/stop/start | 適用なしNot applicable | 適用なしNot applicable | はいYes | いいえNo | 適用なしNot applicable | 適用なしNot applicable |
ジョブ履歴の表示View job history | 適用なしNot applicable | 適用なしNot applicable | はいYes | はいYes | 適用なしNot applicable | 適用なしNot applicable |
ジョブ履歴の削除Delete job history | 適用なしNot applicable | 適用なしNot applicable | はいYes | いいえNo | 適用なしNot applicable | 適用なしNot applicable |
アタッチ/デタッチAttach/detach | 適用なしNot applicable | 適用なしNot applicable | 適用なしNot applicable | 適用なしNot applicable | 可 (所有しているスケジュールのみ)Yes (owned schedules only) | 適用なしNot applicable |
ユーザーへの複数のロールの割り当てAssigning Users Multiple Roles
固定サーバー ロール sysadmin のメンバーは、 SQL ServerSQL Server エージェントのすべての機能にアクセスできます。Members of the sysadmin fixed server role have access to all SQL ServerSQL Server Agent functionality. sysadmin ロールのメンバーではないが、 SQL ServerSQL Server エージェントの複数の固定データベース ロールのメンバーであるユーザーの場合、これらのロールの同心構造権限モデルについて覚えておくことが重要です。If a user is not a member of the sysadmin role, but is a member of more than one SQL ServerSQL Server Agent fixed database role, it is important to remember the concentric permissions model of these roles. 特権レベルの高いロールには常に、そのロールよりも特権レベルが低いロールの権限がすべて含まれているため、複数のロールのメンバーであるユーザーは、そのユーザーがメンバーとして属しているロールの中で、最も特権レベルの高いロールに関連付けられた権限を自動的に持っていることになります。Because more privileged roles always contain all the permissions of less privileged roles, a user who is a member of more than one role automatically has the permissions associated with the most privileged role that the user is a member of.
関連項目See Also
SQL Server エージェントのセキュリティの実装Implement SQL Server Agent Security
sp_update_job (Transact-SQL)sp_update_job (Transact-SQL)
sp_update_schedule (Transact-SQL)sp_update_schedule (Transact-SQL)
sp_notify_operator (Transact-SQL)sp_notify_operator (Transact-SQL)
sp_purge_jobhistory (Transact-SQL)sp_purge_jobhistory (Transact-SQL)