Wednesday, November 14, 2012

ODBC. Creating File DSN

If you have File DSN  on other Box you can copy *.dsn file and edit it if required.

Tuesday, November 6, 2012

Useful links on SQL

Article about Using sp_who2

List of queries useful for troubleshooting SQL slowness (see 'Related Post' section)

Monday, November 5, 2012

How to truncate SQL Log


In management studio:
  • Right-click the database, choose properties, then options.
  • Make sure "Recovery model" is set to "Simple", not "Full"
  • Click Ok
  • Right-click the database again, choose tasks -> shrink files
  • Change file type to "log"
  • Click ok.
Alternatively, the SQL to do it:
 ALTER DATABASE mydatabase SET RECOVERY SIMPLE
 DBCC SHRINKFILE (mydatabase_Log, 1)