Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Going Live Problems 1

Status
Not open for further replies.

nevets2001uk

IS-IT--Management
Jun 26, 2002
609
GB
I have just rebuilt my website using .NET 2 and SQL 2005. Everything works perfectly on my development machine using a local .MDF database. It uses the same database for membership and roles also.

I have now tried to move everything to the production server at my web host. Web files are fine and working. I use SQL Management Studio to move the export my database data from the MDF file to my web-hosts SQL Server. I can then view the pages which load the data as expected.

Since moving the database I cannot login as the stored procedures didn't come across. How do I migrate these? Also I assume the views need to come across also?

Finally some of my pages that load data are into datagrids are throwing errors such as "Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints" and "Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression." Is there any reason before diggin into the querys etc that these would work on a development machine and not a production machine. Queries etc are all identical!

Steve G (MCSE / MCSA:Messaging)
 
Sounds like you've got duplicate data in the tables at the web host.

See if there is any way for the hosting company to take a backup file from your local database, and restore into place for the production database. This way all the data, and objects come through.

When exporting data you don't get the views, constraints, indexes, procedures, etc. All you get is the data.

I'd probably wipe out the tables, script them out and reload them, then create the views, then the procedures (assuming that they won't restore your database from the backup).

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Thanks. You were exactly right and after a bit of fiddling I've been able to get the database running correctly on their server.

Thanks for your help.

Steve G (MCSE / MCSA:Messaging)
 
No problem. Glad to help.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top