Archive for June 2009

XenServer 5.0: Creating a Windows File Share

June 9, 2009

At some point you might need to setup a VM using an ISO file. This post shows how to setup a file share for use by XenServer.

1. Within XenServer, click Storage | New Storage Repository.

image

2. Click the Windows File Sharing (CIFS) radio button and click next.

image

3. Enter the desired name and share name. Click Finish.

4. The new repository (CIFS ISO library) is displayed in the left-hand pane of XenCenter with details on the right-hand-side.

image

image

5. Now you can use the ISOs on this Windows Share to setup your VM by changing the DVD drive setting to the desired ISO.

image

Advertisements

SQL: Truncating a SQL Database Log

June 9, 2009

Thanks to John McBride for helping me with this.

1. In SQL Management Studio, make sure you are connected to ‘master’ in the available databases drop-down box.

2. Click ‘New Query’ to open a query window.

3. Get the logfile name by:

     a. Right-click the database

     b. Select Properties

     c. Click Files

     d. Note the name of the log file.

4. Type the following in the query window:

          Use <YOUR_DB_NAME>
          Go
          backup log <YOUR_DB_NAME> with truncate_only
          go
          dbcc shrinkfile(<YOUR_DB_LOGFILE_NAME,1)
          go

5. Click the Execute button.