Commands to truncate a SQL Server log file?

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)

Install error libdigest-sha1-perl on Ubuntu 12.04 Precise Pangolin

Even if you try running apt-get install libdigest-sha1-perl you will not find it in any repositories because the version of Perl used for Ubuntu 12.04 already includes Digest::SHA.

Solution

wget http://launchpadlibrarian.net/85191944/libdigest-sha1-perl_2.13-2build2_amd64.deb
dpkg -i libdigest-sha1-perl_2.13-2build2_amd64.deb

(change amd64 to i386, if y on 32bit)

Terminal Server Easy Print not printing

TS Easy Print feature is not redirecting local and network print drivers to the Terminal Server session. The printer driver software is installed ok, apparently there is no error, but nothing happens when you print (not made ​​of the session).

Besides having the role of Terminal Services in Application Mode installed, you also installed the role of a Domain Controller (DC)….

Solution:

Type in a elevated command promt:

cd c:\windows\system32\spool
cacls.exe PRINTERS /e /g users:C