Nova Scotia Flag

SCOTIA SYSTEMS BLOG




Shrink a 2005 SQL Log File

October 21st, 2009 admin

If you have a 2005 SQL log file which is growing out of control – here are the steps needed to truncate it:

In SQL Server Management Studio – start a new query:

USE <DB Name>
Go

select * from sys.database_files

This will give a list of all database files – you’re looking in the “name” column for the name of the log file you want to shrink.

In a new query:

USE <DB Name>
Go

DBCC SHRINKFILE (‘<name from previous query>’, 1)

SQL/ASP Error : The user is not associated with a trusted SQL Server connection

October 7th, 2009 admin

If you’re getting the error “The user is not associated with a trusted SQL Server connection” when an ASP script is attempting to connect to a SQL DB – check to see if you have SQL and Windows Authentication set under the security settings for the database.