StrataFrame Forum

Moving from SQL Express 2005 to Developer Edition...

http://forum.strataframe.net/Topic12396.aspx

By Edhy Rijo - 11/4/2007

Hi all,

When I started with SF I had installed MS-SQL Express 2005, now I want to install the Developer Edition of SQL 2005, and remove the Express version in my dev computer.

Is there something I should be doing with the databases I already have in the Express version before or after installing the Developer edition?  specially the SF database.  I just don't want to mess up my SF installation, nore loose any project's database currently on the Express version before removing this version and installing the Dev edition.

Thanks!

By Ivan George Borges - 11/4/2007

Hi Edhy.

Is there something I should be doing with the databases I already have in the Express version before or after installing the Developer edition?  specially the SF database.

Yes, you should copy it to your new SQLServer. I guess the simplest way would be to "Detach" it from your SQL Express, copy it to your new folder, if you wish, and then "Atach" it back to your other SQLServer. Ah, and don't forget your project's databases too, and the StrataFrameSample, as it will be used to run the samples when you need.

Hope it helps.

By Edhy Rijo - 11/5/2007

Hi Ivan,

Thanks for information, will try that today.

By Greg McGuffey - 11/5/2007

I'll add to Ivan's comments (all good), having done something like this...



- If you are simply replacing the default instance of SQL Server with another default instance (I.e. you uninstall express, then install developer version), and you use the same user/password (or use windows auth) between the two installations, you'll be able to use the attached db no problem. If any of this is different, you'll need to change the database connection for SF in VS and you'll need to reconfigure you projects the business mapper.



- If you're not using windows auth (you're using SQL auth), then you'll need to create the user name(s) in the new instance and after you attach your database, delete the user(s) form the database and readd them using the newly created users. I.e. if you are attaching to the StrataFrame db as edhy in SQL Express, the process (related to this issue) would be to: detach the StrataFrame db, uninstall SQL Express, install Developer version, attach StrataFrame db, add a login for edhy to SQL server, delete the edhy as user from the StrateFrame db, add edhy back as a user of StrataFrame. Remember to keep the user's passwords the same (see above). This only applies to sql auth (non sa users...if you are attaching as sa, then you don't need to do this). This is needed because SQL Server actually uses an internally generated GUID for each user. When you move the database (by detaching/attaching), the database is tracking the GUID. So even though the user name and password match in the new db, the GUIDs won't.



- If you use VS when the StrataFrame database is unavailable (like in the middle of the database switcheroo), expect it to open very slowly and expect any work in form designers to be very slow, even if you are working on non SF projects.



- If you detach your databases and move them to new locations, you can sometimes have trouble attaching them through either SQL Server Management Studio, or worse, it does something unexpected. When you attach via SSMS, it expects the log file to be where it was when it was detached. So, if you move the main mdf file, one of two things can happen, depending on what you do with the log file. If you leave the log file in the old location, it will be used (typically occurs if you just copy the mdf and ldf files to the new location). This is especially bad if you copied the ldf file (not moved it), as you might not catch it and back up the wrong log file. If you moved the ldf file or deleted it, then the attach will just fail, saying it can't find the log file (even though the log file is sitting right there next to the mdf...sigh...you'd think they might be able to use relative paths). If you run into this, use this sproc to attach the file:



exec sp_attach_single_file_db 'dbName','c:\FullPath\to\database\file.mdf'




This will create a new log file if the one referenced within the mdf isn't found. Typically, I'll follow this process to move/rename an mdf: backup the database, open the properties to the database I'm about to detach to make sure I know where it is ( Blink ), detach it, delete the log file (just did a full backup, so this is OK), move it, run the above sproc, mess with users (see second item), update configuration of VS/BO Mapper if needed (see first item).



You may have already known all of this, but all of these have bitten me, so I thought if you didn't know, it might save you a bit of pain BigGrin
By Edhy Rijo - 11/5/2007

Hi Greg,

Thanks for the details, I did not know any of that, so I do really appreciate the details in your post. Tongue

By Greg McGuffey - 11/5/2007

Any time Cool
By Edhy Rijo - 11/5/2007

Hi Greg, Ivan,

FYI, I installed Developer version of MS-SQL with not problem, detach all databases (including SF) from Express version and attached them to the Dev version without a problem, of course SF connection manager fixed the new connection and everything works fine.

Thanks again to both of you for your inside experiences.  w00t

By Ivan George Borges - 11/5/2007

Glad to hear that Edhy! Cool
By Greg McGuffey - 11/5/2007

Yeah, I had an experience like that once, everything just working the first time...I think...been a while...hard to remember Unsure ... Usually, I'm seeing red (SF error dialogs), blank screens, SQL server is screaming at me to find the log file, I'm getting confused because I'm remoting into SQL via a term server on my local switch box, so I'm entering sql commands into my email and typing memos in SSMS, just before a lighting strike takes out my ISP, so I'm sitting in the dark with my UPS beeping at me, telling me my battery is about to die... and my wife is upset because she told me dinner was ready 3 hours ago Pinch



Wink



I'm glad you got it running w/no problems! BigGrin


By Edhy Rijo - 11/5/2007

Greg McGuffey (11/05/2007)
... and my wife is upset because she told me dinner was ready 3 hours ago Pinch

Hummmm, that sound pretty familiar Hehe

By Ivan George Borges - 11/6/2007

... just before a lighting strike takes out my ISP, so I'm sitting in the dark with my UPS beeping at me, telling me my battery is about to die... and my wife is upset because she told me dinner was ready 3 hours ago Pinch

Apparently an upset wife has amazing powers! Sending a lightning to make you stop working seems to be a proof of it... w00t

By Greg McGuffey - 11/6/2007

Ahmen brother!
By Trent L. Taylor - 11/6/2007

ROFL...yup, I have been there before too BigGrin