Jeff's SQL Server Blog

Random Thoughts & Cartesian Products with Microsoft SQL Server
posts - 157, comments - 2686, trackbacks - 64

My Links

Advertisement

News

Welcome to my weblog. My name is Jeff Smith, I am software developer in Boston, MA and I was recently named a 2009 SQL Server MVP. Check in frequently for tips, tricks, commentary and ideas on SQL Server and .NET programming.


Subscribe





Archives

Post Categories

Programming

Sports

SQL

OLAP

OLAP
Processing an OLAP cube with a T-SQL Stored Procedure

Here's a simple SQL Server stored procedure that you can call to process an OLAP cube using T-SQL.  The parameters should be self-explanatory.  To me, this is a little easier and more flexible than processing using DTS packages. create procedure ProcessCube     @Database varchar(100),     @Cube varchar(100),     @Partition varchar(100)  = null, -- If NULL, process the entire Cube     @Server varchar(100) = 'localhost' as   /*     Author:        Jeff Smith     Version:    10/27/2008 */   /* variables used to store object handles */ declare @o_svr int, @o_db int, @o_cube int, @o_part int, @o_mds int declare @hr int   /* different cube processing options. This SP uses "default" */ declare @PROCESS_DEFAULT int declare @PROCESS_FULL int declare @PROCESS_REFRESH_DATA...

posted @ Monday, October 27, 2008 3:26 PM | Feedback (12) | Filed Under [ T-SQL OLAP ]

Powered by:
Powered By Subtext Powered By ASP.NET