Conventions Used in This Book


Names of commands and stored procedures are presented in a special monospaced computer typeface. We have tried to be consistent in our use of uppercase and lowercase for keywords and object names. However, because the default installation of SQL Server doesn't make a distinction between upper- and lowercase for SQL keywords or object names and data, you might find some of the examples presented in either upper- or lowercase.

Code and output examples are presented separately from regular paragraphs and also are in a monospaced computer typeface. Following is an example:

 select id, name, audflags  from sysobjects where type != "S" id          name                           audflags ----------- ------------------------------ ----------- 144003544   marketing_table                130 

When syntax is provided for a command, we have attempted to follow these conventions:

Key Definition
command These are command names, options, and other keywords.
placeholder Monospaced italic indicates values you provide.
{} You must choose at least one of the enclosed options.
[] The enclosed value/keyword is optional.
() Parentheses are part of the command.
You can select only one of the options listed.
, You can select any of the options listed.
[...] The previous option can be repeated.

Consider the following example:

 grant {all  permission_list  } on  object  [(  column_list  )]         to {public  user_or_group_name  [, [...]]} 

In this case, the object value is required, but the column_list is optional. Note also that items shown in plain computer type, such as grant , public , or all , should be entered literally as shown. Placeholders are presented in italic, such as permission_list and user_or_group_name . A placeholder is a generic term for which you must supply a specific value or values. The ellipsis in the square brackets following user_or_group_name indicates that multiple user or group names can be specified, separated by commas. You can specify either the keyword public or one or more user or group names, but not both.

Most of the examples presented in this book are taken from either the pubs database or the Northwind database, and we have attempted to indicate which database the examples are using in the text. However, for many of the examples presented in Part V, "SQL Server Internals and Performance Tuning," larger tables than what is available in the pubs and Northwind database were needed to demonstrate many of the concepts with more meaningful examples. For many of the chapters in this section, the examples come from the bigpubs2000 database. This database has the same structure as the pubs database, but it contains significantly more data. A copy of the database is on the CD that accompanies this book.

To install the bigpubs2000 database on your system so you can try out the various examples, do the following:

  1. Copy the bigpubs2000.mdf file from the CD into the SQL Server data folder where you want it to reside.

  2. Ensure that the Read-Only property of the bigpubs2000.mdf file is not enabled. After the file has been copied to the destination folder, right-click the file in Windows Explorer and bring up the Properties dialog. Click the Read-Only check box to remove the checkmark. Click OK to save the changes to the file attributes.

  3. Attach the bigpubs2000 database using a command similar to the following. (Note: You might need to edit the path to match the location where you copied the bigpubs2000.mdf file.)

     sp_attach_single_file_db bigpubs2000,             N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\bigpubs2000.mdf' 

Alternatively, you can attach the database using Enterprise Manager. Right-click the database folder, select All Tasks, and choose Attach Database. In the dialog presented, locate the bigpubs2000.mdf file and click OK. (Note: It may warn you that the filename for the log file is incorrect and ask if you want to continue and create a new log file. Click Yes.)



Microsoft SQL Server 2000 Unleashed
Microsoft SQL Server 2000 Unleashed (2nd Edition)
ISBN: 0672324679
EAN: 2147483647
Year: 2002
Pages: 503

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net