Computer Performance, Windows 2003, Exchange 2003, Logon Scripts

Guy recommends :
Free SolarWinds
VM Console

Solarwinds VM Console Free Download

Find out which of your VMs are a waste of space and which VMs need more resources.


 

SQL 2000 Transact - Northwind Database

SQL Transact - Northwind Database

Northwind is free.  With SQL server, Microsoft has provided THE most marvellous and comprehensive database.  Another benefit of Northwind is that once SQL is installed, then you have a copy of Northwind and so you can try my examples.

SQL Northwind built-in databaseOnce you have finished installing SQL, then start the Query Browser, and you will see the databases in the object browser. 

Tip: Once inside the Query Browser, press F8 (Function key eight) to toggle the Object Browser window.

The Northwind database structure is a series of User Tables, for example, Categories, Customers and Employees.

If we home in on the Customers, then you can see the Columns or field names and their characteristics.   For instance, CustomerID is exactly 5 characters and it cannot be Null.  Whereas City can be a variable number of characters - up to 15, moreover, City could be Null or blank.

The diagram on the right also show folders with Indexes, Constraints and Dependencies.  You can also see in passing that their are other tables in the Northwind Database, for example, Employees and Order Details.

GuyCustomer is of course, non-standard, just a table I created to experiment.

In the following section I will be concentrating on the SQL Transact statements, and not worrying about database design.  Remember all the fields have been created for us, Northwind is there for us to query.

Important Footnote: Backup and Restore

If Northwind were a real live database, 'Best Practice' would say 'Backup regularly'.  Guy says backup Northwind, so that you can go back and start again, particularly when you are testing INSERT or DELETE statements. 

While there are betters ways to backup Northwind, I have gone for the simplest method.

Statement to Backup, and protect Northwind

 

-- SQL statement to BACKUP the Northwind Database to c:\ drive

BACKUP DATABASE Northwind
TO DISK = 'C:\GuyNorthwind.bak'

 

Oh yes, and if want to get it back - here is the restore command.

 

-- SQL statement to RESTORE the Northwind Database from C:\ drive

RESTORE DATABASE Northwind
FROM DISK= 'C:\GuyNorthwind.bak'

 

 

 


 See also

 

 *


Custom Search

Site Home

Solarwinds Network Device MonitorSolarWinds' Free Network Device Monitor

Thus utility makes it easy to check the health of a router or firewall.  Check the real-time performance and availability statistics for any device on your network.

Get started with an extensive collection of "out-of-the-box" monitors for popular network devices.  Download your free Network Device Monitor

 

Home Copyright © 1999-2013 Computer Performance LTD All rights reserved

Please report a broken link, or an error.