Dec
31
2008
2

How to restore a SQL database from a .bak file

Sometimes we need to restore a database off someone else’s BAK file. If you dont do it often or have never done it, then here is how.

I like SQL Management Studio.

  1. Create a new database with the name you want.
  2. Right click that database and then go to Tasks -> Restore -> Database
  3. In the new dialog, enter your database name, and select the backup file at the bottom.
    — Now here comes the trick —
  4. Go to the options tab and select “Overwrite the Existing Database”, and select new paths to restore the files to (usually your default SQL folders).

The script to do this can be generated and here it is:

RESTORE DATABASE [q2g_dev]
FROM  DISK = N’D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\q2g_live MS SQL 2005.bak’
WITH  FILE = 1,
MOVE N’quip2go_Data’ TO N’D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\q2g_dev.mdf’,
MOVE N’quip2go_Log’ TO N’D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\q2g_dev_log.ldf’,
NOUNLOAD,
REPLACE,
STATS = 10
GO

SQL Database Restore Options

SQL Database Restore Options

Enjoy. Use your database names instead of mine :)

Written by Quentin in: Uncategorized | Tags: , , , , ,
Dec
12
2008
2

dump valve installation

Ok, you wont believe it – but this is my second post for today.

A few weeks back I put the dump valve on my car. Dump vales dont give you any additional performance, if anything they increase fuel consumption because you drive harder.

But the sound they make is second to nothing (when changing gears). What I mean is there is nothing better to hear when changing gears than a dump valve venting to atmosphere!

To fit the valve:

  1. find your boost pipe
  2. fit valve along boost pipe after pressure sensor
  3. find head vacuum reservior
  4. attach vacuum line to that, and to the valve
  5. enjoy
vacuum line from reservior

vacuum line from reservior

the dump valve

the dump valve

the finished product (ssssswwwssshhhh)

the finished product (ssssswwwssshhhh)

Written by Quentin in: Cool Stuff | Tags: , , ,
Dec
12
2008
0

Time to post

It has been some time since I have made a post. I guess I have been too lazy.

But this morning I got a comment on one of my posts to moderate (and it wasn’t spam) —- which means someone found my blog. So to keep the viewers happy here is another meaningless post :)

Quick news:

  • I’m getting married and doing lots of wedding planning.

    little lamb

    little lamb

  • I’m selling my car to pay for honeymoon
  • I’m working until the 23rd!

Thanks to those who read – here is a photo of a lamb I saw and petted the other day.

Written by Quentin in: Chatter | Tags: , , , ,

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com