SqlCacheDependencyAdmin.DisableTableForNotifications 메서드

정의

SQL Server 데이터베이스 테이블 또는 데이터베이스 테이블 배열에서 SqlCacheDependency 변경 알림을 사용하지 않도록 설정합니다.

오버로드

Name Description
DisableTableForNotifications(String, String)

SQL Server 데이터베이스 테이블에서 SqlCacheDependency 변경 알림을 사용하지 않도록 설정합니다.

DisableTableForNotifications(String, String[])

SQL Server 데이터베이스 테이블 배열에서 SqlCacheDependency 변경 알림을 사용하지 않도록 설정합니다.

DisableTableForNotifications(String, String)

SQL Server 데이터베이스 테이블에서 SqlCacheDependency 변경 알림을 사용하지 않도록 설정합니다.

public:
 static void DisableTableForNotifications(System::String ^ connectionString, System::String ^ table);
public static void DisableTableForNotifications(string connectionString, string table);
static member DisableTableForNotifications : string * string -> unit
Public Shared Sub DisableTableForNotifications (connectionString As String, table As String)

매개 변수

connectionString
String

SQL Server 데이터베이스에 연결하는 데 사용되는 연결 문자열.

table
String

변경 알림을 사용하지 않도록 설정할 데이터베이스 테이블입니다.

예외

변경 알림에 데이터베이스를 사용할 수 없습니다.

table 은 빈 문자열("")입니다.

tablenull입니다.

데이터베이스에 대한 연결을 설정할 수 없습니다.

-또는-

ASP.NET 애플리케이션의 보안 컨텍스트에는 데이터베이스에 연결할 수 있는 권한이 없습니다.

-또는-

ASP.NET 애플리케이션의 보안 컨텍스트에는 데이터베이스에 대한 알림을 사용하지 않도록 설정할 수 있는 권한이 없습니다.

예제

다음 코드 예제에서는 연결 문자열 MyConnectionString 지정된 테이블에서 변경 알림을 사용하지 않도록 설정합니다.

예제를 실행하는 데 필요한 전체 코드는 클래스 개요 항목의 예제 섹션을 SqlCacheDependencyAdmin 참조하세요.

SqlCacheDependencyAdmin.EnableTableForNotifications(
  ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString,
  tableName.Text);
SqlCacheDependencyAdmin.EnableTableForNotifications( _
  ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString, _
  tableName.Text)

설명

이 메서드는 DisableTableForNotifications 매개 변수에 지정된 데이터베이스에 table 있어야 하는 매개 변수에 지정된 connectionString 테이블에 대한 변경 알림을 사용하지 않도록 설정합니다.

이 메서드를 DisableTableForNotifications 사용하여 테이블에 대한 변경 알림을 사용하지 않도록 설정한 후에는 변경 알림을 다시 사용하도록 설정하려면 오버로드 중 EnableTableForNotifications 하나를 사용해야 합니다.

적용 대상

DisableTableForNotifications(String, String[])

SQL Server 데이터베이스 테이블 배열에서 SqlCacheDependency 변경 알림을 사용하지 않도록 설정합니다.

public:
 static void DisableTableForNotifications(System::String ^ connectionString, cli::array <System::String ^> ^ tables);
public static void DisableTableForNotifications(string connectionString, string[] tables);
static member DisableTableForNotifications : string * string[] -> unit
Public Shared Sub DisableTableForNotifications (connectionString As String, tables As String())

매개 변수

connectionString
String

SQL Server 데이터베이스에 연결하는 데 사용되는 연결 문자열.

tables
String[]

변경 알림을 사용하지 않도록 설정할 SQL Server 데이터베이스 테이블의 배열입니다.

예외

변경 알림에 데이터베이스를 사용할 수 없습니다.

매개 변수의 값 tables 중 하나는 .입니다 null.

-또는-

매개 변수의 값 tables 중 하나는 빈 문자열("")입니다.

tablesnull입니다.

데이터베이스에 대한 연결을 설정할 수 없습니다.

-또는-

ASP.NET 애플리케이션의 보안 컨텍스트에는 데이터베이스에 연결할 수 있는 권한이 없습니다.

-또는-

ASP.NET 애플리케이션의 보안 컨텍스트에는 데이터베이스에 대한 알림을 사용하지 않도록 설정할 수 있는 권한이 없습니다.

설명

이 메서드는 DisableTableForNotifications 매개 변수에 지정된 tables 테이블에서 변경 알림을 제거합니다. 이러한 테이블은 매개 변수에 지정된 데이터베이스에 connectionString 있어야 합니다.

이 메서드를 DisableTableForNotifications 사용하여 테이블 목록에 대한 변경 알림을 사용하지 않도록 설정한 후에는 변경 알림을 다시 사용하도록 설정하려면 오버로드 중 EnableTableForNotifications 하나를 사용해야 합니다.

적용 대상