Database Reference
In-Depth Information
not represent a total tragedy, you may still want to avoid this by using RAID technology, which provides similar
performance, simpler administration, and automatic recovery from a hard drive failure. It is also easier from a BI
designer perspective, because the network team will set it up for you most of the time!
eXercISe 5-1. creatING the pUBLIcatION INDUStrIeS DataBaSe
In this exercise, you create a database for the Publication Industries data warehouse.
Important: You practice administrator-level tasks in this topic, so you need administrator-level privileges.
The easiest way to achieve this is to right-click the menu item, select Run as Administrator, and then answer
Yes to access administrator-level privileges while running this program. In Windows 7 and Vista, just logging
in with an administrator account is not enough. For more information, search the Web for “Windows 7 True
Administrator and user Access Control.”
1.
open SQL Server Management Studio 2012. (You can do so by clicking the Start
button and navigating to All Programs ➤ Microsoft SQL Server 2012 ➤ SQL Server
Management Studio. Right-click SQL Server Management Studio 2012 and click
the Run as Administrator menu item. If the uAC message box appears asking, “Do
you want the following program to make changes to this computer?” click Yes [or
Continue depending upon your operating system] to accept this request.)
2.
When Management Studio opens, choose to connect to the database engine by
selecting this option in the Server Type dropdown box. Then click the Connect button
to connect to the database engine (Figure 5-2 ).
3.
use the Query Window to create a database using the code in Listing 5-5.
Tip: The files for this exercise, as well as all of the exercises throughout this topic, are available in the
downloadable book content.
Listing 5-5. Creating the DWPubsSales Data Warehouse Database
USE [master]
GO
IF EXISTS (SELECT name FROM sys.databases WHERE name=N'DWPubsSales')
BEGIN
-- Close connections to the DWPubsSales database
ALTER DATABASE [DWPubsSales] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE [DWPubsSales]
END
GO
CREATE DATABASE [DWPubsSales] ON PRIMARY
( NAME=N'DWPubsSales'
, FILENAME=N'C:\_BISolutions\PublicationsIndustries\DWPubsSales.mdf'
, SIZE=10MB
, MAXSIZE=1GB
, FILEGROWTH=10MB )
LOG ON
 
Search WWH ::




Custom Search