Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Apr 2003
    Posts
    12

    Question Unanswered: error attaching db...

    Hello,

    I tried to attach my database (SQL Server 2000 w/ SP3) at work after taking it home to work on it and it gave me an error.

    I tried to attaching my backup one as one (which use to work) and now does not. I treid to attach other DB's and they are fine.

    The error message displayed on the screen is:

    ------------
    Microsoft SQL-DMO (ODBC SQLState:HY000)

    X Error 3264
    Location: recbase.cpp:1374
    Expression: m_nVars > 0
    SPID: 51
    Process ID: 1004
    -----------

    The error message recorded in Event Viewer is:

    -------------------
    Event ID: 17055

    17066 :
    SQL Server Assertion: File: <recbase.cpp>, line=1374
    Failed Assertion = 'm_nVars > 0'.

    -------------------

    Any ideas what could have gone wrong? or is it simply a matter of reinstalling SQL server.

    thanks,

    JP

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Check this SQLMAG forum link for information.

    HTH
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Apr 2003
    Posts
    12

    Interesting...

    Originally posted by Satya
    Check this SQLMAG forum link for information.

    HTH
    Hey satya,

    thanks for the heads up. I don't understand why it should be a SP issue because both of them are the same and it use to work before. Last week, I did the same... detach the DB, worked on it at home and rettached it back at work... no problem.

    Oh well, such is life ... full of disappointments. I'll reintall the SP and see what happens. Maybe I'll do a windows update as well cuz we never know if it does affect anything else.

    I'll report back should I get the problem fixed.

    thanks,

    JP

  4. #4
    Join Date
    Apr 2003
    Posts
    12

    Re: Interesting...

    Originally posted by globeuser
    Hey satya,

    thanks for the heads up. I don't understand why it should be a SP issue because both of them are the same and it use to work before. Last week, I did the same... detach the DB, worked on it at home and rettached it back at work... no problem.

    Oh well, such is life ... full of disappointments. I'll reintall the SP and see what happens. Maybe I'll do a windows update as well cuz we never know if it does affect anything else.

    I'll report back should I get the problem fixed.

    thanks,

    JP

    Nope.. same error result. did not work. I've reapplied SP3 and unfortunately I'm still getting this error.

    One factor though... I ftp'd down the DB instead of making a copy on the CD but I've downloaded them a number of times and still the same error appears.

    any other ideas anyone?

    kinda desperate ;-) Guess I'll have to reinstall?

    JP

  5. #5
    Join Date
    Apr 2003
    Posts
    12
    Originally posted by Satya
    Check this SQLMAG forum link for information.

    HTH

    Yup... looks like a reinstall is the only option because I am now getting another error message:

    -------------------------

    Microsoft SQL-DMO (ODBC SQLState:42000)

    X Error 1813: Cound not opne new database 'MyProject'. CREATE DATABASE is aborterd.
    SQlDumpExceptionHandler: Process 51 genrated fatal exception c0000005 EXCEPTION_ACCESS_violation
    Server is terminating this process.

    -------------------------

    any other ideas?

    JP

  6. #6
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Last resort to contact MS PSS for any fix on this EAV issues.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  7. #7
    Join Date
    Apr 2003
    Posts
    12

    Problem fixed...

    Originally posted by Satya
    Last resort to contact MS PSS for any fix on this EAV issues.
    I had a hunch that it might just be as simple s this but I remembered that when I tried to detach it, it took some time because there were stilll some connections to it and I "forced it" to disconnect. It should not take that long because I have a very fast machine.

    Lucky for me that the database was still there and I reattached it again first thing before any connections or apps have access to it.

    The detachment is now clean and was able to attach it now to another machine.

    The lesson learned is that the detach process was dirty or forced and all I had to do was to do it again before any other applications has a lock on it.

    JP

  8. #8
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Thats fine, but before you detach make sure to run health checks and DBCC against the database to make sure its lively.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  9. #9
    Join Date
    Apr 2003
    Posts
    12
    Originally posted by Satya
    Thats fine, but before you detach make sure to run health checks and DBCC against the database to make sure its lively.
    Sorry, but how do you do that? I noticed that when I tried to run one of my stored procedures or view the properties in the DB, i get an error displayed...

    And when I tried to delete the stored procedure to recreate it won't allow me to or can't delete it!

    -----------------
    Microsoft SQL-DMO (ODBC SQLState:HY000)

    X Error 605: Attempt to to fetch logical page (1:0) in database 'MyProject' belongs to object 'ALLOCATION', not to object 'syscomments'.
    ------------------

    I am running ColdFusion 5 and this was what was displayed.

    ------------------
    ODBC Error Code = S1000 (General error)

    [Microsoft][ODBC SQL Server Driver][SQL Server]Attempt to fetch logical page (1:0) in database 'MyProject' belongs to object 'ALLOCATION', not to object 'syscomments'.
    ------------------


    As I said, the SP works in my other machine and only when I move it over to this one that the error pops up.

    ideas anyone?

    JP

  10. #10
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    This error occurs when SQL detcts any database corruption and to determine the full extent of the corruption, execute DBCC CHECKDB as soon as possible. Also check the error log for other errors, which often accompany a 605 error.

    For more information on CHECKDB refer to books online.

    My suggestion is to keep database in DBO Use only until you resolve the corruption on the database, do not allow any other process to deal with until this gets fixed.

    HTH
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  11. #11
    Join Date
    Apr 2003
    Posts
    12
    Originally posted by Satya
    This error occurs when SQL detcts any database corruption and to determine the full extent of the corruption, execute DBCC CHECKDB as soon as possible. Also check the error log for other errors, which often accompany a 605 error.

    For more information on CHECKDB refer to books online.

    My suggestion is to keep database in DBO Use only until you resolve the corruption on the database, do not allow any other process to deal with until this gets fixed.

    HTH
    I tried correcting the db is single-user mode but when i tried to execute

    dbcc checkdb ('MyProject', REPAIR_ALLOW_DATA_LOSS )

    it notifies me that I should be in single-user mode which I already am and won't continue.!

    perhaps I should just reinstall SQL... good thing I keep a script of table creation and sp procedures.

    JP

  12. #12
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Make sure you haven't opened or accessed same DB in EM and QA.
    Its not necessarily to have DB in singel-user mode when running DBCC CHECKDB, you can kill any other process which is involved to access during this execution.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  13. #13
    Join Date
    Apr 2003
    Posts
    12
    Originally posted by Satya
    Make sure you haven't opened or accessed same DB in EM and QA.
    Its not necessarily to have DB in singel-user mode when running DBCC CHECKDB, you can kill any other process which is involved to access during this execution.
    I'm sure i haven't got any connections to it. I just finished installing it and still same errors... *sigh*

  14. #14
    Join Date
    Apr 2003
    Posts
    12

    Question funny thing...

    I downloaded the same DB from another machine and to my surprise this was not corrupt at all. Perhaps its the target machine where I uploaded it to that caused the error. There are so many factors that I would not be surprised a simple thing such as these may be the cause in the first place.

    thanks for the checkdb info.

    JP

  15. #15
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    If the problem persists from Database there is no use if SQL Server is reinstalled. Try to fix the corruption on the database level.

    As you've scripts for the database, export important data using DTS to a text file and recreate the DB using scripts and import using DTS, it may work.

    Meanwhile have a sneak thru SQL Error log for any information.

    All the best.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

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