Microsoft SQL Sample Databases

Posted by Darren | Posted in Technology, Work | Posted on 07-21-2009

Tags: ,

0

SQL Server 2000: Northwind & Pubs
Download 1Download 2
Instructions:

  • Run “SQL2000SampleDb.msi”
  • Browse to “C:\SQL Server 2000 Sample Databases”.
  • Execute “instnwnd.sql” & “instpubs.sql”

SQL Server 2005: AdventureWorks & AdventureWorksDW
AdventureWorksDB.msiAdventureWorksBI.msi
Instructions:

  • Run “AdventureWorksDB.msi” & “AdventureWorksBI.msi”
  • Attach the databases by executing the following script:

exec sp_attach_db @dbname = N'AdventureWorks',
@filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf',
@filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'

exec sp_attach_db @dbname=N'AdventureWorksDW',
@filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorksDW_Data.mdf',
@filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorksDW_log.ldf'

Share

SQL 2000 DBCC SHOWCONTIG

Posted by Darren | Posted in Life in General | Posted on 01-12-2009

Tags: , , ,

0

I’m re-indexing a SQL 2000 database. I googled for some information.

Display fragmentation information for the data and indexes of the specified table:
DBCC SHOWCONTIG(tbl_Name)

Display fragmentation information for all tables in a selected database:
DBCC SHOWCONTIG WITH TABLERESULTS

Rebuild one or more indexes for a single table in the specified database:
DBCC DBREINDEX(tbl_Name)

This article contains a stored procedure to re-index all the tables in a specified database.

Share

SQL Server Enterprise Manager Error

Posted by Darren | Posted in Work | Posted on 12-02-2008

Tags: , ,

0

I noticed the following error on SQL Server Enterprise Manager in Taskpad view:
Internet Explorer Script Error
An error has occurred in the script on this page.
Line: 307
Char: 2
Error: Unspecified Error
Code: 0
URL: res://C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Binn\Resources\1033\sqlmmc.rll/Tabs.html
Do you want to continue running scripts on this page?

SQL Server Enterprise Manager Error

SQL Server Enterprise Manager Error

The fix:
View, Large Icons
View, Taskpad

Share