SQL 服务器错误 5:“5(访问被拒绝。)在尝试读取跟踪文件时
SQL Server error 5: “5(Access is denied.) while trying to read a trace file
我想读取跟踪文件的内容并将其写入 SQL 服务器中的 table。正如我所阅读的 here、fn_trace_gettable
所做的那样。我有这个代码:
select
IDENTITY(int, 1, 1) AS RowNumber, *
into
mytracetest
from
fn_trace_gettable('C:\Users\Babak\Desktop\ITSM_Trace\trace.trc', default)
但是我收到这个错误:
Msg 19049, Level 16, State 1, Line 1
File 'C:\Users\Babak\Desktop\ITSM_Trace\trace.trc' either does not exist or there was an error opening the file. Error = '5(Access is denied.)'.
我应该怎么做才能解决这个问题?
这是用于远程 SQL 服务器实例吗?
trace.trc
是否在 c:\users\babak\desktop\....
中该服务器的文件系统上?
SQL 服务器只能从它自己的驱动器读取 - 不能从您自己计算机上的本地磁盘读取...
我想读取跟踪文件的内容并将其写入 SQL 服务器中的 table。正如我所阅读的 here、fn_trace_gettable
所做的那样。我有这个代码:
select
IDENTITY(int, 1, 1) AS RowNumber, *
into
mytracetest
from
fn_trace_gettable('C:\Users\Babak\Desktop\ITSM_Trace\trace.trc', default)
但是我收到这个错误:
Msg 19049, Level 16, State 1, Line 1
File 'C:\Users\Babak\Desktop\ITSM_Trace\trace.trc' either does not exist or there was an error opening the file. Error = '5(Access is denied.)'.
我应该怎么做才能解决这个问题?
这是用于远程 SQL 服务器实例吗?
trace.trc
是否在 c:\users\babak\desktop\....
中该服务器的文件系统上?
SQL 服务器只能从它自己的驱动器读取 - 不能从您自己计算机上的本地磁盘读取...