Results 1 to 5 of 5

Thread: SQL 2000 Error

  1. #1
    Join Date
    Feb 2003
    Posts
    5

    Question Unanswered: SQL 2000 Error

    A couple weeks ago, I set up a job to truncate our test databases log files and then shrink them to conserve space on our disk. At that time, everything went well. Now, I would like to run the same job again, but this time I receive the error: ""Could not locate entry in sysdatabases for database logname. No entry found with that name. Make sure that the name is entered correctly". The database itself is not 'suspect' and the dbname does exist in sysdatabases. However, the log name does not. Is the logname suppose to be in sysdatabases and, if so, how do I get it back in there?

  2. #2
    Join Date
    May 2002
    Posts
    299

    Re: SQL 2000 Error

    No.

    Master..sysdatabases only holds data referenced to the primary file (*.mdf).

    You could do "select * from sysfiles" to get the full path to the log.

    Btw, you would want to post the job code here so others can see and help.
    --
    -oj
    http://www.rac4sql.net

  3. #3
    Join Date
    Feb 2003
    Posts
    5

    SQL 2000 Error

    Here is the statement that I'm trying to execute:

    backup log databasename_Log
    with truncate_only

    This worked previously, but now I get:

    Server: Msg 911, Level 16, State 1, Line 1
    Could not locate entry in sysdatabases for database 'databasename_Log'. No entry found with that name. Make sure that the name is entered correctly.
    Server: Msg 3013, Level 16, State 1, Line 1
    BACKUP LOG is terminating abnormally.

    I have tried both just the name and the path to where the file resides. No luck.

    And, also, what do you mean about posting a job code?

  4. #4
    Join Date
    May 2002
    Posts
    299

    Re: SQL 2000 Error

    Here is the proper format for truncating log...


    Truncating the transaction log:

    BACKUP LOG { database_name | @database_name_var }
    {
    [ WITH
    { NO_LOG | TRUNCATE_ONLY } ]
    }
    --
    -oj
    http://www.rac4sql.net

  5. #5
    Join Date
    Feb 2003
    Posts
    5

    Talking SQL 2000 Error

    Thanks oj_n, I finally figured it out. I was using the Log file name instead of that actual database name.

Posting Permissions

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