Posts

Showing posts from 2012

Love your enemies.. it pisses them off.

There is always a threat from somewhere. Old-style DBAs are standing on the shaky ground. 5 years ago I remember myself defending the SQL Server against the domineering Oracle DBAs. The arguing was always about “who is better”. The Management Studio was a great weapon against sqlplus. And you could always use a “the DDLs are not a part of the transaction “ thing.  Without any Oracle DBAs around I must admit that Oracle is pretty amazing product although it requires a huge deal of tuning. Then came an era of NoSQL. It’s not easy to compete against such fast loads, easy scale-up and fast development. The NoSQL solutions support the usecases that do not really fit into the relational model, like graphs or unstructured data. On the other hand, the eventual consistency thing does not fit for everyone, the joins between the entities are hard and there are stability problems with many NoSQL products.  Twitter apparently has been trying to move from MySQL to Cassandra for over a year. In

SQLCMD Mode: give it one more chance

Image
- Click on me. Choose me. - asked one forgotten  feature when some bored DBA was purposelessly  wondering through the Management Studio menu at the end of her long and busy working day. - Why would I use you? I have heard of no one who does. What are you for? - perplexedly wondered aged and wise DBA. At least that DBA thought she was aged and wise though each day tried to prove to her that she wasn't. - I know you. You are quite lazy. Why would you do additional clicks to move from window to window? From Tool to tool ? This is irritating, isn't it? I can run windows system commands, sql statements and much more from the same script, from the same query window! - I have all my tools that I‘m used to, I have Management Studio, Cmd, Powershell. They can do anything for me. I don’t need additional tools. - I promise you, you will like me. – the thing continued to whine . - All right, show me. – she gave up. It’s always this way, she thought sadly, - easier to agree than

Real tortoises keep it slow and steady. How about the backups?

Image
… Four tortoises were playing in the backyard when they decided they needed hibiscus flower snacks. They pooled their money and sent the smallest tortoise out to fetch the snacks. Two days passed and there was no sign of the tortoise. "You know, she is taking a lot of time", said one of the tortoises. A little voice from just out side the fence said, "If you are going to talk that way about me I won't go." Is it too much to request from the quite expensive 3rd party backup tool to be a way faster than the SQL server native backup? Or at least save a respectable amount of storage by producing a really smaller backup files?  By saying “really smaller”, I mean at least getting a file in half size. After Googling the internet in an attempt to understand what other “sql people” are using for database backups, I see that most people are using one of three tools which are the main players in SQL backup area:  LiteSpeed by Quest SQL Backup by Red Gate SQ

Is your TRY worth catching?

Image
A very useful error handling  TRY/CATCH  construct is widely used to catch all execution errors  that do not close the database connection. The biggest downside is that in the case of multiple errors the  TRY/CATCH  mechanism will only catch the last error. An example of this can be seen during a standard restore operation. In this example I attempt to perform a restore from a file that no longer exists. Two errors are being fired:  3201  and  3013 : Assuming that we are using the  TRY  and  CATCH  construct, the  ERROR_MESSAGE ()  function will catch the last message only: To workaround this problem you can prepare a temporary table that will receive the statement output. Execute the statement inside the  xp_cmdshell  stored procedure, connect back to the SQL Server using the command line utility  sqlcmd  and redirect it's output into the previously created temp table.  After receiving the output, you will need to parse it to understand whether the statement has fin

I'm moving !!!!!

Image
I am truly exited to move this blog to SQLblog.com ! http://sqlblog.com/blogs/maria_zakourdaev/default.aspx You are more than welcomed to drop by. Stay tuned Over and out ;)

Replication frustration: Adding article does not create the table on subscriber

Working with the SQL Server replication is not a great pleasure. Working with the SQL Server replication replication is not a great pleasure, when all is working as you expect. Working with the SQL Server replication replication is not a great pleasure at all, when something is not working and there is no documentation. Working with the SQL Server replication replication is not a great pleasure at all, when something is documented but simply is not working. We have been fighting with some really weird behavior during the last few month. This is a basic transaction replication feature: adding article on the table supposed to create table on subscriber. It's working on some servers. And it doesn't work on some servers. Regardless the SQL Server version, whether it is SQL Server 2005 sp4 or SQL 2008 R2 sp1. The most amazing thing is that it's reproducible and not working on production environment ONLY. We could never reproduce it on the QA servers. The scenario is pretty