Saturday, September 17, 2011

Generate T-SQL for SQL 2008 R2 Database Compression





The following two query are for Microsoft SQL, they will generate T-SQL needs to enable a current database objects (tables and indexs) to be alerted with database compression.

Use this query set for databases that don't have the objects compressed.




--Creates the ALTER TABLE Statements



SET NOCOUNT ON

SELECT 'ALTER TABLE ' + '[' + s.[name] + ']'+'.' + '[' + o.[name] + ']' + ' REBUILD WITH (DATA_COMPRESSION=PAGE);'

FROM sys.objects AS o WITH (NOLOCK)

INNER JOIN sys.indexes AS i WITH (NOLOCK)

ON o.[object_id] = i.[object_id]

INNER JOIN sys.schemas AS s WITH (NOLOCK)

ON o.[schema_id] = s.[schema_id]

INNER JOIN sys.dm_db_partition_stats
AS ps WITH (NOLOCK)

ON i.[object_id] = ps.[object_id]

AND ps.[index_id] = i.[index_id]

WHERE o.[type] = 'U'

ORDER BY ps.[reserved_page_count]



--Creates the ALTER INDEX Statements


SET NOCOUNT ON

SELECT 'ALTER INDEX '+ '[' + i.[name] + ']' + ' ON ' + '[' + s.[name] + ']' + '.' + '[' + o.[name] + ']' + ' REBUILD WITH (DATA_COMPRESSION=PAGE);'

FROM sys.objects AS o WITH (NOLOCK)

INNER JOIN sys.indexes AS i WITH (NOLOCK)

ON o.[object_id] = i.[object_id]

INNER JOIN sys.schemas s WITH (NOLOCK)

ON o.[schema_id] = s.[schema_id]

INNER JOIN sys.dm_db_partition_stats
AS ps WITH (NOLOCK)

ON i.[object_id] = ps.[object_id]

AND ps.[index_id] = i.[index_id]

WHERE o.type = 'U' AND i.[index_id] >0

ORDER BY ps.[reserved_page_count]



Wednesday, September 14, 2011

Windows 8 installed, so so easy!

Just tried install Windows 8 on my Eee 1000H netbook and Dell Latitude, was so easy and greate to finaly see Windows Live Id sign in. Metro apps work greate, but wish I had a touch screen. All the photos can be found at https://plus.google.com/photos/111529119974002919131/albums/5652323718253109361

 Windows 8 Metro Titles on Dell Latitude

Windows 8 Metro Titles on Dell Latitude, showing facebook

Windows 8 Metro Titles on Dell Latitude showing twitter

Windows 8 showing twitter

mockups and wireframing for ERP projects

I was speaking at an event for AX2012 in Microsoft London office, and had a few e-mails asking me about the tools we use for mockups and wireframing.

Me (Rif Kiamil) talking about AX2012 in London


Wireframing
As I came from a coldfusion background with FuseBox, I did all my wireframing in coldfusion based applications. Not done this since 2004, plus we used a tool called DevNotes with it. If you have a place to host coldfusion you can try http://sourceforge.net/projects/wireframetool/

Here some text about how I was sold on page by page wireframing
"
Showing your client something early on is vital to the success of your project. Is it possible to show them something within a few minutes after you shake hands? Absolutely! Use a wireframe.
A wireframe for a web application is a way to take notes in a very structured way. Instead of drawing boxes and arrows and notes on your legal pad, you can brainstorm by actually creating a clickable application right in front of your client.

It doesn't actually do anything, but it demonstrates the flow of what the application will do. When we wireframe, we're simply trying to understand the user flow.

Each page in the wireframe contains a couple sentences explaining what will be on that page in the
real application. You can get as detailed as you'd like, but expect some of the ideas to change over time. Your client(s) won't know to ask you to change something until they see it. The sooner you can get them to make change requests, the more likely you'll be on the road to creating a successful software project.
"


Mockups
Two tools I have played around with for mockups. To me mockup more visual, where wireframe should be more simple (text on a page with hyperlinks)

Balsamiq
This tool super easy, has a free version also and anybody can use it. Runs on Flash and can also work offline. Plus huge amount of add in into the product.
http://balsamiq.com/products/mockups

SketchFlow from Microsoft 
This tool complex, but can deal with collecting feedback from your client, customer, end user.
http://www.microsoft.com/expression/products/Sketchflow_Overview.aspx

Tuesday, August 30, 2011

US road-splitting phenomenom

Finaly found a way to say it, been trying to get this accross to my friend in the EU that wanted to drive in the US.

"exciting road-splitting phenomenom you guys in the States have. It's bizarre. A harmless looking freeway suddenly splits for no apparant reason, and if you are running on auto-pilot then you're faced with a panic decision: east or west. What - you want to continue heading north? Mwaahahaha! Too bad little man." Thanks Chris Maunder

http://www.codeproject.com/KB/interviews/redmondtrip2.aspx

Sunday, August 14, 2011

SQ-Easy Barbeque in London

As summer comes to an end, wanted to try and get in a few more BBQ’s in. So after a long day training in the gym for London 2012 Marathon ready to start cooking the meat.

The Day Before

The day before I did my BBQ I want to marinate the chicken, the chicken and marinate are from my current employer. I find marinates at Tesco and other supermarket chains to be very expensive, not great value for money and have to get a few bottles. I used SQ-easy Tomato Ketchup, SQ-easy BBQ Sauce and SQ-easy Very Hot Chilli Sauce. This are big bottels which can be stored away and the one you have opened can be kept in your home frige. I like to normally have two different flavours of chicken, one which is spicy (I love spicy food) and Barbeque based (and bit sweet)


I normally cut some small holes in the chicken to allow the chilly and bbq sauce to get in. I don’t use 100% of a single sauce. For my spicy chicken I mix 80% SQ-easy Very Hot Chilli Sauce and 10% Ketchup and 10% water. For my Barbeque/BBQ 80% SQ-easy BBQ Sauce, 10% SQ-easy Ketchup and 10% water. I then cover chicken and marinate place it in the fridge overnight.

The Sunday

I am really fussy about my charcoal. I will only use Restaurant grade charcoal. I normally go for BigK Restaurant Charcoal, 15kg box. My Barbecure is a Arhcway Barbecue Deluxe.

Cooking Chicken

Make sure always cook chicken correct, if your unsure cut a few extra holes and if still unsure 100% cookced you can just cut each bit in half.


Keep applying SQ-Easy on the chicken while doing the BBQ

Keep adding sauce


Keep adding more sauce

SQ-easy Very Hot Chilli Sauce doing a good job keep the chicken covered

Make a hole in the middle to allow the heat to get inside.

Cut holes to allow the heat to get all the way thu

If your not sure if its cooked, cut it in half.

Cut the chicken in half if your unsure if its cooked

The Beer

Dont over do the beer, or you will burn the food. Also dont over do the talking. Cooking a BBQ need 100% of your time, make sure got some one eles doing all the running around for you. Due to my turkish roots, I got for Efes Pilsener Premium Beer.


Efes Pilsener Premium Beer DRK679

The Result

All the cooking is done, time to eat (1 hours of cooking, 10 mins of eatting)

Tuesday, July 26, 2011

Setup "Update Balance" after upgrading to AX2012

In AX2009 the Balances updates when you do a posting, in AX2012 the defult setup after data upgrade is to have the balances not update on posting.

You have three options

1. Run manual Update Balance
2. Setup a Batch to Update the Balance
3. After "Rebuilding Balance" for the 1st time, you can check the box. "Update balance buring the posting process"

This menu can be found under General Ledger > Financial Dimensions > Financial Dimension Set

Tuesday, July 19, 2011

Embed New York City 2010 Marathon

I just was playing with my Garmin, and reading about how to train in the heat as I get ready for London 2012 Marathon.. I worked out that could embed the run on my blog.