May 27, 2008 - DotNetNuke    Comments Off on Manage a hosted DNN database on your local computer

Manage a hosted DNN database on your local computer

I have my DNN site hosted on my GoDaddy web hosting plan. From time to time, I use their SQL utility to backup my database. This creates a .BAK file in the [b:cl7uop7r]_db_backups [/b:cl7uop7r]folder. I discovered that I can download and access this file on my local computer using [b:cl7uop7r]MS SQL Server Management Studio Express [/b:cl7uop7r](free tool). You’ll also need to install [b:cl7uop7r]MS SQL Server 2005 [/b:cl7uop7r](also free). Don’t worry- these tools can be installed on a workstation like Windows XP.

[i:cl7uop7r][b:cl7uop7r]Here’s how to do it…[/b:cl7uop7r][/i:cl7uop7r]
[list=1:cl7uop7r]
[*:cl7uop7r]Download the .BAK file from your GoDaddy site. The easiest way to do this is via FTP, or even click the file’s link in your SQL databases control panel.[/*:m:cl7uop7r]
[*:cl7uop7r]Open MS SQL Server Management Studio Express and right-click the [b:cl7uop7r]Databases [/b:cl7uop7r]folder and select [b:cl7uop7r]Restore Database…[/b:cl7uop7r][/*:m:cl7uop7r]
[*:cl7uop7r]Give the database a name in the [b:cl7uop7r]To database[/b:cl7uop7r] field.[/*:m:cl7uop7r]
[*:cl7uop7r]Select [b:cl7uop7r]From device[/b:cl7uop7r] on the [b:cl7uop7r]Source for restore section[/b:cl7uop7r], and click the [b:cl7uop7r]…[/b:cl7uop7r] button to browse to your downloaded .BAK file.[/*:m:cl7uop7r]
[*:cl7uop7r][b:cl7uop7r]Add[/b:cl7uop7r] the file, click OK a few times, and you’re done.[/*:m:cl7uop7r][/list:o:cl7uop7r]
You now have access locally to a copy of your DNN SQL database.

[i:cl7uop7r]During the restore, you may see this error:[/i:cl7uop7r]
[color=#800000:cl7uop7r][b:cl7uop7r]’5(Access is denied.)’ while attempting ‘RestoreContainer::ValidateTargetForCreation’ [/b:cl7uop7r][/color:cl7uop7r]
The solution is simple. Use the [b:cl7uop7r]SQL Server Configuration Manager [/b:cl7uop7r]to change the service account of the [b:cl7uop7r]SQL Server Service [/b:cl7uop7r]to [b:cl7uop7r]LocalSystem[/b:cl7uop7r]. This system account has the right to write into the destination folder…