Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Posts
    4

    Question Unanswered: Transaction Logs Failing

    All,

    I am new-ish to SQL servers, and I am having a real issue with my tansaction logs. I am running a SQL 7.0 server, on a NT 4 platform, with SQL SP4 and NT SP 6a.

    I recieve error 4213, which according to the Microsoft website means that a non-logged operation has occured. So, first question, what is a non-logged operation?

    I understand that essentially the error is saying that by performing the transaction log it will not be able to restore the DB to a point in time (i.e. the point of a TRN backup), but I am at a loss as to what could have caused this. Any Ideas?

    I have scripted the job (which can be seen at the end of this thread), and I don't think that I have done anything wrong, but if you can check it would be most helpful. I have also ensured that the 'Truncate on checkpoint' is not selected.

    Please can someone start pointing me in a direction that can help.

    Thanks in advance.

    Stewart

    Script:

    set nocount on
    declare @dbname varchar(40)
    declare @dumplogname char(80)
    declare @dumppath varchar (30)

    select @dumppath = 'D:\MSSQL7\BACKUP\'

    declare dblist_cursor cursor
    for select name
    from master..sysdatabases
    where name not in ('model', 'Northwind', 'pubs', 'tempdb', 'msdb', 'master', 'distribution')

    open dblist_cursor

    fetch next from dblist_cursor into @dbname

    while @@fetch_status = 0
    begin
    select @dumplogname = @dumppath + @dbname + '_tlog_'
    + cast(datepart(year, getdate()) as varchar(10))
    + replace(str(cast(datepart(month, getdate()) as varchar(10)), 2, 0), ' ', '0')
    + replace(str(cast(datepart(day, getdate()) as varchar(10)), 2, 0), ' ', '0')
    + replace(str(cast(datepart(hour, getdate()) as varchar(10)), 2, 0), ' ', '0')
    + replace(str(cast(datepart(minute, getdate()) as varchar(10)), 2, 0), ' ', '0')
    + '.TRN'

    BACKUP LOG @dbname
    TO DISK = @dumplogname
    WITH INIT, NOUNLOAD, NOSKIP, STATS = 10, NOFORMAT

    RESTORE VERIFYONLY FROM DISK = @dumplogname
    WITH FILE = 1, NOUNLOAD

    fetch next from dblist_cursor into @dbname
    end

    deallocate dblist_cursor

  2. #2
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    So, first question, what is a non-logged operation?
    There you go again !!! Did I not say ... there is no thing as a non logged operation .

    You might want to search your code for the following so called non - logged operations

    *SELECT INTO
    *BULK COPY and Bulk Copy Program (BCP)
    *CREATE INDEX
    *Certain text operations"

    *Truncate
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •