Posts in "dev"

Part 1 : Pengenalan Spatial Data Type di SQL Server 2008

Akhirnya Microsoft SQL Server 2008 mendukung tipe data spatial (keruangan). Sebelum memulai masuk ke bagian teknis ada baiknya kita sedikit berkenalan dahulu dengan data spatial. Data spatial (keruangan) dasarnya di bagi menjadi 2 bagian yaitu jenis data vektor dan satunya lagi jenis data raster. Jenis data vektor adalah “hasil” dari koordinat X,Y, Z untuk menggambarkan… Continue reading

Part 3: Data Loading,Methods dan Sample GEOMETRY di SQL Server 2008

Pada tipe data GEOMETRY (lupakan dahulu GEOGRAPHY, agar tidak bingung), SQL Server 2008 memiliki 3 opsi loading data (membentuk data) : OGC Well Known Text (WKT), Well Known Binary (WKB) dan Geography Markup Language (GML). Sedangkan untuk mempresentasikan data, SQL Server memiliki beberapa Methods sesuai standart OGC dan beberapa yang sifatnya extended. Contoh Syntax WKT:… Continue reading

Step 4: Extraction, Loading SPATIAL Data Type

Pada tiga penjelasan sebelumnya, kita sudah berkenalan dengan jenis data spatial di SQL Server 2008. Topik berikunya mengenai load data spatial jenis shapefile(shp) ke dalam table SQL Server 2008. Mengapa saya memilih menyimpannya di SQL Server 2008 dibandingkan dengan penyimpanan format flat file macam shapefile (shp,idx,dbf) ? Berdasar pengalaman, data dalam bentuk tabular lebih mudah… Continue reading

Kill a lock process

The last method (workaround) to solve a lock status is by killing the process. Write this line to Kill a process in sql server:

–This is the progress report.spid 55: Transaction rollback in progress. Estimated rollback completion: 70% Estimated time left: 15 seconds.

Multiple IIf Logic Block

IIf function often used in MultiDimensionalExpression (MDX), It’s quiet simple to implement single block of IIf block. This an example of Multiple IIf logic block. Example1:

If…Then..Else… in MultiDimensionalExpression

A logical script in MDX to perform an “If..Then.. Else..” block.

Example1:The following example returns 0 if Measures.CurrentMember is an empty cell, 1 otherwise:

Example2:The following string returns the string “Yes” if Measures.CurrentMember is an empty cell, the string, “No” otherwise:

Example3:

Example4:Average Sales (Measure) By Time Day (Dimension)

Source:… Continue reading

Relative Contribution to Total Value (Percentage)

There’s a few scenario to calculate a percentage of a measure in OLAP CUBE (Analysis Service 2000). A Percentage is common calculation in MDX , and it can be solved by divide a measure to  total value (Grand Total). Sample 1:Measures.[Value Contribution to Total]:

Sample 2:Measures.[Value Contribution to Total]:

Sample 3:Measures.[Product Contribution to… Continue reading

Encrypt and Decrypt Web.Config (Connection Strings, etc) from ASP Page

Example: How to encrypt/decrypt connectionStrings and SessionState section on Web.Config file? This is a codebehid sample script written on C# to perform Encrypt and Decrypt procedure against few items on Web.Config file. Single ASP.NET page can perform this task easily, so you don’t have to write any code in command prompt. Declare this namespace:

Continue reading