SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 need help with sql server analysis services comman
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

agastyamahi
Starting Member

Canada
31 Posts

Posted - 12/09/2013 :  17:12:46  Show Profile  Reply with Quote
Hi,

I am creating a job that runs every day to back up an SSAS database that I have. Here is the Analysis Services Command for that

<Backup xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Object>
<DatabaseID>PipeLine</DatabaseID>
</Object>
<File>C:\DBBackup\PipeLine.abf</File>
</Backup>

I don't want to overwrite my backup daily. Could any one please let me know how to add a date-stamp to my backup file.

If not, I have backup-devices for each day(eg, Sunday, Monday, Tuesday etc). Is there a way I could check for the day and store the backup in the respective backup device for the day

Please help me

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 12/09/2013 :  22:25:11  Show Profile  Reply with Quote
you can do that inside SSIS. Use analysis services DDL task, form the query inside a SSIS variable by adding the date stamp value to static part by setting EvaluateAsExpression true for the variable and add a variable for it. something like

"<Backup xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Object>
<DatabaseID>PipeLine</DatabaseID>
</Object>
<File>" + (DT_DBDATE)GETDATE() + "</File>
</Backup>"


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

agastyamahi
Starting Member

Canada
31 Posts

Posted - 12/09/2013 :  22:37:53  Show Profile  Reply with Quote
Hi Visakh,

Since I want to take a backup daily this option would increase the number of files in a folder. I had actually created storage devices under server objects with names Monday, Tuesday etc. The path is present inside the storage devices. Is there a way I could back the cube database daily and put it in the storage device.

Thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000