Posts by Mohammed Mawla

SQL server : Convert BBcode to HTML

A simple example of BBCode would be to make some text bold , this can be simply written like that [b]Bold Text[/b] or italic [i]italic text[/i]. In HTML , this can be done by font tags (deprecated in newer HTML versions) or CSS text properties. I tell you what! I’m writing this blog and I’m even using some BBCode tags to format text.

Check URL Status from SQL Server

One of our clients has a public web page and they needed to ensure that it is always up and accessible. Pythian already has a monitoring stack that includes website and pages monitoring. I wondered if this could be done from SQL Server using built-in Windows modules to access external web resources. There are various the methods we can use.

SQL Server: More light shed on “non-yielding scheduler” and Indexes stats

Here is a must-read whitepaper describing SQL Server Scheduling and how to interpret and diagnose Errors 17883, 17884, 17887, and 17888; please look here How To Diagnose and Correct Errors 17883, 17884, 17887, and 17888. We had a client having same issue. The client runs a busy online business with thousands of connected users; databases sometimes include more than half a million tables. We had a healthy counters and server didn’t seem to suffer from memory or I/O bottlenecks. We did suspect, that it is something to do with SQL Server internals, as we also received fatal exceptions pertaining to SPIDs <50 (system processes). If you face similar issues, you should install the latest service pack and cumulative update, and check if you have any resource bottlenecks. You can try trace T2330 as well, and if you still get errors or dumps, then you had better open a case with Microsoft Support to analyze the dumps and provide a resolution.

SSIS tip: Set variables’ values interactively in SSIS packages

This is a little tip for those who develop or debug SSIS packages. In SQL Server Integration services, User namespace variables are assigned values that are used across the package. When developing, testing or debugging packages, we assign multiple values to those variables to test different scenarios. This is done using the variables window. However, SSIS Script tasks can allow us to key in values for selected variables in run time. This looks more fun and keeps us from taking chances when we forget assigning variables’ values.

Running querys against multiple SQL Server AND Oracle instances

Before SQL Server 2008, there was no native support for running the same query against multiple instances using shipped tools, so it can be approached in one of these ways…I’ve used nearly all of them, but I have found that linked servers provide a higher degree of control on the target servers, error handling, and most important, the ability to use SQL server Encryption to store the credentials of source servers if some of the servers are using SQL authentication.

T-SQL Script: Return Replication Info, Plus Undistributed Commands

In SQL Server Replication, a regular check is getting the number of undistributed commands for a transactional subscription. This can be done using the replication monitor (SQlmonitor.exe from the RUN prompt) or programmatically by running sp_replmonitorsubscriptionpendingcmds at the Distributor on the distribution database. To return this, my idea was to get a list of publishers, publications, subscribers, and so on, into a temporary table, loop against the result, and run sp_replmonitorsubscriptionpendingcmds for each row, and then join against MSdistribution_history for the final result. Here it is. All comments and additions are welcome.

Page 2 of 3123