Scripting Analysis Services Database Backup

by keruibo 30. August 2008 20:19

There are a number of ways to automate backups of Analysis Services databases.  Some examples I've seen: SSIS Packages, PowerShell, SQL Agent jobs with XMLA. 

Here is a "quick and dirty" way using a .vbs cscript that can be called form the operating system, or scheduled in SQL Agent as a cmdexec step. This script will backup all Analysis Services databases programatically (i.e. if someone adds a new database, it will automatically be backed-up without further operational changes).

I'm not saying this is the best way to do this, and the script below completely lacks error trapping.  But it is effective, simple to implement, and may form a good base for a robust script in your environment.

 

 '-------------  Get the target folder from the command-line  -----------
 strBackupPath = WScript.Arguments.Named.Item("folder")
 WScript.echo "Destination folder: " & strBackupPath 

 if strBackupPath = "" then     wScript.Echo "'folder' parameter resulted in a blank string"     WScript.Echo "Usage: cscript BackupSSAS.vbs /folder:<full path to backup folder>"     WScript.Quit 1  end if

 strBackupPath = strBackupPath + "\"

 '-------------- Get TimeStamp in form YYYYMMDDhhmmss  -------------  MyTimestamp = CStr(Year(Now()) * 10000 + Month(Now()) * 100 + Day(Now())) _    + CStr(Hour(Now()) * 10000 + Minute(Now()) * 100 + Second(Now()))     '-------------  Connect to SSAS Instance  --------------------  Set ssas = CreateObject("Microsoft.AnalysisServices.Server")  ssas.Connect("localhost")

 '-----------  Backup Databases   -------------------------  For Each MyDatabase In ssas.Databases      MyDatabase.Backup strBackupPath + MyDatabase.Name + "_" + MyTimestamp + ".abf"  Next    '------------  Disconnect from SSAS Instance  -----------------  ssas.Disconnect()

Tags:

Analysis Services

SQL Server 2008 Continues to raise the bar as a BI platform

by keruibo 17. August 2008 16:46

Microsoft recently released the latest version of its SQL Server platform: SQL Server 2008. Like its predecessors, the new release is a bundle of components that work together to deliver a seamless and integrated BI platform.

The 2008 version includes numerous performance enhancements that will enable the new version to address even larger data volumes at higher performance levels than before. In addition to performance enhancements come new functionality and ease-of-use enhancements that will appeal to new and existing SQL users.

For new deployments, SQL 2008’s new features and higher performance levels probably means there’s no reason to deploy older versions. For existing SQL 2000 and SQL 2005 customers, migration effort will depend on the specifics of each deployment, but the overall improvements will likely prove to make the migration worthwhile.

Tags:

SQL Server

Eliminating the reporting treadmill with Business Intelligence

by keruibo 17. August 2008 16:23

Business Intelligence (BI) often invokes images of sophisticated, complex technologies that organizations sometimes feel they’re “not ready for yet”.  Often this comes from a feeling that we’re so busy just keeping up with user requests that there’s not enough time available to get to the next level or assimilate new technologies.

For organizations that are heavily dependent on information, part of the overwhelmed feeling stems from what sometimes is called the reporting treadmill—that feeling that every completed report or information extract request generates two additional requests.

While BI initiatives are often geared toward strategic initiatives—such as performance management, business analytics or financial budgeting/planning—the tactical and operational benefits of even a modest BI implementation are just as important.  One operational impact often realized is a reduction in time spent by IT specialists designing custom reports, and a subsequent redeployment of those staffers to more value-added activities.

By using BI-enabled applications along with a well-designed multi-dimensional data model, end-users become more empowered than ever before to dig out answers to their questions directly (and more quickly), rather than relying on data specialists. Moreover, these centralized data marts provide one-stop shopping and a single version of the truth that’s hard to achieve with dozens or hundreds of individual, customized reports.

For IT, the reduced time spent designing reports is available for other activities—like advanced data modeling, data mining and data integration—all activities that provide yet more resources for business users.

A well-planned, strategic BI implementation provides a business-changing paradigm shift in how organizations use information.  However, even when a strategic investment isn’t in the cards, more modest ones can yield real, measurable benefits—and provide foundational experience for a future strategic BI implementation.

Tags:

BI Strategy

Checklist for Installing and Configuring Windows 2008 Hyper-V

by keruibo 14. August 2008 11:05

1. Install Server 2008 Core x64 from DVD Media
 
2. Rename computer to new name
   Netdom renamecomputer %computername% /newname:SERVER1
 
3. Lookup the name of the network interface
  netsh interface ipv4 show interface
 
4. Assign IPv4 Address
   netsh interface ipv4 set address name=”Local Area Connection 2”
   source=static address=192.168.3.1 mask=255.255.255.0 gateway=255.255.255.0 1
 
5. Assign DNS servers
 Netsh interface ipv4 add dns name=”Local Area Connection” 192.168.3.5
 Netsh interface ipv4 add dns name=”Local Area Connection” 192.168.3.6 index=2
  
6. Join the domain
   netdom join %ComputerName% /domain:INTRANET /userd:<domain\user> /passwordd:*
 
7. Reboot windows (if not prompted)
   shutdown -r -t 0
 
8. After reboot, enable remote administration
   netsh advfirewall firewall set rule group="Remote Administration" new enable=yes
   netsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes
 
9. Enable remote desktop from any client type
   Cscript %windir%\system32\SCRegEdit.wsf /cs 0
   Cscript %windir%\system32\SCRegEdit.wsf /ar 0
   netsh firewall set service type=remotedesktop mode=enable
 
10. Add Hyper-V Role
   bcdedit /set hypervisorlaunchtype auto
   start /w ocsetup Microsoft-Hyper-V
 
11. Update Hyper-V
   Run the file: 
   mu_update_for_windows_server_2008_kb950050_x64.msu

12. Activate Windows
   cscript %WinDir%\System32\slmgr.vbs -ato
 
12a. If windows won't activate and needs a VLK changed to a MAK
   start /w slmgr.vbs -ipk FFFFF-FFFFF-FFFFF-FFFFF-FFFFF
   start /w slmgr.vbs -ato
   (careful, the feedback popups sometimes popup behind the DOS window, so move it around before re-entering the command over and over)
 
13. Reboot windows (if not prompted)
   Shutdown -r -t 0

14. Install remote admin tools for Hyper-V
   Install the following on your desktop (choose depending on whether you run Vista x86 or x64)
   Hyper-V_Admin_Windows6.0-KB952627-x64.msu (Vista x64 Client)
   Hyper-V_Admin_Windows6.0-KB952627-x86.msu (Vista x86 Client)
   mu_update_for_windows_server_2008_kb950050_x86.msu
  (Server 2008 x86)

15. Add the Hyper-V snap in to an MMC.exe instance on your desktop, connect to the Hyper-V virtual server from there, and you're off to the races!


 

Tags: , ,

Configuration | Windows 2008

Using 7200RPM External Drives for Demo VMs

by keruibo 9. August 2008 00:28

In my work I often use Microsoft VirtualPC on my laptop to demonstrate software for clients and to conduct training.  Most anyone who's used a VPC to do a demonstration of server-based products--the kind that should be deployed on "real servers"--has at some point had the unpleasant experience of apologizing for poor performance during a pivotal moment in a demo.

I'm always looking for ways to speed up demos, and there are only a few general approaches I know of:

  1. Lighten the "weight" of the VPC, so there's not so much bulk for the VPC OS to deal with and so the demo "fits" the constraints of the host's capabilities
  2. Use a better VM technology (I'm currently converting my demos to Hyper-V--more on that in the future)
  3. Separate the guest OS I/O from the host and use a fast external HDD

The faster disk option (#3) is one I employed some time ago when I had a spare 7200rpm disk to use as an external VHD store, but I never really "proved" that it worked better than the 5400 rpm disk it replaced.  I also never "proved" that moving to external USB 2.0 disks had helped in the first place! 

Recently I happened to have several USB 2.0 hard disks and some spare time available. (I upgrade way too often and I have too many computers).

I decided to do a somewhat scientific experiment to see if, in fact, the faster hard drive had actually helped, and if the performance of the external disks were similar to their internal alternatives.  The two variables I was able to change based on available hardware:

  1. Dive interface SATA/IDE
  2. Disk rotation speed (5400rpm/7200rpm)

Other than these factors, all else is the same (same PC, same brand USB 2.0/HDD enclosure, same tests). In addition to comparing the performance with the different external disks, I benchmarked the internal disk.  This was an interesting test because the internal and external 200GB drives are identical Seagate 200GB 2.5" drives--so the test should be an "apples to apples" comparison of throughput lost through USB 2.0.

The test environment:

  • Lenovo ThinkPad X61 2Ghz Core2Duo CPU, Windows 2008 Standard x64, 4GB RAM 
  • Test #1 - Copy a single 8GB VHD file from the ThinkPad to the USB hard disk
  • Test #2 - SQLIO with large IO load (sequential I/O, 256KB read/write, 2 threads, 60 seconds, 100MB file size

Here are the test results:

  100GB IDE
USB 2.0 
160GB SATA 
USB 2.0
200GB SATA
USB 2.0
 200GB SATA
Internal
Disk Mfg   Fujitsu WD  Seagate  Seagate 
RPM 7200 5400 7200 7200
8GB Copy (MB/sec) 21.3 20.9 21.3 N/A 
Read         
   IO/sec  111.6 114.3 115.1  225.1
   MB/sec  27.9  28.6  28.8  56.2
   Avg Latency (ms)  142  139  138  70.0
 Write        
   IO/sec 83.1  83.3  83.3  214.2
   MB/sec  20.8  20.8  20.8  53.6
   Avg Latency (ms)  191.0  211.0  191.0 73.0

Well, it appears that switching from a 5400 RPM disk to 7200 RPM USB 2.0 disk had actually delivered no benefit.  But I was a little suprised that the SATA interface also seemed to have no benefit over the older IDE technology...I had assumed that would have made a difference given the difference in transfer rates between the two. 

So, when USB 2.0 is the external I/O path, it seems that one needn't be too picky about the drive itself.  The USB interface is just too slow and inefficient to leverage the latest hard drive technologies.

 

 

 

Tags: , , , ,

Configuration | Windows 2008

Updated Windows Installer Needed for SQL Server 2008 Client Components

by keruibo 8. August 2008 23:11

Windows 2008 shipped recently, and I've been updating my field kit with all of the various installation media and supplemental programs needed for client site deployments.

One issue I ran into is when installing the Books Online standalone package on my Vista x64 laptop:

"This installation package cannot be installed by the Windows Installer service.  You must install a Windows service pack that contains a newer version of the Windows Installer service."

The message is pretty self-explanatory, but it was strange that at this time Windows Update indicates my computer is all up-to-date. 

To resolve this issue I needed to manually download the update to Windows Installer 4.5, apply it, and reboot. Then installing the updated install package proceeded normally.

 

Tags:

Configuration | SQL Server

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Rob Kerr's BI Blog