Getting error while inserting data in a table.

  • I ran a server side trace last night because we were having some issues and I wanted to know what was going on. Trace ran successfully but now I am trying to access the data by creating a table and inserting all the information on it but getting this error. Please see the attachment.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • You might want to change your table definition to prevent truncation errors.

    CREATE TABLE dbo.TraceResults(

    TextData nvarchar(max) NULL,

    ApplicationName nvarchar(256) NULL,

    NTUserName nvarchar(256) NULL,

    LoginName nvarchar(256) NULL,

    CPU int NULL,

    Reads bigint NULL,

    Writes bigint NULL,

    Duration bigint NULL,

    ClientProcessID int NULL,

    SPID int NULL,

    StartTime datetime NULL,

    EndTime datetime NULL

    )

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares (9/5/2014)


    You might want to change your table definition to prevent truncation errors.

    CREATE TABLE dbo.TraceResults(

    TextData nvarchar(max) NULL,

    ApplicationName nvarchar(256) NULL,

    NTUserName nvarchar(256) NULL,

    LoginName nvarchar(256) NULL,

    CPU int NULL,

    Reads bigint NULL,

    Writes bigint NULL,

    Duration bigint NULL,

    ClientProcessID int NULL,

    SPID int NULL,

    StartTime datetime NULL,

    EndTime datetime NULL

    )

    Thanks Luis, It worked pretty good.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply