วิธีการประหยัดเวลาในการ Process OLAP Cube ที่มีปริมาณข้อมูลเยอะมากๆ
ในกรณีที่อยู่ระหว่างการแก้ไข หรือตรวจสอบความถูกต้องของข้อมูลใน CUBE
การ Process FULL เป็นตัวเลือกที่ไม่ดีสำหรับกรณีใดๆที่มีข้อมูลเยอะมากๆ
เนื่องจากหากมี Error ใดๆ จำให้การ Process failed ทั้งหมด
ดังนั้นคำแนะนำคือ ทำการ Process Object ตามลำดับขั้นดังนี้
1 Process Full Dimension
เพื่อตรวจสอบความถูกต้องของ Dimension ต่างๆ ทั้งข้อมูลใน Dimension และ Hierarchy รวมถึงการ Set Attribute relationship
2 Process Cube Structure
เพื่อทำการ Build structure ทั้งหมดของ CUBE ซึ่งการ Process นี้จะทำการล้างข้อมูลทั้งหมดที่มี (หาก Set storage mode = MOLAP) แต่จะทำให้สามารถ Browse cube ได้เหมือนกับ Process Full เพียงแต่ไม่มีข้อมูลแสดงเท่านั้นเอง
3 Process Data
สามารถ Process Measure Group และ Partition ภายใต้ Measure Group
เพื่อทำการ Add ข้อมูลเข้าระบบ ทั้งนี้ ควรทดสอบ Process data ใน Partition บางส่วนก่อนเพื่อตรวจสอบความถูกต้องของข้อมูล เพราะหากมีการ Re-Design dimension และทำ Attribute relation ship ผิดใน Dimension design จะส่งผลกับข้อมูลผิดตามไปด้วย
4 Process Index
เพื่อ Process aggregation ของ CUBE ซึ่งส่วนนี้ขึ้นอยู่กับการ Design aggregate ใน Cube partition
โดยขั้นตอนลำดับขั้นที่กล่าวมาเป็นวิธีการที่ช่วยลดเวลาในการ Process Cube เพื่อตรวจสอบ
หรือสามารถ apply ได้ในหลายกรณีครับ
Mssql, Microsoft sql server, SSAS, SSRS ,SSIS , Analysis Service, Reporting Service, Integration Service, XMLA ,MDX ,SQL
วันพุธที่ 26 กันยายน พ.ศ. 2555
วันอังคารที่ 21 สิงหาคม พ.ศ. 2555
sql server update record , percent complete
กรณี Update ข้อมูลจำนวนมาก
หากต้องการรู้ว่า การ update นั้น เสร็จไปแล้วกี่เปอร์เซ็นต์
SELECT * FROM sys.dm_exec_requests WHERE session_id = 68
See column percent_complete
Credit
http://www.mssqltips.com/sqlservertip/1338/finding-a-sql-server-process-percentage-complete-with-dmvs/
หากต้องการรู้ว่า การ update นั้น เสร็จไปแล้วกี่เปอร์เซ็นต์
SELECT * FROM sys.dm_exec_requests WHERE session_id = 68
See column percent_complete
Credit
http://www.mssqltips.com/sqlservertip/1338/finding-a-sql-server-process-percentage-complete-with-dmvs/
วันอังคารที่ 10 กรกฎาคม พ.ศ. 2555
SQL Server list Database file name
select d.name as db_name, f.name as file_name, f.filename as logical_filename
from sysaltfiles f
inner join sysdatabases d
on (f.dbid = d.dbid)
order by 1,2
Restart OLAP Service from SSIS package
Reference from http://businessintelligencechronicles.blogspot.com/2009/02/using-ssis-script-task-to-executing.html
Using script task to connect remote server to stop & start mssqlserverOLAPService
Basicly we know command to stop and start olap service via command prompt.
Start -->Run command
Net stop mssqlserverOLAPService <---- Command to stop
Net start mssqlserverOLAPService <---- Command to start
In the example he remote to run Calc.exe via Command variable
In my case I create two string Command (Command1 , Command2)
Set Command1 = Net stop mssqlserverOLAPService
Set Command2 = Net start mssqlserverOLAPService
And then seperate commands into 2 script tasks
1 = Script for stop
2 = Script for start
**Remark If you SSIS version is 2008 You no need to change anythings except your command.
If you using SSIS 2005 you need to change a little bit command
from Dts.TaskResult = ScriptResults.Success to be Dts.TaskResult = Dts.result.Success
That's it.
That's work perfectly!!!
Thanks Christo Olivier
Using script task to connect remote server to stop & start mssqlserverOLAPService
Basicly we know command to stop and start olap service via command prompt.
Start -->Run command
Net stop mssqlserverOLAPService <---- Command to stop
Net start mssqlserverOLAPService <---- Command to start
In the example he remote to run Calc.exe via Command variable
In my case I create two string Command (Command1 , Command2)
Set Command1 = Net stop mssqlserverOLAPService
Set Command2 = Net start mssqlserverOLAPService
And then seperate commands into 2 script tasks
1 = Script for stop
2 = Script for start
**Remark If you SSIS version is 2008 You no need to change anythings except your command.
If you using SSIS 2005 you need to change a little bit command
from Dts.TaskResult = ScriptResults.Success to be Dts.TaskResult = Dts.result.Success
That's it.
That's work perfectly!!!
Thanks Christo Olivier
วันเสาร์ที่ 7 กรกฎาคม พ.ศ. 2555
Window server ,login exceed remote desktop
f using RDP 6 client or above:
mstsc /v ipOfServer /admin
If using older than RDP 6:
mstsc /v ipOfServer /console
Credit
http://serverfault.com/questions/43435/terminal-server-has-exceeded-max-number-of-allowed-connections
วันพุธที่ 4 กรกฎาคม พ.ศ. 2555
OLAP Distinct count measures
Analysis Services Distinct Count Optimization
Refer to :
http://sqlcat.com/sqlcat/b/technicalnotes/archive/2010/09/20/analysis-services-distinct-count-optimization-using-solid-state-devices.aspx
วันศุกร์ที่ 22 มิถุนายน พ.ศ. 2555
View percentage for SQL task
SELECT percent_complete , (estimated_completion_time/1000)/60 Estimated_completion_time_Mins ,
(total_elapsed_time/1000)/60 Total_Elapsed_Time_Mins ,DB_NAME(Database_id) DBName ,*
FROM sys.dm_exec_requests
WHERE percent_complete <> 0
(total_elapsed_time/1000)/60 Total_Elapsed_Time_Mins ,DB_NAME(Database_id) DBName ,*
FROM sys.dm_exec_requests
WHERE percent_complete <> 0
วันจันทร์ที่ 18 มิถุนายน พ.ศ. 2555
SQL Server 2008R2 Change server collation
วิธีการเปลี่ยน Server Collation ของ SQL Server 2008 R2
ในกรณีที่ตอน Install ไม่ได้เลือก Collation ของ Server ให้เป็นไปตามต้องการ
(โดยปกติแล้ว Server จะ Default เป็น SQL_Latin bla bla bla)
1 หา setup.exe ใน Path ที่ Install SQL Server เช่น
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\
หรือจาก Media Path ที่มี setup.exe อยู่ เช่น
D:\SQL2008R2
2 run command window. เพื่อจะใช้คำสั่งผ่าน Command line.
3 จัดการรัน command ตามนี้
setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLCOLLATION=Thai_CI_AI /SQLSYSADMINACCOUNTS="WIN2008BI\SQLadmin" /SAPWD="myP@ss"
ข้อควรระวังตรงนี้คือ User ที่จะใช้ในการรันจะเป็น Window user ไม่ใช่ sa ของ SQL Server น่ะ
จากตัวอย่างคือ "WIN2008BI" = Server Name , SQLadmin = Account , และ SAPWD = "myP@ss" คือ Password ในการ Login เข้า Window
---------------------------
ERROR LOG กรณีใส่ parameter ผิด
Log file สามารถเข้าไปดูได้ที่
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log
Summary.txt คือไฟล์สรุป Log สามารถดูที่บรรทัดสุดท้ายว่ามี Exception หรือไม่ ถ้ามีแสดงว่าการ Setup ไม่ผ่าน อาจจะมีข้อผิดพลาดจากเรื่อง User / Password หรืออื่นๆ ให้อ่านในส่วน Exception นี้
ตัวอย่าง
Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented
Exception type: Microsoft.SqlServer.Chainer.Infrastructure.InputSettingValidationException
Message:
The Windows account ”W28BI401\sos” does not exist and cannot be provisioned as a SQL Server system administrator.
Data:
SQL.Setup.FailureCategory = InputSettingValidationFailure
DisableWatson = true
Stack:
at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.LogAllValidationErrorsAndThrowFirstOne(ValidationState vs)
at Microsoft.SqlServer.Configuration.SetupExtension.ValidateFeatureSettingsAction.ExecuteAction(String actionId)
at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
Inner exception type: Microsoft.SqlServer.Configuration.SqlEngine.ValidationException
Message:
The Windows account ”win2008BI\SQLadmin” does not exist and cannot be provisioned as a SQL Server system administrator.
ถ้า server name จริงเป็นตัวใหญ่หมดก็ต้องใช้ตัวใหญ่ทั้งหมดใน parameter ไม่งั้นมันก็บอกว่าไม่มี Account นั้น ฮ่าๆ
ขอให้เปลี่ยน Collation สำเร็จนะครับ :)
ในกรณีที่ตอน Install ไม่ได้เลือก Collation ของ Server ให้เป็นไปตามต้องการ
(โดยปกติแล้ว Server จะ Default เป็น SQL_Latin bla bla bla)
1 หา setup.exe ใน Path ที่ Install SQL Server เช่น
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\
หรือจาก Media Path ที่มี setup.exe อยู่ เช่น
D:\SQL2008R2
2 run command window. เพื่อจะใช้คำสั่งผ่าน Command line.
3 จัดการรัน command ตามนี้
setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLCOLLATION=Thai_CI_AI /SQLSYSADMINACCOUNTS="WIN2008BI\SQLadmin" /SAPWD="myP@ss"
ข้อควรระวังตรงนี้คือ User ที่จะใช้ในการรันจะเป็น Window user ไม่ใช่ sa ของ SQL Server น่ะ
จากตัวอย่างคือ "WIN2008BI" = Server Name , SQLadmin = Account , และ SAPWD = "myP@ss" คือ Password ในการ Login เข้า Window
---------------------------
ERROR LOG กรณีใส่ parameter ผิด
Log file สามารถเข้าไปดูได้ที่
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log
Summary.txt คือไฟล์สรุป Log สามารถดูที่บรรทัดสุดท้ายว่ามี Exception หรือไม่ ถ้ามีแสดงว่าการ Setup ไม่ผ่าน อาจจะมีข้อผิดพลาดจากเรื่อง User / Password หรืออื่นๆ ให้อ่านในส่วน Exception นี้
ตัวอย่าง
Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented
Exception type: Microsoft.SqlServer.Chainer.Infrastructure.InputSettingValidationException
Message:
The Windows account ”W28BI401\sos” does not exist and cannot be provisioned as a SQL Server system administrator.
Data:
SQL.Setup.FailureCategory = InputSettingValidationFailure
DisableWatson = true
Stack:
at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.LogAllValidationErrorsAndThrowFirstOne(ValidationState vs)
at Microsoft.SqlServer.Configuration.SetupExtension.ValidateFeatureSettingsAction.ExecuteAction(String actionId)
at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
Inner exception type: Microsoft.SqlServer.Configuration.SqlEngine.ValidationException
Message:
The Windows account ”win2008BI\SQLadmin” does not exist and cannot be provisioned as a SQL Server system administrator.
ข้อควรระวังเกี่ยวกับ Account Name , IT CASE SENSITIVE ตัวเล็กตัวใหญ่มีผลครับ - -"
เช่น WIN2008BI แตกต่างจาก win2008BIถ้า server name จริงเป็นตัวใหญ่หมดก็ต้องใช้ตัวใหญ่ทั้งหมดใน parameter ไม่งั้นมันก็บอกว่าไม่มี Account นั้น ฮ่าๆ
ขอให้เปลี่ยน Collation สำเร็จนะครับ :)
วันพุธที่ 13 มิถุนายน พ.ศ. 2555
Process INDEX Error , Code 3238133761
<return xmlns="urn:schemas-microsoft-com:xml-analysis">
<results
xmlns="http://schemas.microsoft.com/analysisservices/2003/xmla-multipleresults">
<root
xmlns="urn:schemas-microsoft-com:xml-analysis:empty">
<Exception
xmlns="urn:schemas-microsoft-com:xml-analysis:exception" />
<Messages
xmlns="urn:schemas-microsoft-com:xml-analysis:exception">
<Error
ErrorCode="3238133761" Description="File system error:
The following error occurred while opening the file '\\?\F:\TSC
Projects\OLAP\Data\olap_tsc401.76.db\Cube_TXNs.108.cub\Txns Terminal.0.det\Fact
TXNs Y200812.0.prt\6.string.data'." Source="Microsoft SQL Server 2005 Analysis Services" HelpFile="" />
<Error
ErrorCode="3238133761" Description="File system error:
The following error occurred while opening the file '\\?\F:\TSC
Projects\OLAP\Data\olap_tsc401.76.db\Cube_TXNs.108.cub\Txns Terminal.0.det\Fact
TXNs Y200812.0.prt\6.string.data'." Source="Microsoft SQL Server 2005 Analysis Services" HelpFile="" />
<Error
ErrorCode="3240034325" Description="Errors in the OLAP
storage engine: An error occurred while processing the indexes for the Fact
TXNs Y200812 partition of the TID measure group of the Cube_TXNs cube from the
olap_tsc401 database." Source="Microsoft SQL Server 2005 Analysis Services" HelpFile="" />
<Error
ErrorCode="3239837698" Description="Server: The operation
has been cancelled." Source="Microsoft SQL Server 2005 Analysis Services" HelpFile="" />
Messages>
root>
results>
return>
ยังหาสาเหตุไม่ได้ แต่คาดว่าน่าจะเกิดจาก Memory ไม่พอขณะทำการ Restore OLAP Database
วันพฤหัสบดีที่ 24 พฤษภาคม พ.ศ. 2555
Combine CSV files via dos command
Open command prompt.
Type copy c:\*.csv c:\combine.csv and press enter
This will combine all of the csv files that are in your root c:\ directory into one file called File.csv.
You can change the file names and paths as necessary.
Type copy c:\*.csv c:\combine.csv and press enter
This will combine all of the csv files that are in your root c:\ directory into one file called File.csv.
You can change the file names and paths as necessary.
วันพุธที่ 23 พฤษภาคม พ.ศ. 2555
SSIS Designer does not remember visible area
Ref to : http://stackoverflow.com/questions/6095186/ssis-designer-does-not-remember-visible-area
Content
Content
get around this problem by doing the following:
- Set zoom to 100% (View -> Zoom -> 100%) Note: you may have to click in the designer pane to get Zoom to show on the view menu.
- Scroll the window to where you want it be when you open up the package.
- Select and move a task.
- Save file
For step 3, I usually select the top task and press Ctrl-[left arrow], Ctrl-[right arrow]. I like tasks to stay where I put them! :)
Hope that helps.
WORK ครับ
Reporting service ,Operation is not valid due to the current state of the object
Reporting service ,Operation is not valid due to the current state of the object
Resolve : http://www.sqlservercentral.com/Forums/Topic692785-147-1.aspx#bm1240909
Resolve : http://www.sqlservercentral.com/Forums/Topic692785-147-1.aspx#bm1240909
By Sandy Westman
Error ใน Reporting service : กรณี Long run parameter ทำให้เกิด Error ให้เปิด config file แล้ว Add key C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportManager. |
วันอังคารที่ 13 มีนาคม พ.ศ. 2555
Create an Analysis Services Project Based on an Existing Analysis Services Database
http://technet.microsoft.com/en-us/library/ms365361.aspx
To create an Analysis Services project using the Import Analysis Services 9.0 Database template
- On the File menu, select New and then select Project, or press Ctrl+Shift+N, to display the New Project dialog box, or click New Project on the toolbar.
- Select Business Intelligence Projects from the Project types pane in the New Project dialog box.
- Select Import Analysis Services 9.0 Database from the Visual Studio installed templates category of the New Project dialog box.
- Type the name of the project in the Name text box.
- Type or select the folder in which to store the files for the project in the Location dropdown list, or click Browse to select a folder.
- Either select Add to Solution to add the new project to the existing solution in the Solution dropdown list, or select Create new Solution to create a new solution.
- If Create new Solution is selected in Solution, select Create directory for solution to create a new folder for the new solution, then type the name of the new solution in Solution Name.
- Click OK.
Completing the Import Analysis Services 9.0 Database Wizard
- On the Welcome to the Import Analysis Services 9.0 Database Wizard page, click Next.
- On the Source Database page, specify the server and the database from which the wizard will extract the contents and create the Analysis Services project, and then click Next.
You can either type the database name or query the server to view the existing databases on the server. - When the wizard finishes extracting the contents of the Analysis Services 9.0 database, click Finish on the Completing the Wizard page.
- Open the Solution Explorer window to view the contents of the project.
สมัครสมาชิก:
บทความ (Atom)