Sunday, February 19, 2012

File Headers SQL Express

I apparently have corrupted my file header on my database, and then copied it to my backup database.

Is there some way

1. to have the machine recreate the file header automatically? and fix it so that I can use the database

or

2. a back door into the database so that I can get the text files of my database to reconstruct the database from scratch.

The error mesage I receive is:

Database schema could not be retrieved for this connection. Please make sure the connection settings are correct and that the datase is online.

the header for fil c:\inetpub\wwwroot\nappapfinal\APP_Data\ASPNETDB.MDF is not a valide database header. The File Size property is incorrect.

Thank you

Unfortunately, if the header records within a database file are corrupt, that database is toast.

I'd ask about your most recent backup, but from your question I'm guessing there isn't one.

|||

well the problem was that I was backing up the db when this happened so both were toast. I had a third back up which will have to do however when I uploaded that one I developed a problem with adding users to the db through the web interface... below is my error message: do you have any ideas? thanks in advance for you help.

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: Procedure or Function 'aspnet_Membership_CreateUser' expects parameter '@.TimeZoneAdjustment', which was not supplied.

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.

|||

It looks like a mismatch between the web interface and the stored procedures in the database.

Have there been any updates to the application since the time of the backup you were able to restore?

If so, you may just need to re-apply them, or at least the portion that modified the database contents/procedures.

|||

I tried to update the users through the web admin tool also, but that wouldn't let me add users, just roles and manage rules in the web admin tool which I believe may have locked me out of adding users somehow? throws a different error message see below:

An error was encountered. Please return to the previous page and try again.

The following message may help in diagnosing the problem: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Administration.WebAdminMembershipProvider.CallWebAdminMembershipProviderHelperMethodOutParams(String methodName, Object[] parameters, Type[] paramTypes) at System.Web.Administration.WebAdminMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) at System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

thanks for your insights.

No comments:

Post a Comment