I found very little information on this object, so I decided to blog about it. The RegistryAccessRule parameters are as follows: RegistryAccessRule (“domain\username”,”Permissions”,”ContainerInherit”,”None”,”Allow”) Where Permissions […]
Continue readingCategory: Windows
Windows
Cleaning up my log file in SQL 2008 R2
This morning I noticed that my log file was 450 GB. With only 30 GB remaining on the drive, I had to shrink the file. […]
Continue readingOpen Application as Administrator
Simple Windows 7 trick I learned on learn.iis.net today. To open an application as an administrator from the Start Menu (apart from right clicking and […]
Continue readingQuery Size of Tables in T-SQL
Useful command for SQL 2005 and above to see the size of each table in a given database: USE databasename EXEC sp_MSforeachtable @command1=”EXEC sp_spaceused ‘?'” […]
Continue readingQuery the INFORMATION_SCHEMA for Table Information
A very useful command to query for information about a table from INFORMATION_SCHEMA. Select * From INFORMATION_SCHEMA.COLUMNS Where TABLE_NAME=’TableName’
Continue readingShow File Stats
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 readingWITH 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 reading