Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 4.5 General Discussion For ASP.NET 4.5 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4.5 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 12th, 2013, 10:29 AM
Friend of Wrox
Points: 1,905, Level: 17
Points: 1,905, Level: 17 Points: 1,905, Level: 17 Points: 1,905, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default Deployment concerns

So if you are using the following connection string in your web.config file for your test environment. Does this connection string need to change for the production server?

Code:
 <connectionStrings>
    <add name="WebShop" connectionString="server=(local)\SqlExpress;AttachDbFileName=|DataDirectory|CandyStore.mdf;Integrated Security=true;User Instance=true"/>
  </connectionStrings>
Reply With Quote
  #2 (permalink)  
Old November 12th, 2013, 12:27 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

It depends.

If your host machine runs SQL Server Express, then no. Otherwise: yes.

Most hosts don't support SQL Express so it's likely you need to update your connection string to match their instance of SQL Server.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old November 12th, 2013, 02:00 PM
Friend of Wrox
Points: 1,905, Level: 17
Points: 1,905, Level: 17 Points: 1,905, Level: 17 Points: 1,905, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default Which now begs the question

When I put that database under the SQL OEM and attach it to SQL server I get the following error message:

Code:
The database 'C:\XXX\APP_DATA\CandyStore.MDF' cannot be opened because it is version 706. This server supports version 655 and earlier. A downgrade path is not supported.
Cannot open user default database. Login failed.
Login failed for user 'Owner-PC\MrJones'.
The current instance of Sql Server is 2008R2.
What can you do to fix this problem. I will look online and see if I can get hits back on the error message.

I have both 2008 and 2012 SQL Server on my PC box. Could you reattach to the SQL Server OEM tool for 2008 and get different results?
Reply With Quote
  #4 (permalink)  
Old November 12th, 2013, 06:20 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

Google should give you many results on this error, all saying that you can't attach a 2012 database to a 2008 / 2008R2 instance.

Attach your database to a 2012 instance, or recreate the database under 2008 / 2008R2.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #5 (permalink)  
Old November 12th, 2013, 06:26 PM
Friend of Wrox
Points: 1,905, Level: 17
Points: 1,905, Level: 17 Points: 1,905, Level: 17 Points: 1,905, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default

Quote:
Originally Posted by Imar View Post
Google should give you many results on this error, all saying that you can't attach a 2012 database to a 2008 / 2008R2 instance.

Attach your database to a 2012 instance, or recreate the database under 2008 / 2008R2.

Cheers,

Imar
Attach your database to a 2012 instance, or recreate the database under 2008 / 2008R2.

Yes I can do this using DTS. I can take the old data from the old database and DTS it over to the new database and off we go. My only concern that when using DTS that you won't get the full Database functionality with it like all of the triggers, cursors, functions and stored procedures. I am not sure that would port over as well using the DTS utility of SQL Server 2012
Reply With Quote
  #6 (permalink)  
Old November 12th, 2013, 06:29 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

The database publishing wizard in 2012 can do that.

Also, DTS can do what you mention; you just need to make use of more of the advanced DTS features.

You can also script the current database as SQL 2008 compliant, recreate it against 2008 and then use DTS to copy over the data.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #7 (permalink)  
Old November 12th, 2013, 06:35 PM
Friend of Wrox
Points: 1,905, Level: 17
Points: 1,905, Level: 17 Points: 1,905, Level: 17 Points: 1,905, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default

Quote:
Originally Posted by Imar View Post
The database publishing wizard in 2012 can do that.

Also, DTS can do what you mention; you just need to make use of more of the advanced DTS features.

You can also script the current database as SQL 2008 compliant, recreate it against 2008 and then use DTS to copy over the data.

Imar
SQL Server has a 2012 publishing Wizard? I will have to check it out. Sorry I meant to say SSIS, I have used DTS so much in the past on the job that I have it on the brain and can't get it out. My bad.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
deployment Bhavin Crystal Reports 1 February 5th, 2009 08:07 AM
deployment p2pMember ASP.NET 2.0 Basics 0 June 7th, 2007 02:12 AM
Deployment sen22 .NET Framework 2.0 1 April 17th, 2007 03:38 PM
Deployment regbnvl BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 May 7th, 2006 05:44 PM
Deployment Bhavin Crystal Reports 2 October 25th, 2004 09:28 AM



All times are GMT -4. The time now is 07:54 AM.


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