Home » Posts tagged 'DBA'

Tag Archives: DBA

Reduce SQL Log and TempDB File Sizes

Shrink the TempDB:
use tempdb
go
-- this command shrinks the primary data file
dbcc shrinkfile (tempdev, 'target size in MB')
go
-- this command shrinks the log file, look at the last paragraph.
dbcc shrinkfile (templog, 'target size in MB')
go

Shrink Log File:
DBCC SHRINKFILE ('Test_log',TRUNCATEONLY)
BACKUP LOG "Test DB Name" WITH TRUNCATE_ONLY

MS SQL Server Version

A select statement that returns the Version, Service Pack Level, and Edition information: (MS SQL 2000 and above)

SELECT @@VERSION as 'MS SQL', SERVERPROPERTY('productversion') as 'Version', SERVERPROPERTY ('productlevel') as 'Level', SERVERPROPERTY ('edition') as 'Edition'


For MS SQL 7.0 and earlier use:

SELECT @@VERSION


See Microsoft Knowledge Base KB321185 for more information.

Managing a Windows Internal Database – MICROSOFT##SSEE

Unfortunately the Windows Internal Database (WID) that is default for things like WSUS, SharePoint Services 3.0 and other MS products and roles does not allow TCP/IP connections.  In fact WID does not allow for remote connections at all.  It does allow local Name Pipes though.

(more…)