Posts

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 r...

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 ...

DBCC LOGINFO on SQL 2005 causes “non-yielding processes on scheduler” errors and server timeouts

Image
If you are using DBCC LOGINFO in the production environment and you are lucky enough to still have an instance of SQL Server 2005 which, suddenly out of the blue, started throwing “non-yielding processes on scheduler” errors into the error log and becomes unresponsive, then you should know that there can be a connection between the two. It is most probably a bug in the DBCC, reproducible on SQL 2005 instances only. It’s been fixed for SQL 2008 and up. Maybe this is one of the reasons why this DBCC is undocumented… I have the following procedure which loops through all the databases and checks the number of VLFs (virtual log files - logical sections in the transaction log file allocated each time a log growth occurs). It’s using an undocumented, but very useful for this purpose, DBCC LOGINFO. Unfortunately, there was a database snapshot on the server and the procedure got executed there as well as on other databases (not on purpose, of course, just used sp_msforeachdb procedure with...

Easy load testing using Management Studio

Image
There is an easy way to open several connections to your SQL Server in order to perform load testing. You can use Management studio "Multiple Server Query Execution" feature. This feature is usually used to run the same query against multiple servers but we also can use it for a load or stress testing. In the registered servers tab create a group with the same name as your server that you are planning to use for the load testing. Inside the group create 10 or more connections to the same server, just making sure that in the server alias field you add number to your server name otherwise Management Studio will not allow to create two server connections with the same alias. Easy way to add multiple connections is by editing Management Studio connections xml file that you can find in "C:\Users\<> \AppData\Roaming\Microsoft\Microsoft SQL Server\110\Tools\Shell\RegSrvr.xml", you can simply copy the connection multiple times, still changing alias name for each ne...

PASS 2011 summit excitement

Image
The PASS summit is an amazing event, it is fantastic to see more than 4000 SQL Server DBAs and BI developers from all over the world at the one place. Everyone here is talking SQL, joking SQL and breezing SQL. The most terrific thing about an SQL Server DBAs is that crazy and passionate light in their eyes when they talk about their job and an SQL Server in general. I'm very new to the twitter world but here everything that happens on summit is always commented on twitter ( note the big screen on the photo - it's all twitting) , all the tricky questions and the funny remarks during the sessions, mentors criticizing notes and, of course, "thank you very much for a great session" comments as well as all activities like #sqlrun in the morning, #sqlawards , #sqlquiz and #sqlclinic during the day and #sqlkaraoke in the evening. Second day of the PASS was #sqlkilt day, many #sqlpeople were going around in kilts. It's quite difficult to choose which lecture to attend...