Thứ Tư, 15 tháng 6, 2016

Cấu hình SQL server để thấy được Map network driver

1. Map ổ đĩa. Ví dụ map địa chỉ \\qud\Database-AX vào ổ Z.
2. Chạy script sau trong sql server (yêu cầu quyền hệ thống):


Use Master
GO

EXEC master.dbo.sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO

EXEC master.dbo.sp_configure 'xp_cmdshell', 1
RECONFIGURE WITH OVERRIDE
GO


EXEC XP_CMDSHELL 'net use Z: \\qud\Database-AX'
EXEC XP_CMDSHELL 'Dir Z:'

EXEC master.dbo.sp_configure 'xp_cmdshell', 0
RECONFIGURE WITH OVERRIDE
GO

EXEC master.dbo.sp_configure 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
GO

Tới đây browse thư mục bằng sql server sẽ thấy thư mục Z.

0 nhận xét:

Đăng nhận xét