Auto process Cube with SQL Agent job
(1) Connect to the Analysis server, select the database which we want it to be automatically processed. Right click on this database, choose ‘Process’:
(2) In the opening ‘Process database’ form, click the ‘Script Action to New Query Window’ as below:
(3) A query form is opened as below, copy all these code.
(4) Connect to the Database Engine, choose the Jobs node under ‘SQL Server Agent’, right click on this ‘Jobs’ node and select ‘New Job’:
(5) In the opening ‘New Job’ form, enter a Name and description for this job
(6) Choose Steps in the left page in the ‘new Job’ form, then click the ‘New’ button to open ‘New Job Setup’ form
(7) In the ‘New Job Setup’ form, please enter a name for this Step, choose the Type ‘SQL Server Analysis Services Command’, enter the Server, then paste the command in our step(3) in to the Command, and you can select the ‘Advanced’ page in the left page to configure more for this step, like log file.
After you finish the setup of step, click OK return to ‘New Job’ form.
(8) Choose ‘schedules’ and then click ‘New’ buttons as below:
(9) In the ‘New Job Schedule’ form, enter a name for this schedule, set the frequency for this job, and set the daily frequency as below, finally, click OK.
(10) Click OK to finish the creation of the job, and it has been added to the agent, it will run the process every day.
Ïà¹ØÎĵµ£º
¡¾IT168 ¼¼ÊõÎĵµ¡¿
ĬÈÏÇé¿öÏÂ,SQLServerExpressEdition 2005ºÍSQL Server 2005¿ª·¢°æ²»ÔÊÐíÔ¶³ÌÁ¬½Ó¡£
ÒªÔÊÐíÔ¶³ÌÁ¬½ÓSQL Server 2005 ,ÐèÒªÍê³ÉÒÔϲ½Ö裺
ÔÚSQLServer ʵÀýÉÏÆôÓÃÔ¶³ÌÁ¬½Ó¡£
´ò¿ª·þÎñÆ÷ SQLBrowser ·þÎñ¡£
ÅäÖ÷À»ðǽÒÔÔÊÐíSQLBrowser ·þÎñºÍSQLServer·þ ......
--°´Ä³Ò»×ֶηÖ×éÈ¡×î´ó(С)ÖµËùÔÚÐеÄÊý¾Ý
Êý¾ÝÈçÏ£º
name val memo
a 2 a2(aµÄµÚ¶þ¸öÖµ)
a 1 a1--aµÄµÚÒ»¸öÖµ
a 3 a3:aµÄµÚÈý¸öÖµ
b 1 b1--bµÄµÚÒ»¸öÖµ
b &n ......
--µÚÒ»²½
--ÔÚmaster¿âÖн¨Á¢Ò»¸ö±¸·ÝÊý¾Ý¿âµÄ´æ´¢¹ý³Ì.
USE master
GO
CREATE PROC p
@db_name sysname, --Êý¾Ý¿âÃû
@bk_path NVARCHAR(1024) --±¸·ÝÎļþµÄ·¾¶
A ......
SQL:
using System.Data.SqlClient;
string sql = "server=.;uid=sa;pwd=;database=tablename;";
ACCESS:
using System.Data.OleDb;
string sql = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" + HttpRuntime.AppDomainAppPath + "//App_Data//db.mdb";
HttpRuntime.AppDomainAppPath Ϊ¸ùĿ¼
......
¹ØÓÚSQL Prompt
µÄÆÆ½âÎÄÕÂÔ°×ÓÀïÒѾÓв»ÉÙÈË·¢¹ýÁË¡£ÆÆ½â˼·ÎÒÒ²²»ÏëÖØ¸´£¬²»ÖªµÀµÄ¿ÉÒԲο¼£ºhttp://www.cnblogs.com/jintan/archive/2008/06/16/1223282.html
¹Ù·½ÏÂÔØµØÖ·ÊÇ£ºhttp://downloads.red-gate.com/SQLToolbelt.exe
½ÓÏÂÀ´ÎÒ¾Í˵˵¾ßÌåÔõô×ö°É¡£ÎÒ¾Í˵˵×î¼òµ¥×îɵ¹ÏµÄ×ö·¨£¬²»ÐèÒª¶®ILÕÕÑùÆÆ½â£¡
× ......