Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Problems moving database from one physical machine to a new oneProblems moving database from one physical machine to a new one
Previous
 
Next
New Post
8/31/2008 8:57 PM
 

I have been trying to migrate from on system to another for quite some time, and it never works.  All of my problems stem from trying to get the database information moved from one to another.  I have tried using backups, and moving the physical data files themselves.  No luck- here is the background.

System 1:
Windows 2003 Web Edition SP2
Microsoft SQL Server 2005
SQLExecMS 2.6

System 2:
Windows 2003 R2 Standard x64 SP2
Microsoft SQL Server 2005
SQLExecMS 2.6

Here is what I think the problem is- maybe someone can tell me how to get around it:

The databases made on the first computer are all stored in a datafile called "dbname_data.mdf"
The databases I've created from scratch on the 2nd system are called "dbname_data"
Whenever I use either SQLExecMS 2.6 or SQL Server Management Studio Express to backup from System 1, it won't restore on system 2. 

The error I get from SQLExecMS 2.6 is

Message == The backup set holds a backup of a database other than the existing 'DNN_db' database
Descr == The backup set holds a backup of a database other than the existing 'DNN_db' database.
SQLState == 42000
Number == -2147217900
Native Error == 3154
Descr == RESTORE DATABASE is terminating abnormally.
SQLState == 42000
Number == -2147217900
Native Error == 3013

The error I get from SQL Server Management Studio Express is

===================================

Restore failed for Server 'U15272980'.  (Microsoft.SqlServer.Express.Smo)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
   at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseOptions.RunRestore()

===================================

System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'DNN_db' database. (Microsoft.SqlServer.Express.Smo)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&LinkId=20476

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMessage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, Boolean errorsAsMessages)
   at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
   at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)

So I'm convinced it's something to do with my files being in the mdf format- and as long as I can pull across all my content, I don't care if I have to re-skin, re-setup users, etc.  It's the hierarchy and content of the site that I don't have time to rebuild.  I'm pretty technical- and have searched around, and tried to do this on my own forever.  Ask anything you want, I can probably dig out the answer if I don't already know it.



 

 
New Post
9/1/2008 12:10 AM
 

You need to check one little box and this error will go away.  Here is how I move my database.

I make a backup of my database and save it as dotnetnuke.bak.

I open up SQL Server Management Studio and created a new database.  

I then right click the database.

Go to Task and then Restore, database.

Browse and select your backup file.

Then click options in the left hand side of the screen.

Check the box that reads, "Overwrite the existing database"

Click OK.

Should work like a charm.

Stuart

 

 


Hilbert Solutions, LLC
Owner, Hilbert Solutions, LLC
http://www.HilbertSolutions.com
A DNN Service Provider
From Module Development to DNN Upgrades, your one stop DNN Shop
 
New Post
9/1/2008 10:22 AM
 

Thought it would work, and I was excited.  However:

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Restore failed for Server 'U15272980'.  (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

------------------------------
ADDITIONAL INformATION:

System.Data.SqlClient.SqlError: Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\DNN_theburbblog.com_Data.mdf" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------
 

 

 
New Post
9/1/2008 12:00 PM
 

Firstly - I am surprised at you having a data file NOT called .mdf.

I have moved data, but I use a different approach.  On machine A use Sql Management Studio (or whatever) to DETACH the database - you may need to stop a few things (IIS, etc) before it will let you do that.  Now copy the two files (.mdb and .ldb) to machine 2.  Attach the copied file .mdb - it will automatically find the .ldb file so long as you don't try to be clever.

I think backup/restore is the wrong approach.  Restore is about recovering somthing that WAS on machine 2.  Your machine 1 database was never there.

HTH.


Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
9/2/2008 7:26 PM
 

Whew- closer and closer.

So that seems to move the DB over to the machine properly.  And then I am moving all of the files from one machine to another, and hoping that was enough.  Are there changes I need to make in web.config once it's on the new machine?  When I try to access the site, I now get the following:

 

 

Server Error in '/' Application.


An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error:


Stack Trace:

 

Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

 


 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

[SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +437
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) +204
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) +303
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) +154
   Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) +36
   Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) +200
   DotNetNuke.Services.Log.EventLog.DBLoggingProvider.Data.SqlDataProvider.GetLogTypeConfigInfo() +68
   DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfo() +108
   DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.GetLogTypeConfigInfoByKey(String LogTypeKey, String LogTypePortalID) +62
   DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.AddLog(LogInfo objLogInfo) +72
   DotNetNuke.Services.Log.EventLog.LogController.AddLog(LogInfo objLogInfo) +176

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Problems moving database from one physical machine to a new oneProblems moving database from one physical machine to a new one


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out