Duty Free!!

SQL Write-Ahead Overhead…

SQL Server on Compressed Filesystems.

Many of us know that the filesystem on which the SQL Datafiles exist shouldnt be Compressed. The main reason that every one knows – it takes more effort to get the IO operations completed. Added to that the Windows  OS doesnt entertain any async IO operations on a Compressed volume. This makes a huge difference when the application, most probably SQL Server, can give a better performance calling the async IO calls. 

More over here by Ken Henderson’s Why you shouldn’t compress SQL Server data and log files

Advertisements

January 20, 2009 Posted by | SQL Server | Leave a comment

Lightweight Thread Pooling / Fibre Mode

One of the rare tweaks that one would do on a SQl Server when excessive Context switches are found on SQLservr.exe, is to apply the Fibre mode. In this Fibre mode there is a higher probability that SQl Server gets hung or some applications doesnt work as they are supposed to. These applications might not be fibre-safe. Infact, though  SQL Server runs in fibre-mode, at the OS level still the process called SQL Server executes in thread mode. It is just that internal to the process the thread is finely used as a set of fibres that are light weight, meaning – not heavy in terms of their possessions so the context switching between fibres doesnt eat much of the resources. 

An application thats using datastructures pertaining to a thread like Thread  Local Storage, shall not be called “fibre-safe” and are prone to errors in fibre mode. 

Ken Henderson’s blog on msdn gives an insight into this in particular detail. One can find it here.

January 20, 2009 Posted by | SQL Server | Leave a comment

SQL 2005 SP3 CTP edition is available…

 

http://blogs.technet.com/dataplatforminsider/archive/2008/10/27/sql-server-2005-sp3-public-beta-now-available.aspx

December 6, 2008 Posted by | SQL Server | Leave a comment

Upgrading SQL 2005 to 2008

With more and more clients requesting for SQL 2008 for its enhanced features,  its high time to give a try for an Upgrade  of SQL Server….and I did…

While taking the help of  SQL Server 2005 Upgrade advisor for upgrading SQL 2000 eval  to 2005, there was an error like…

SQL BPA command line has encountered a problem and needs to close…

The solution for this has been discussed here. See that the location of BPAClient should correspond to the folder where your UpgradeAdvisor is installed.

This error introduced us to an avuncular tool – SQL BPA. This is the Best Practices Analyser, which can be used to inspect the SQL Server for its standards.  This tool is described at a basic level here

SQL Server 2008 Version and Edition Upgrades clears any doubts on what versions and editions of SQL Server can be upgraded to SQL Server 2008.  I wonder why the Evaluation editions cant be upgraded to 2008..Any idea??

December 6, 2008 Posted by | SQL Server | Leave a comment

Sub-prime Crisis: What is it?

By now all the news readers must have heard about the US Subprime Crisis.  Rediff published a good article on The Crisis.  If you are interested, here it is…

http://specials.rediff.com/money/2008/sep/25slid1.htm

More curious people can find their way on net to http://en.wikipedia.org/wiki/Subprime_crisis or http://globalcreditcrunch.org/. The latter one is more like a  Newsroll with all the news/rumours flowing about The Crisis and its consequences.

None of the pages, above, mentioned a solution or even a sign of a probable solution. None listed even how long the crisis shall last. The last time such a crisis came, most executives lost their commission. This time they will be glad to be working. Have we seen the depths of the Crisis or are we still finding the abyss?

September 26, 2008 Posted by | Uncategorized | Leave a comment

What is Android?

Lets hear it from the “makers”

The Open Handset Alliance, a group of more than 30 technology and mobile companies, developed Android: the first complete, open, and free mobile platform.

If you are geeky enough to know more about it and some sample applications using it, just go through the blog related to Android by Google.

http://android-developers.blogspot.com/

To know about Android in detail and may be a head-start, go through

http://code.google.com/android/documentation.html

September 25, 2008 Posted by | technology | , , | Leave a comment

Buffett’s “time bomb”….

Buffett’s “time bomb” goes off on Wall Street:

CHICAGO (Reuters) – On Main Street, insurance protects people from the effects of catastrophes.

But on Wall Street, specialized insurance known as a credit default swaps are turning a bad situation into a catastrophe.

When historians write about the current crisis, much of the blame will go to the slump in the housing and mortgage markets, which triggered the losses, layoffs and liquidations sweeping the financial industry.

But credit default swaps — complex derivatives originally designed to protect banks from deadbeat borrowers — are adding to the turmoil.

“This was supposedly a way to hedge risk,” says Ellen Brown, the author of the book “Web of Debt.”

“I’m sure their predictive models were right as far as the risk of the things they were insuring against. But what they didn’t factor in was the risk that the sellers of this protection wouldn’t pay … That’s what we’re seeing now.”

Brown is hardly alone in her criticism of the derivatives. Five years ago, billionaire investor Warren Buffett called them a “time bomb” and “financial weapons of mass destruction” and directed the insurance arm of his Berkshire Hathaway Inc (BRKa.N: Quote, Profile, Research, Stock Buzz) to exit the business.

LINKED TO MORTGAGES

Recent events suggest Buffett was right. The collapse of Bear Stearns. The fire sale of Merrill Lynch & Co Inc (MER.N: Quote, Profile, Research, Stock Buzz). The meltdown at American International Group Inc (AIG.N: Quote, Profile, Research, Stock Buzz). In each case, credit default swaps played a role in the fall of these financial giants.

The latest victim is insurer AIG, which received an emergency $85 billion loan from the U.S. Federal Reserve late on Tuesday to stave off a bankruptcy.

Over the last three quarters, AIG suffered $18 billion of losses tied to guarantees it wrote on mortgage-linked derivatives.

Its struggles intensified in recent weeks as losses in its own investments led to cuts in its credit ratings. Those cuts triggered clauses in the policies AIG had written that forced it to put up billions of dollars in extra collateral — billions it did not have and could not raise.

EASY MONEY

When the credit default market began back in the mid-1990s, the transactions were simpler, more transparent affairs. Not all the sellers were insurance companies like AIG — most were not. But the protection buyer usually knew the protection seller.

As it grew — according to the industry’s trade group, the credit default market grew to $46 trillion by the first half of 2007 from $631 billion in 2000 — all that changed.

An over-the-counter market grew up and some of the most active players became asset managers, including hedge fund managers, who bought and sold the policies like any other investment.

And in those deals, they sold protection as often as they bought it — although they rarely set aside the reserves they would need if the obligation ever had to be paid.

In one notorious case, a small hedge fund agreed to insure UBS AG (UBSN.VX: Quote, Profile, Research, Stock Buzz), the Swiss banking giant, from losses related to defaults on $1.3 billion of subprime mortgages for an annual premium of about $2 million.

The trouble was, the hedge fund set up a subsidiary to stand behind the guarantee — and capitalized it with just $4.6 million. As long as the loans performed, the fund made a killing, raking in an annualized return of nearly 44 percent.

But in the summer of 2007, as home owners began to default, things got ugly. UBS demanded the hedge fund put up additional collateral. The fund balked. UBS sued.

The dispute is hardly unique. Both Wachovia Corp (WB.N: Quote, Profile, Research, Stock Buzz) and Citigroup Inc (C.N: Quote, Profile, Research, Stock Buzz) are involved in similar litigation with firms that promised to step up and act like insurers — but were not actually insurers.

“Insurance companies have armies of actuaries and deep pools of policyholders and the financial wherewithal to pay claims,” says Mike Barry, a spokesman at the Insurance Information Institute.

“SLOPPY”

Another problem: As hedge funds and others bought and sold these protection policies, they did not always get prior written consent from the people they were supposed to be insuring. Patrick Parkinson, the deputy director of the Fed’s research and statistic arm, calls the practice “sloppy.”

As a result, some protection buyers had trouble figuring out who was standing behind the insurance they bought. And it put investors into webs of relationships they did not understand.

“This is the derivative nightmare that everyone has been warning about,” says Peter Schiff, the president of Euro Pacific Capital at the author of “Crash Proof: How to Profit From the Coming Economic Collapse.”

“They booked all these derivatives assuming bad things would never happen. It was like writing fire insurance, assuming no one is ever going to have a fire, only now they’re turning around and watching as the whole town burns down.”

Courtesy : Reuters .

Link : http://www.reuters.com/article/newsOne/idUSN1837154020080918?pageNumber=1&virtualBrandChannel=0&sp=true

September 25, 2008 Posted by | Finance | , | Leave a comment

SQL Server: Rebuild Indexes based on Fragmentation.

In the recent past there were quiet a few friends of mine asking

for a script to rebuild indexes selectively-based on Defragmentation.

http://sql-server-performance.com/Community/forums/t/20515.aspx 

is a nice discussion for this kinda script. The script listed by ‘thomas’

is  a good/simple one.One thing this script doesnt do, is rebuilding

indexes on a View in SQL 2005. This can be attained by a small change

– try changing the

“so.type =’U'” to “so.type in (‘U’,’V’)”.

Also, this script does an offline operation, Reindexing. Inorder to have

this  changed to Defragment, which is an online operation, change the code

SELECT @execstr = ‘DBCC DBREINDEX (‘ + RTRIM(@tablename) + ‘,
‘ + RTRIM(@indexname) + ‘) WITH NO_INFOMSGS’

to

SELECT @execstr = ‘DBCC INDEXDEFRAG ( 0’ + RTRIM(@tablename) + ‘,
‘ + RTRIM(@indexname) + ‘) WITH NO_INFOMSGS’
SELECT (@execstr)
EXEC (@execstr)

SELECT @execstr = ‘UPDATE STATISTICS ON ‘ + RTRIM(@tablename) + ‘.
‘ + RTRIM(@indexname) + ‘ WITH FULLSCAN’

Remember that Reindexing will update the statistics while the

Indexdefrag doesnt. Hence it was explicitly provided with an update

statistics step in the above snippet.  Hope this helps!!

September 25, 2008 Posted by | SQL Server | Leave a comment

Hello world!

With my old blogs at Imeem and Blogspot blocked at Office,

here is where you find me when Duty-Free!

Sasi.

July 16, 2008 Posted by | Misc | Leave a comment