cannot opon user default database emergency

i had a log file that was full.

normally you can delete the log file if you detach the database .  delete the log  then reattach the database.

well.. like a doofus  i stopped the server... deleted the log file and then tried to restart the server.

no matter what i do   windows authentication,  sql authentication

cannot open user default database

i tried osql at command prompt

osql -U username
it asked for password...  good sign,   but when i put in the password

cannot open user default database

tried
osql -E
cannot open user default database

the only file i deleted was the dbname_log.ldf file

pleaes help
CASorterAsked:
Who is Participating?
 
TiberiuGalCommented:
hi,
have a look at this post :
http://www.tek-tips.com/faqs.cfm?fid=6260
0
 
CASorterAuthor Commented:
ok
i was able to get in using isqlw  and putting in the master database as the connection

the database i was looking for was not in the drop down for the databases

i tried to attach it,  said it already existed

i tried to detatch it  said it could not detatch cleanly

i tried to reattach it again.
said .ldf file was wrong

i am getting close...

any other suggestins would be appreciated
0
 
Anthony PerkinsCommented:
>>normally you can delete the log file if you detach the database .  delete the log  then reattach the database.<<
As I have mentioned to you before this is a very bad idea.  You do it at your own peril.
0
 
Anthony PerkinsCommented:
Here is another Hail Mary link:
Recovering from a deleted log file on SQL Server
http://www.spaceprogram.com/knowledge/sqlserver_recover_from_deleted_log.html

If that does not do it for you, than you may want to start searching for your backups.  I trust you have backups, right?
0
 
CASorterAuthor Commented:
i would hug you if i could
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.