This DBCC SHOWFILESTATS command provides you with the data files for the current database that you select. DBCC SHOWFILESTATS or DBCC SHOWFILESTATS WITH NO_INFOMSGS will […]
Continue readingAuthor: kevin
WITH Syntax to Create a Temporary Table
The WITH (common_table_expression) command creates a temporary table that can be used in a SELECT, INSERT, UPDATE, MERGE, or DELETE statement. Very useful for creating […]
Continue readingReturn Top 1 Field in a JOIN statement
This is a nice solution in that it groups the field used in the join statement. You can use this technique in many situations. I […]
Continue readingEscalate Privileges in Windows 7
Windows 7 requires you to escalate privileges before running your VBSCript. The following script reopens the script with administration privileges. If WScript.Arguments.length = 0 Then […]
Continue readingPass Exit Code (errorlevel) From One Batch Script to Another
It is often helpful to pass the exit code (errorlevel) from one batch script to another. You can do this using exit %errorlevel%, which closes […]
Continue readingMultiple Commands Within a CmdExec Job Step
One irritating problem with the Operating System (CmdExec) SQL Job Type is that you can only run a single command. Most people get around this […]
Continue readingQuery Database Size and Unallocated Space from SQL Database
I created the he following stored procedure to give me a more clear look at the unallocated and unused space used by my databases. The […]
Continue readingfile_put_contents() Function for PHP 4
I needed to run code I wrote for PHP 5 on a PHP 4 installation. Everything worked except the file_put_contents function. I scoured the web […]
Continue readingTerminate Connections to an SQL Database
Have you ever tried to restore a database to an SQL server with existing connections? Unless the connections are terminated, the database restore will fail […]
Continue readingList all Connections to an SQL Database
A simple, but useful command, this script will show all connections to an SQL server. Replace Database Name with the name of the database and […]
Continue reading