SQL Server Nation
For all of your SQL Server needs.

April 2009 - Administration

  • Enable and Disable Batches of SQL Agent Jobs

    In the following system stored procedure I allow a list of SQL Server Agent job names to be passed as an XML document. The procedure accepts the list of Job names, parses them out, and will enable or disable them based on the @enabled parameter passed into the procedure. This procedure is VERY handy for those situations where you need to disable a batch of jobs, and then enable them later on. It saves you from having to remember which jobs you disabled, along with saving you from having to go into...
  • Getting Table Row Counts

    Here's a quick and easy script you can use in SQL Server 2005 to return the number of rows in a table, along with the index size on the table, the reserved space, and the data space for the table. If you're familiar with the system stored procedure sp_spaceused, this information may seem familiar to you. I took some of this code from that procedure, but am presenting it in such a way so that it works for all tables in the database at the same time. This makes it much easier to query, and...
Copyright SQL Server Nation 2010
Powered by Community Server (Non-Commercial Edition), by Telligent Systems