Page 1 of 3 123 LastLast
Results 1 to 15 of 45
  1. #1
    Join Date
    Jan 2004
    Posts
    8

    Unanswered: Royal f-up, dropped user default database

    I am by no means a db administrator, so I apologize for my ignorance. However I do know that I screwed up and am unable to find the solution...

    The small company I work for has a development SQL Server where we do testing and development for web based applications. While using SQL Server Enteprise Manager I accidentally dropped the user's default default database.

    I have always been able to access the enteprise manager via windows authentication, but now I am unable to. Is there any way to set the default database back to 'master'? Currently I cannot connect with SQL Query Analyzer for the same reasons, and do not have any other access except via windows authentication. Is there any hope? Any help is much appreciated.

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    WOW

    I was waiting for one of these posts...

    What was the "default" database...it was master...wasn't it....

    Can you explorer the hard drive? Go look and see if there is a master.mdf file out there...otherwise you'll have to rebuild master

    Depending on what you have on that box, it might be easier to reinstall....

    To rebuild master you'll need to find rebuildm.exe

    But I've never done this....never had to....

    I need to build an instance, destroy it, and see I I can get it working again...

    Did you say SQL 2K or V7?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

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

  3. #3
    Join Date
    Jan 2004
    Posts
    8

    Thank god it wasn't master

    It looks like the default database was set to this very old database that had no tables, stored procedures, etc. So while doing clean up I dropped the database, unknowingly deleting the default database. Yeah, I get the moron award for the day.

  4. #4
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    dropped the Master database ...

    as brett already said it ... WOW ....

    is it even possible to ....

    need to check it out

    Thats one i would like to solve ... install ... drop master database .... rebuild master ...
    Get yourself a copy of the The Holy Book

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

  5. #5
    Join Date
    Jan 2004
    Posts
    8

    Follow Up

    BTW, it is SQL 2K.

    Yes, I can explore the box and master.mdf is still intact.

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Do you have a dba handy?

    Can you edit your server registration?

    What security mode do you use? Is it windows only?

    What happend when you try and connect to the server.

    Is it the default instance...

    If you can't connect, do you think someone removed your id?

    If I found out you driopped a database on my box, I think that's what I'd do...

    But then again, I wouldn't have given you that authority...

    What's the Registration say...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

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

  7. #7
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    You should be able to get this back with an administrator ID (either SA or local administrator logged in with widows authentication), but it will require a few cyclings of the service.

    I believe (i.e. not tested) that if you restart the SQL instance with the -f flag (safe mode) you can log in with an admin ID, and run sp_defaultdb through query analyzer. Look up "Using Startup Options" in Books Online, and you should get an idea of what is involved. Good luck, and let us know how it comes out.

  8. #8
    Join Date
    Jan 2004
    Posts
    8

    The Admin account worked

    Thanks for the recommendation. Logging in as a network administrator I was able to access the database and change the other user's default database and set them back to master. I'll just chalk this up to learning a lesson the hard way.

    Thanks to all those that helped. Perhaps my boss will send me to some classes now?

  9. #9
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Why would he send you to training? My boss hasn't sent me, yet ;-)

  10. #10
    Join Date
    Aug 2003
    Location
    Andover, MA
    Posts
    256
    What is training? I've heard legends about it, but no one seems to really know what it is. I think it's a myth myself.
    -bpd

  11. #11
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    I was once in Training. It's where you sit in a mostly empty room with several other disinterested people desperately waiting for the next coffee break.

    At good Trainings they have snacks too.

    During Training, someone with enough intelligence to read a book but not enough to get a real job guides you through several scenarios specifically designed to avoid any problems or complications.

    The first hour of Training is an initiation ritual called "Logging In", where you have to endure the ordeal of excuses as to why the computers you are using weren't set up before hand.

    When you are done with Training, you are often allowed put special letters at the end of your name. It is a mark of honor.
    If it's not practically useful, then it's practically useless.

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

  12. #12
    Join Date
    Aug 2003
    Location
    Andover, MA
    Posts
    256
    You sure it was training you were at? Sounds like a software demo... Except for the letter thing.
    -bpd

  13. #13
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Training is basically a software demo that your company pays for.
    If it's not practically useful, then it's practically useless.

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

  14. #14
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    No Sh-t....they have classes for this stuff?


    DB2, OS/390, VM, VSAM, TSO, CICS, QSAM, BDAM, ISAM, Informix, OS/2, REXX, Oracle, M$ Family of (ahem) products....

    Damn....give me a good book any day....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

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

  15. #15
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Remember back in the Olde Days when you bought software you actually got a manual? -sigh-
    If it's not practically useful, then it's practically useless.

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

Posting Permissions

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