91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》
  • 首頁 > 
  • 教程 > 
  • 數據庫 > 
  • SQL Server專用管理員連接(Dedicated Admin Connection(DAC))

SQL Server專用管理員連接(Dedicated Admin Connection(DAC))

發布時間:2020-07-15 21:31:02 來源:網絡 閱讀:4495 作者:UltraSQL 欄目:數據庫

SQL Server專用管理員連接(Dedicated Admin Connection(DAC))

 

只有 SQL Server sysadmin 角色的成員可以使用 DAC 連接。默認情況下,只能從服務器上運行的客戶端建立連接。

 

打開SSMS,在“Connect to Server”窗口,選擇“Cancel”,然后選擇File菜單,下拉菜單選擇“New”、“Database Engine Query”。

SQL Server專用管理員連接(Dedicated Admin Connection(DAC))

輸入“admin:.”,點擊“Connect”。

SQL Server專用管理員連接(Dedicated Admin Connection(DAC))

默認不允許使用網絡連接DAC,需要通過sp_configure配置“remote admin connections”選項。

 

先來看看配置的默認值:

SELECT * FROM sys.configurations where name = 'remote admin connections'

或者

sp_configure 'remote admin connections'

SQL Server專用管理員連接(Dedicated Admin Connection(DAC))

Value默認為0,指明僅允許本地連接使用 DAC。Maximum為1,表明只運行一個遠程管理連接。

 

--啟用遠程DAC連接
sp_configure 'remote admin connections', 1;
GO
RECONFIGURE;
GO

輸出:

Configuration option 'remote admin connections' changed from 0 to 1. Run the RECONFIGURE statement to install.

 

然后開啟SQL Server Browser服務,防火墻允許TCP 1434端口的訪問。

我們通過另一臺服務器上的SSMS建立DAC查詢連接,選擇File菜單,下拉菜單選擇“New”、“Database Engine Query”。

SQL Server專用管理員連接(Dedicated Admin Connection(DAC))

輸入域名或IP即可。

 

DAC在SSMS連接時,只能通過建立查詢窗口的方式打開。當SQL Server因系統資源不足,或其它異常導致無法建立數據庫連接時, 可以使用系統預留的DAC連接到數據庫,進行一些問題診斷和故障排除。DAC只能使用有限的資源。請勿使用DAC運行需要消耗大量資源的查詢,否則可能發生嚴重的阻塞。

 

另一種打開方式是在命令行界面通過SqlCMD使用特殊的管理員開關(-A),提供對DAC的支持。

 

本地DAC連接:

SQL Server專用管理員連接(Dedicated Admin Connection(DAC))

遠程DAC連接:

SQL Server專用管理員連接(Dedicated Admin Connection(DAC))

 

《SQL Server 2012 Internals》有這么一段話:

SQL Server maintains a set of tables that store information about all objects, data types, constraints,confguration options, and resources available to SQL Server. In SQL Server 2012, these tables are called the system base tables. Some of the system base tables exist only in the master database and contain system-wide information; others exist in every database (including master) and contain information about the objects and resources belonging to that particular database. Beginning with SQL Server 2005, the system base tables aren’t always visible by default, in master or any other database. You won’t see them when you expand the tables node in the Object Explorer in SQL Server Management Studio, and unless you are a system administrator, you won’t see them when you execute the sp_help system procedure. If you log on as a system administrator and select from the catalog view called sys.objects (discussed shortly), you can see the names of all the system tables. For example, the following query returns 74 rows of output on my SQL Server 2012 instance:


USE master;

SELECT name FROM sys.objects

WHERE type_desc = 'SYSTEM_TABLE';


But even as a system administrator, if you try to select data from one of the tables returned by the preceding query, you get a 208 error, indicating that the object name is invalid. The only way to see the data in the system base tables is to make a connection using the dedicated administrator connection (DAC), which Chapter 2, “The SQLOS,” explains in the section titled “The scheduler.” Keep in mind that the system base tables are used for internal purposes only within the Database Engine and aren’t intended for general use. They are subject to change, and compatibility isn’t guaranteed. In SQL Server 2012, three types of system metadata objects are intended for general use: Compatibility Views, Catalog Views, and Dynamic Management Objects.

 

例如,在SSMS中連接普通查詢連接,輸入:

SELECT * FROM sys.sysrmtlgns;

輸出:

Msg 208, Level 16, State 1, Line 1

Invalid object name 'sys.sysrmtlgns'.

 

建立DAC連接,輸入:

SELECT net_transport,auth_scheme,client_net_address FROM sys.dm_exec_connections WHERE session_id=@@spid;
SELECT * FROM sys.sysrmtlgns;
SELECT * FROM sys.syslnklgns;

SQL Server專用管理員連接(Dedicated Admin Connection(DAC))

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

永泰县| 城市| 武乡县| 龙口市| 丹巴县| 兴安县| 乐昌市| 平度市| 宝清县| 洛浦县| 宜昌市| 弥勒县| 南通市| 平安县| 樟树市| 镇康县| 吉林市| 宁安市| 昌乐县| 奇台县| 故城县| 大同县| 扎鲁特旗| 普陀区| 无锡市| 松滋市| 长垣县| 涟源市| 田阳县| 微山县| 沁源县| 平塘县| 苍南县| 囊谦县| 福建省| 静宁县| 驻马店市| 吕梁市| 保靖县| 普定县| 建湖县|