Subiendo un archivo de Traza

20/05/2005 - 20:34 por Isaias Islas | Informe spam
Estoy intentando subir un archivo de traza (.trc) hacia una base de datos
que guardara TODAS LAS TRAZAS de mi servidor con la siguiente instruccion:

INSERT INTO dbo.T_BVI_AUDIT
(dbaTraceID, StartTime, EndTime, EventClass, EventSubClass
, TextData, BinaryData, Duration, Reads, Writes, CPU, DatabaseID
, DatabaseName, TransactionID, SPID, NTUserName, NTDomainName
, HostName, ClientProcessID, LoginName, DBUserName
, ApplicationName, [Permissions], Severity, Success, IndexID
, IntegerData, ServerName, ObjectType, NestLevel, State, Error
, Mode, Handle, ObjectID, ObjectName, [FileName], OwnerName
, RoleName, TargetUserName, LoginSid
, TargetLoginName, TargetLoginSid, ColumnPermissions)

SELECT 1,StartTime, EndTime, EventClass, EventSubClass
, TextData, BinaryData, Duration, Reads, Writes, CPU, DatabaseID
, DatabaseName, TransactionID, SPID, NTUserName, NTDomainName
, HostName, ClientProcessID, LoginName, DBUserName
, ApplicationName, [Permissions], Severity, Success, IndexID
, IntegerData, ServerName, ObjectType, NestLevel, State, Error
, Mode, Handle, ObjectID, ObjectName, [FileName], OwnerName
, RoleName, TargetUserName, LoginSid
, TargetLoginName, TargetLoginSid, ColumnPermissions
FROM ::fn_trace_gettable('E:\TRAZA\sqltrace.trc', default)

Recibo este error:

Server: Msg 8626, Level 16, State 1, Line 1
Only text pointers are allowed in work tables, never text, ntext, or image
columns. The query processor produced a query plan that required a text,
ntext, or image column in a work table.

¿Alguna guia?

Gracias.
 

Leer las respuestas

#1 Alejandro Mesa
20/05/2005 - 21:31 | Informe spam
Isaias,

Chequea primero los maximos valores de tamaño de las columnas textdata y
binarydata, posiblemente sean mayor a 8000 y sql necesite un work table.
Puedes hacer una prueba haciendo un select ... into haber si te da el mismo
error.

select max(datalength(textdata)), max(datalength(binarydata))
from ::fn_trace_gettable(...


AMB

"Isaias Islas" wrote:

Estoy intentando subir un archivo de traza (.trc) hacia una base de datos
que guardara TODAS LAS TRAZAS de mi servidor con la siguiente instruccion:

INSERT INTO dbo.T_BVI_AUDIT
(dbaTraceID, StartTime, EndTime, EventClass, EventSubClass
, TextData, BinaryData, Duration, Reads, Writes, CPU, DatabaseID
, DatabaseName, TransactionID, SPID, NTUserName, NTDomainName
, HostName, ClientProcessID, LoginName, DBUserName
, ApplicationName, [Permissions], Severity, Success, IndexID
, IntegerData, ServerName, ObjectType, NestLevel, State, Error
, Mode, Handle, ObjectID, ObjectName, [FileName], OwnerName
, RoleName, TargetUserName, LoginSid
, TargetLoginName, TargetLoginSid, ColumnPermissions)

SELECT 1,StartTime, EndTime, EventClass, EventSubClass
, TextData, BinaryData, Duration, Reads, Writes, CPU, DatabaseID
, DatabaseName, TransactionID, SPID, NTUserName, NTDomainName
, HostName, ClientProcessID, LoginName, DBUserName
, ApplicationName, [Permissions], Severity, Success, IndexID
, IntegerData, ServerName, ObjectType, NestLevel, State, Error
, Mode, Handle, ObjectID, ObjectName, [FileName], OwnerName
, RoleName, TargetUserName, LoginSid
, TargetLoginName, TargetLoginSid, ColumnPermissions
FROM ::fn_trace_gettable('E:\TRAZA\sqltrace.trc', default)

Recibo este error:

Server: Msg 8626, Level 16, State 1, Line 1
Only text pointers are allowed in work tables, never text, ntext, or image
columns. The query processor produced a query plan that required a text,
ntext, or image column in a work table.

¿Alguna guia?

Gracias.



Preguntas similares