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 ...Having problems backup up Database.mdfHaving problems backup up Database.mdf
Previous
 
Next
New Post
8/13/2009 4:36 PM
 

No not through the portal. (never tryed)

I make a bat file like this

sqlcmd -S . -i "C:\Backups\Backup_All.sql"
pause

then a file called Backup_All.sql like this

DECLARE @BackupFile varchar(255), @DB varchar(30), @Description varchar(255), @LogFile varchar(50)
DECLARE @Name varchar(30), @MediaName varchar(30), @BackupDirectory nvarchar(200)
SET @BackupDirectory = 'C:\Backuped_SQL_DB\'
--Add a list of all databases you don't want to backup to this.
DECLARE Database_CURSOR CURSOR FOR SELECT name FROM sysdatabases WHERE name <> 'tempdb' AND name <> 'model' AND name <> 'Northwind'
OPEN Database_Cursor
FETCH next FROM Database_CURSOR INTO @DB
WHILE @@fetch_status = 0

    BEGIN
     SET @Name = @DB + '( Daily BACKUP )'
     SET @MediaName = @DB + '_Dump' + CONVERT(varchar, CURRENT_TIMESTAMP , 112)
     SET @BackupFile = @BackupDirectory + + @DB + '_' + 'Full' + '_' +
      CONVERT(varchar, CURRENT_TIMESTAMP , 112) + '.bak'
     SET @Description = 'Normal' + ' BACKUP at ' + CONVERT(varchar, CURRENT_TIMESTAMP) + '.'

     IF (SELECT COUNT(*) FROM msdb.dbo.backupset WHERE database_name = @DB) > 0 OR @DB = 'master'
      BEGIN
       SET @BackupFile = @BackupDirectory + @DB + '_' + 'Full' + '_' +
        CONVERT(varchar, CURRENT_TIMESTAMP , 112) + '.bak'
       --SET some more pretty stuff for sql server.
       SET @Description = 'Full' + ' BACKUP at ' + CONVERT(varchar, CURRENT_TIMESTAMP) + '.'
      END 
     ELSE
      BEGIN
       SET @BackupFile = @BackupDirectory + @DB + '_' + 'Full' + '_' +
        CONVERT(varchar, CURRENT_TIMESTAMP , 112) + '.bak'
       --SET some more pretty stuff for sql server.
       SET @Description = 'Full' + ' BACKUP at ' + CONVERT(varchar, CURRENT_TIMESTAMP) + '.'
      END
      BACKUP DATABASE @DB TO DISK = @BackupFile
      WITH NAME = @Name, DESCRIPTION = @Description ,
      MEDIANAME = @MediaName, MEDIADESCRIPTION = @Description ,
      STATS = 10
     FETCH next FROM Database_CURSOR INTO @DB
END
CLOSE Database_Cursor
DEALLOCATE Database_Cursor

Then you can run the bat,

The database should be found in SQL express manager. Your have to make the folders in bat and script.

 

 
New Post
8/14/2009 3:25 PM
 

Jan,

Thank you for providing the syntax.  I dont totally understand it, but in time I will and I will refer back to this post.  Thanks again.

 
New Post
8/14/2009 3:34 PM
 

Chuck wrote

Just to verify did I read some where that I must use ASP 3.5 on this upgrade?  Double checking.

ASP 3.5 SP1 will be required for DNN 5.2


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
8/14/2009 3:36 PM
 

Chuck wrote

BTW, is it better to attach it with SSMS 2008 Express instead?

I always prefer to attach it using SSMS and use "classic" connection string, this allows me to access the database using SSMS while site is running.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
8/14/2009 3:38 PM
 

Chuck wrote

When I reply to a post and click on the NOTIFICATION option to receive e-mails, I never receive an e-mail that my post has been answered.  I have to manually check here.  I have checked all my settings including spam filters.  Is there something I am missing.

This is a known issue of the current forums version, we apologize (it has been fixed for latest Forums version available for download; due to the impact of forums for this site, the latest version has not been applied yet).


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Having problems backup up Database.mdfHaving problems backup up Database.mdf


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