p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   SQL Server 2005 (http://p2p.wrox.com/forumdisplay.php?f=220)
-   -   Converting from SQL server 2005 back to express ed (http://p2p.wrox.com/showthread.php?t=54203)

saif44 February 17th, 2007 07:17 AM

Converting from SQL server 2005 back to express ed
Hi folks,

I was working on MS sql server 2005 evalution where i have built a number of databases. However, i came to discove that the evalution version has expried before i finished my work. Now i have disinstalled the sql server 2005 and installed the Sql express edition.

My concern here is how can i keep my databases so they can work with sql express edition?

Thank you very much in advance.

SQLScott February 17th, 2007 10:41 AM

This solution is fairly simple. I do the following:

1) Stop the SQL Server service for the Evaluation Edition
2) Copy the databases from the \Data directory to a different directory.
3) Uninstall the Evaluation Edition
4) Install the Express Edition
5) Download, and install, the SQL Server Management Studio for Express Edition (off of the MSDN web site (msdn.microsoft.com/vstudio/express/sql/download)
6) Copy the databases back to the data directory.
7) Within Management Studio, attach the databases you just copied.

You're Done!

Hope this helps...

Scott Klein
Author - Professional SQL Server 2005 XML

saif44 February 17th, 2007 06:15 PM

Thank you very much for your reply. Your answer worked very well. I only have another problem which i was trying to avoid from the begining but even with your method that i have followed it seems to be so far the result i want get to is not yet solved.

when i used SQL sever standard edition i have made my own tables in exactly the same database that have the membership. it is fine now all that database i have migrated to my sql server express edition. However, when i run the website and i like to log in with my user name and password, i recieve an error page saying that the projects creates automatically another database with the memebership. As a result when i debug and trace the problem i found there are two databases in my project. One that i have migrated and the other created automaticall by sql server express edition when i use the membership log in tool.

I was trying to copy my tables to the new database that have the membership but i couldn't. Also i don't understand why the system does not accept the membership database that is already in place.

Can you please hepl me?

SQLScott February 17th, 2007 08:19 PM

I'm confused. What do you mean "two databases in my project"? What project? Are the "membership" tables ones that you created? If so, i would try recreating (deleting and creating again) in the database you just attached. Also, it might be that you need to look at the credentials.

I am not too up on membership login tool, but I'll look into that and see what I can find. Also, you might be able to find some information on that in BOL


Scott Klein
Author - Professional SQL Server 2005 XML

saif44 February 18th, 2007 04:05 AM

Let me simplify it if i can. First time i started my project and wanted a membership database, i had to create a database and called it MCUK.mdf. and then follow the procedures located in file %WINDOWS%\Microsoft.NET\Framework\v2.0.50727 and run the file aspnet_regslq.exe so i can set up the membership database (this procedure is done because i was using SQL server 2005 Standard edition). However, as you may know, this is done automatically with sql server express edition. All you need to do is go to the Website configuration page and from there you can set the membership.

When i created my MCUK database membership i have added to it other tables that are related to my project. However when i migrated back to SQL server express edition, the tables i have created work fine but the membership on this database does not work. How's that happened? When i run my project and try to enter my username and password, an error occurs and says:
An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 1802 and the SqlException message is: CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Cannot create file 'C:\DOCUMENTS AND SETTINGS\USER\MY DOCUMENTS\VISUAL STUDIO 2005\WEBSITES\MOROCCANCOMMUNITY1\APP_DATA\ASPNETDB _TMP.MDF' because it already exists. Change the file path or the file name, and retry the operation.
Creating the ASPNETDB_88bc58619c3d41ada0ce49f93f9fff07 database...

So far, i was only talking about MCUK database, but after this error occurs, the system attempts to set up another database called ASPNETDB_TMP.MDF.

The error says that the files are already exists. that's right because the files are in MCUK database. But why does the system need to create the same file in ASPNETDB_TMP.MDF wheras they already exist?

So that's what exactly happens and i hope this will help you define the problem.

Just to be clear of my aim: i want to keep those tables that i have created for my project (because they are many with loads of data on them) with the memebership tables in one database.

Thank you for your time.

saif44 February 19th, 2007 06:54 AM

Hi There,

Can anyone help with my issue please.

Thank you for your time.

All times are GMT -4. The time now is 09:04 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.