Error: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'
Lately I moved my SQL Server 2008 R2 database to another server. Before I moved the SQL Server database, I made a backup of my own tables.
But as I messed up the database a little by adding tables for some testing purposes, I thought it would be a good idea to take the opportunity to clean up the database during moving. So I didn't use the standard backup procedure of MS SQL Server Management Tool, but just copied the table definitions and data by hand, skipping tables I didn't need for my website.
However, some tables, I didn't backup up, should have been copied. Entering the URL of the website, I received the error:
Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'
What I had forgotten was that my website used the Profile management of the .Net Framework.
The solution was quite easy:
-
Start a cmd-box
-
Go to the directory: C:\WINDOWS\Microsoft.NET\Framework
-
Look for the directory of the latest Framework-version: dir v* <enter>
-
Enter the directory of the latest Framework-version: cd v... (e.g. cd v4.0.30319)
-
Start the application aspnet_regsql.exe
-
Follow the instructions.
-
That's all it took.
Of course I was lucky there were no profiles stored in the database which had to be restored. If that has been the case, I had to do a lot of work more. But using the registration tool of the .Net-Framework saved a lot of work.
|