Results 1 to 11 of 11

Thread: Weird Issue

  1. #1
    Join Date
    Mar 2009
    Posts
    32

    Unanswered: Weird Issue

    It is not my first time to have the same issue when using Microsoft products.
    If I run a program a batch-by-batch, it has no issue at all. If I run the whole program through, I will get stange errors. Here is one example I came across recently.

    USE [A]
    GO
    DBCC CHECKDB('A')
    GO
    USE [B]
    GO
    DBCC CHECKDB('B')
    GO

    When I ran it through, it works sometimes and fails sometimes. If I run a batch-by-batch, I never have any issue.

    Anyone came across the same issue? Any input will be greatly appreciated.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Describe "fails" please.

    -PatP

  3. #3
    Join Date
    Mar 2009
    Posts
    32
    Here is the error message:

    DBCC results for 'sysobjects'. [SQLSTATE 01000] (Message 2536) There are 214 rows in 5 pages for object 'sysobjects'. [SQLSTATE 01000] (Message 2593) DBCC results for 'sysindexes'. [SQLSTATE 01000] (Message 2536) There are 230 rows in 11 pages for object 'sysindexes'. [SQLSTATE 01000] (Message 2593) DBCC results for 'syscolumns'. [SQLSTATE 01000] (Message 2536) There are 731 rows in 15 pages for object 'syscolumns'. [SQLSTATE 01000] (Message 2593) DBCC results for 'systypes'. [SQLSTATE 01000] (Message 2536) There are 26 rows in 1 pages for object 'systypes'. [SQLSTATE 01000] (Message 2593) DBCC results for 'syscomments'. [SQLSTATE 01000] (Message 2536) There are 187 rows in 13 pages for object 'syscomments'. [SQLSTATE 01000] (Message 2593) DBCC results for 'sysfiles1'. [SQLSTATE 01000] (Message 2536) There are 2 rows in 1 pages for object 'sysfiles1'. [SQLSTATE 01000] (Message 2593) DBCC results for 'syspermissions'. [SQLSTATE 01000] (... The step failed.

  4. #4
    Join Date
    Apr 2008
    Location
    Along the shores of Lake Michigan
    Posts
    242
    Run DBCC CHECKDB WITH ALL_ERRORMSGS, NO_INFOMSGS and post the results, in its entirety. I can't tell if it's database A or B but if you know which it is, run it on that database. I don't see signs of corruption - YET - based on what you've posted. Anything in the SQL error log?

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Are you running this through DTS, SSIS, or some other job scheduler?
    These tools unfortunately only allow you to define one exit code as "success". Its possible that your script generates different exit codes for different statuses, all of which may indicate successful completion, but which the job scheduler is misinterpreting.
    I've had this happen many times, unfortunately.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Mar 2009
    Posts
    32
    My job is as simple as the post at very top. There is no any self-defined exit code.

  7. #7
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You have not answered my question.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  8. #8
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The problem is that you've only posted part of the output from the commands, and probably only a very small part at that. Without more information, we can't help you resolve your problem.

    Based on the information that you've posted so far, it looks like the DBCC command may be raising an "informational error" that gives information about what the DBCC command did without implying any kind of failure.

    I'm pretty sure that that is what Blindman was referring to (he almost always knows what he's talking about, but doesn't always do a good job of explaining that for people with less experience than he has).

    In order to help us to help you, please run the following command and post ALL of its output. Execute this from a command window, not from within a job:
    Code:
    USE [A]
    GO
    DBCC CHECKDB('A') WITH ALL_ERRORMSGS, NO_INFOMSGS
    GO
    USE [b]
    GO 
    DBCC CHECKDB('B') WITH ALL_ERRORMSGS, NO_INFOMSGS
    GO
    -PatP

  9. #9
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Truth is, I just keep my answers fuzzy and generic, like a horoscope.
    By the way, Pat. Today is a good day for you to write UNION queries. Avoid composite indexes until April.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  10. #10
    Join Date
    Mar 2009
    Posts
    32
    My code is as simple as I posted. The error message has been copied to the above without missing a single letter.
    The only change in the above is to change our database in production environment to 'A' and 'B'.

    I ran the scripts manually and also in schedule without any difference.

  11. #11
    Join Date
    Jun 2007
    Location
    Ohio, USA
    Posts
    142
    SQL ORACLE

    Do you see the parenthesis and three dots at the end of your error message? "(..."

    That means that wherever you copied it from did not display the entire error message.

    You need to run the code you have been provided from Query Analyzer, and post the entire output (from Query Analyzer) in here.

    That simple enough?
    David Maxwell
    Data Integrity? Yeah, I've heard of that...

Posting Permissions

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