Thursday, March 8, 2012
Database acess logscan error
I currently have an issue trying to access my database in SQLexpress2005. Whenever i try to start the service it errors out. I looked at the error in event viewer and it says says
"The log scan number passed out to log scan in database 'master' is not valid. This error my indicate data corruption or that the ldf does not match the mdf...."
How can i fix this problem seing as though i can not access studio manager to restore the db?
Bradif possible reinstall the MS sql server express edition.I fear your master db somehow got corrupted.
Database Access Error?
I got this error and ive no idea whey, whenever i click on a database in Visual Studio 2005, to use it (i was on my way to do stored procedures) i get that error.
Also, when the web application is running i get this error:
"Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.Login failed for user 'DOUGAL\dougal.m*******'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below."
I stared out my 2nd name. I realise this seems to be a failure to login to the database, however, they are file databases and i'm not aware of having ever set a password for either of them!
I also tried deleting the databases to add them again (they have no data at the moment) and i get the same error in Visual Studio and it doesnt let me.
Any suggestions will be greatly appreciatedLog in your system as DOUGAL\dougal.m*******, and go to the directory D:\www\Flougal\App_Data and see if you can first, even get there, and if you can, see if you can even see the database.mdf file, I'm guessing you can't. It's not a SQL Permissions error, it's an OS error (it mentions that in the error). That user can't open that file (in fact, you that user can't even SEE that file).|||i'm afraid i actually can see the file logged in as that user in the error|||Managed to fix the problem.
It turns out a file database cant be attached to a database server in the SQL Server Management Studio aswell as being used in VS2005.
Silly me.