-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReadMe_SQL2000SampleDbScripts.htm
1055 lines (937 loc) · 59 KB
/
ReadMe_SQL2000SampleDbScripts.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="Readme_SQL2000SampleDbScripts_files/filelist.xml">
<title>Updated SQL Server 2000 Sample Database Scripts</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:LastAuthor>Susan Jorgenson</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>4</o:TotalTime>
<o:Created>2004-12-21T00:05:00Z</o:Created>
<o:LastSaved>2004-12-21T00:09:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>1673</o:Words>
<o:Characters>8772</o:Characters>
<o:Company>Microsoft Corporation</o:Company>
<o:Lines>186</o:Lines>
<o:Paragraphs>143</o:Paragraphs>
<o:CharactersWithSpaces>10302</o:CharactersWithSpaces>
<o:Version>11.6360</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:DisplayBackgroundShape/>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]--><!--[if !mso]><object
classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<![endif]-->
<style>
<!--
a:active, a:hover { color: "#FF0000"; cursor:hand; text-decoration:"underline";}
h1
{margin-bottom:" .5em";}
h2
{margin-bottom:" .5em";}
h4
{margin-bottom:" .5em";}
h5
{margin-bottom:" .5em";}
p
{margin-top:" .6em";}
dt
{font-decoration: underline;}
table
{cellpadding: "0.5em";}
indent
{ margin-left: "1.5em";}
#ALERT\_NOTE
{margin-left:" 1.5em";
margin-top:" 1em";}
#ALERT\_IMPORTANT
{margin-left:" 1.5em";
margin-top:" 1em";}
#ALERT\_WARNING
{color: "B22222";
margin-left:" 1.5em";
margin-top:" 1em";}
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h1
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:1;
font-size:23.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h2
{margin-top:.25in;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:21.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h3
{margin-top:.2in;
margin-right:0in;
margin-bottom:6.0pt;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:19.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:17.5pt;
font-family:"Times New Roman";
font-weight:bold;}
h5
{margin-top:.25in;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:5;
font-size:14.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h6
{margin-top:.2in;
margin-right:0in;
margin-bottom:6.0pt;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:6;
font-size:13.0pt;
font-family:"Times New Roman";
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:#660000;
text-decoration:underline;
text-underline:single;}
em
{color:red;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
margin-bottom:.1in;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
code
{mso-ansi-font-size:14.0pt;
mso-bidi-font-size:14.0pt;
font-family:"Courier New";
mso-ascii-font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";
mso-hansi-font-family:"Courier New";
mso-bidi-font-family:"Courier New";}
pre
{margin-top:0in;
margin-bottom:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:70780998;
mso-list-template-ids:-1469567146;}
@list l1
{mso-list-id:211312546;
mso-list-template-ids:981356148;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l1:level2
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l2
{mso-list-id:449664986;
mso-list-template-ids:-1469567146;}
@list l3
{mso-list-id:467821962;
mso-list-template-ids:-1469567146;}
@list l4
{mso-list-id:642199059;
mso-list-template-ids:-1469567146;}
@list l5
{mso-list-id:677006425;
mso-list-template-ids:1590835080;}
@list l5:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l6
{mso-list-id:702442638;
mso-list-template-ids:-1469567146;}
@list l6:level2
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l7
{mso-list-id:1389573287;
mso-list-template-ids:-1469567146;}
@list l8
{mso-list-id:1533373284;
mso-list-template-ids:-1469567146;}
@list l9
{mso-list-id:1721006235;
mso-list-template-ids:679795866;}
@list l9:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l10
{mso-list-id:1873227428;
mso-list-template-ids:603867934;}
@list l10:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]--><!-- Document last modified on Wednesday, December 15, 2004 - 9:35 AM --><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink="#660000" style='tab-interval:
.5in' topmargin=0 id=bodyID>
<div class=Section1>
<h1><span style='font-size:16.0pt;font-family:Verdana;color:black'>Updated SQL
Server 2000 Sample Database Files<o:p></o:p></span></h1>
<h5><span style='font-size:10.0pt;font-family:Verdana;color:black'>December 15,
2004<o:p></o:p></span></h5>
<p><span class=GramE><span style='font-size:8.5pt;font-family:Verdana;
color:black'>© Copyright Microsoft Corporation, 2004.</span></span><span
style='font-size:8.5pt;font-family:Verdana;color:black'> All rights reserved.<o:p></o:p></span></p>
<p style='background:#C0FFFF'><span style='font-size:8.5pt;font-family:Verdana;
color:black'> <br>
The SQL Server documentation team cannot answer technical support questions,
but welcomes your suggestions and comments about this <span class=SpellE>readme</span>
documentation. You can quickly and directly send e-mail feedback using the link
below. Please send feedback in English.<br>
<br>
To submit written feedback about this document, click here: <a
href="mailto:[email protected]?subject=SQL%20Server%202000%20Sample%20Database%20Scripts%20readme%20file&body=---Please%20type%20comments%20here,%20leaving%20the%20subject%20line%20in%20place.---">Submit
feedback</a>.<br>
<o:p></o:p></span></p>
<p class=MsoNormal><a name="_introduction_d3jb"></a><b><span style='font-size:
8.5pt;font-family:Verdana;color:black'>Introduction</span></b><span
style='font-size:8.5pt;font-family:Verdana;color:black'><o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>The Microsoft®
SQL Server 2000 Sample Database Files include: <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l1 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>New versions of two scripts included with SQL Server 2000: <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.5in;text-indent:-.25in;mso-list:l1 level2 lfo1;tab-stops:list 1.0in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span class=SpellE><span style='font-size:8.5pt;
font-family:Verdana;color:black'>Instpubs.sql</span></span><span
style='font-size:8.5pt;font-family:Verdana;color:black'> creates the <b>pubs</b>
sample database.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.5in;text-indent:-.25in;mso-list:l1 level2 lfo1;tab-stops:list 1.0in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span class=SpellE><span style='font-size:8.5pt;
font-family:Verdana;color:black'>Instnwnd.sql</span></span><span
style='font-size:8.5pt;font-family:Verdana;color:black'> creates the <span
class=SpellE><b>Northwind</b></span> sample database.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l1 level1 lfo1;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Pre-built database files that can be attached to an instance of
SQL Server 2000: <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.5in;text-indent:-.25in;mso-list:l1 level2 lfo1;tab-stops:list 1.0in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span class=SpellE><span style='font-size:8.5pt;
font-family:Verdana;color:black'>Pubs.mdf</span></span><span style='font-size:
8.5pt;font-family:Verdana;color:black'> and <span class=SpellE>pubs_log.ldf</span>
are the data and log files for the <b>pubs</b> sample database.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.5in;text-indent:-.25in;mso-list:l1 level2 lfo1;tab-stops:list 1.0in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span class=SpellE><span style='font-size:8.5pt;
font-family:Verdana;color:black'>Northwind.mdf</span></span><span
style='font-size:8.5pt;font-family:Verdana;color:black'> and <span
class=SpellE>northwind.ldf</span> are the data and log files for the <span
class=SpellE><b>Northwind</b></span> sample database.<o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>These copies
of the scripts or database files are the same as the versions included with
SQL Server 2000, except for these changes: <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l5 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>The script for creating <b>pubs</b>, <span class=SpellE>instpubs.sql</span>,
has been modified to install <b>pubs</b> and all of the <b>pubs</b> data in one
step. The original version of <span class=SpellE>instpubs.sql</span> included
in SQL Server 2000 does not load in some of the <b>pubs</b> data, and customers
were required to run batch jobs to install some of the larger data values.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l5 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>The scripts have been brought into compliance with recent
Microsoft samples security guidelines. <span class=SpellE>Instpubs.sql</span>
no longer creates a guest user and no longer grants rights to guest or
public. All dates that are used to populate the databases now express the
full four-digit year, such as 1992.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l5 level1 lfo2;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>The pre-built database files include all of the changes
incorporated in the new script files.<o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>SQL Server
2000 Desktop Engine (MSDE 2000) customers can also use these copies of the
files to install <b>pubs</b> and <span class=SpellE><b>Northwind</b></span>.<o:p></o:p></span></p>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<p class=MsoNormal><b><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Note</span></b><span style='font-size:8.5pt;font-family:Verdana;
color:black'> If the instance of SQL Server 2000 was
installed with a case-sensitive collation, always type <b>pubs</b> in all
lowercase letters, and <span class=SpellE><b>Northwind</b></span> with an
initial capital "N" followed by lowercase letters. Sample
applications and the code samples in SQL Server Books Online might not
work correctly if the database names are not created exactly as shown in the
examples.<o:p></o:p></span></p>
</blockquote>
<h1><a name="_sample_script_prerequisites_cuy1"></a><span style='font-size:
16.0pt;font-family:Verdana;color:black'>Sample Files Prerequisites<o:p></o:p></span></h1>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>The user
attaching the pre-built database files must be a member of the SQL Server <span
class=SpellE><b>sysadmin</b></span> or <span class=SpellE><b>dbcreator</b></span><b>
</b>fixed server roles.<o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>The user
running the SQL Server 2000 Sample Database Scripts must be a member of
the SQL Server <span class=SpellE><b>sysadmin</b></span> or <span
class=SpellE><b>dbcreator</b></span><b> </b>fixed server roles, or have been
granted CREATE DATABASE permissions.<o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>The files can
be used with the following versions of SQL Server 2000: <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l10 level1 lfo3;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>SQL Server 2000 Service Pack 3 (SP3) or later.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l10 level1 lfo3;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>SQL Server 2000 Desktop Engine (MSDE 2000) SP3 or later.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l10 level1 lfo3;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>SQL Server 2000 Desktop Engine (MSDE 2000) Release A.<o:p></o:p></span></p>
<h1><a name="_downloading_and_extracting_the_scripts_"></a><span
style='font-size:16.0pt;font-family:Verdana;color:black'>Downloading and
Extracting the Files<o:p></o:p></span></h1>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>The SQL Server
2000 Sample Database Files are available as an installation file,
SQL2000SampleDb.msi, which can be downloaded by following the instructions on
the download <a href="http://go.microsoft.com/fwlink/?LinkId=24758"
target="_blank">website</a>.<o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>After
downloading SQL2000SampleDb.msi, extract the sample database files by
double-clicking SQL2000SampleDb.msi. SQL2000SampleDb.msi extracts the database
scripts and this <span class=SpellE>readme</span> file into this folder by
default:<o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>C:\SQL Server 2000
Sample Databases<o:p></o:p></span></p>
<h1><a name="_installing_the_sample_databases_238p"></a><span style='font-size:
16.0pt;font-family:Verdana;color:black'>Installing the Sample Databases<o:p></o:p></span></h1>
<p><b><span style='font-size:8.5pt;font-family:Verdana;color:black'>To install
the sample databases</span></b><span style='font-size:8.5pt;font-family:Verdana;
color:black'> <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l4 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>1.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Either run a script to build a sample database, or attach the
pre-built database files for that database.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l4 level1 lfo4;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>2.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>To grant another person access to the sample database, you must
grant permissions on the database objects to that person.<o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>SQL Server
2000 customers can perform these tasks using either the <span class=SpellE><b>osql</b></span>
utility or the two graphical utilities SQL Query Analyzer and SQL Enterprise
Manager. MSDE 2000 includes only the <span class=SpellE><b>osql</b></span>
command prompt utility.<o:p></o:p></span></p>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<p class=MsoNormal><b><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Caution</span></b><span style='font-size:8.5pt;font-family:Verdana;
color:black'> <span class=SpellE>Instpubs.sql</span> drops any
existing version of the pubs sample database and <span class=SpellE>Instnwnd.sql</span>
drops any existing copy of the <span class=SpellE>Northwind</span> sample
database before creating the new copies of the database.<o:p></o:p></span></p>
</blockquote>
<h5><span style='font-size:10.0pt;font-family:Verdana;color:black'>Attaching
the Pre-built Files by Using Enterprise Manager<o:p></o:p></span></h5>
<p><b><span style='font-size:8.5pt;font-family:Verdana;color:black'>To attach
the pre-built files by using SQL Query Analyzer:</span></b><span
style='font-size:8.5pt;font-family:Verdana;color:black'> <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l2 level1 lfo5;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>1.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>From the <b>Start</b> menu, point to <b>All Programs</b>, point to
<b>Microsoft SQL Server</b>, and then click the <b>Enterprise Manager</b>
icon.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l2 level1 lfo5;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>2.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Right-click <b>Databases</b> and select <b>All Tasks/Attach
Database</b>.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l2 level1 lfo5;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>3.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Either enter
C:\SQL Server 2000 Sample Databases\<span class=SpellE>northwind.mdf</span>
or <br>
C:\SQL Server 2000 Sample Databases\<span class=SpellE>pubs.mdf</span>
as the <b>MDF file of database to attach</b>, or click <b>Browse</b> (<b>
</b>)
to search for the file to attach.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l2 level1 lfo5;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>4.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Click <b>Verify</b> to ensure the selected MDF file is correct.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l2 level1 lfo5;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>5.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Specify <span class=SpellE><b>Northwind</b></span> or <b>pubs</b>
in <b>Attach as</b>.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l2 level1 lfo5;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>6.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Specify the database owner.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l2 level1 lfo5;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>7.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Click <b>OK</b>.<o:p></o:p></span></p>
<h5><span style='font-size:10.0pt;font-family:Verdana;color:black'>Attaching
the Pre-built Files by <span class=GramE>Using</span> <span class=SpellE>osql</span><o:p></o:p></span></h5>
<p><b><span style='font-size:8.5pt;font-family:Verdana;color:black'>To attach
the pre-built files by using <span class=SpellE>osql</span>:</span></b><span
style='font-size:8.5pt;font-family:Verdana;color:black'> <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l0 level1 lfo6;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>1.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Open a command prompt window.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l0 level1 lfo6;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>2.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>From the command prompt, use the <span class=SpellE>cd</span>
command to navigate to the folder containing the SQL Server 2000 Sample
Database Scripts: <o:p></o:p></span></p>
<pre style='margin-left:.35in'><span class=SpellE><span class=GramE><span
style='color:black'>cd</span></span></span><span style='color:black'> c:\SQL Server 2000 Sample Databases<o:p></o:p></span></pre>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l0 level1 lfo6;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>3.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Run <span class=SpellE>osql</span> using the -Q switch to execute <span
class=SpellE>sp_attach_db</span> to attach either the pubs or <span
class=SpellE>Northwind</span> pre-built database files. Here are some examples:<o:p></o:p></span></p>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<p class=MsoNormal><b><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Note</span></b><span style='font-size:8.5pt;font-family:Verdana;
color:black'> Enter the <span class=SpellE>osql</span>
commands on one line in the command prompt window. These examples split the
commands across two or three lines to make the examples easier to read.<o:p></o:p></span></p>
</blockquote>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l9 level1 lfo7;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>To attach the <span class=SpellE><b>Northwind</b></span> database
to a default instance on the same computer: <o:p></o:p></span></p>
<pre style='margin-left:.25in;text-indent:-.25in;mso-list:l9 level1 lfo7'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:black'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span
class=SpellE><span style='color:black'>osql</span></span><span
style='color:black'> -E -Q "EXEC <span class=SpellE>sp_attach_db</span> <span
class=SpellE>N'Northwind</span>',<o:p></o:p></span></pre><pre style='margin-left:
.25in'><span style='color:black'> <span class=SpellE>N'c</span>:\SQL Server 2000 Sample Databases\<span
class=SpellE>northwind.mdf</span>'"<o:p></o:p></span></pre>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l9 level1 lfo7;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>To attach the <b>pubs</b> database to a default instance on a
different computer: <o:p></o:p></span></p>
<pre style='margin-left:.25in;text-indent:-.25in;mso-list:l9 level1 lfo7'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:black'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span
class=SpellE><span style='color:black'>osql</span></span><span
style='color:black'> -E -<st1:place w:st="on">S <span class=SpellE><i>ComputerName</i></span></st1:place> -Q "EXEC <span
class=SpellE>sp_attach_db</span> <span class=SpellE>N'pubs</span>',<o:p></o:p></span></pre><pre
style='margin-left:.25in'><span style='color:black'> <span class=SpellE>N'c</span>:\SQL Server 2000 Sample Databases\<span
class=SpellE>pubs.mdf</span>'"<o:p></o:p></span></pre>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.25in;text-indent:-.25in;mso-list:l9 level1 lfo7;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>To attach the <span class=SpellE><b>Northwind</b></span> database
to a named instance: <o:p></o:p></span></p>
<pre style='margin-left:.25in;text-indent:-.25in;mso-list:l9 level1 lfo7'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:black'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span
class=SpellE><span style='color:black'>osql</span></span><span
style='color:black'> -E -S <span class=SpellE><i>ComputerName</i>/<i>InstanceName</i></span><o:p></o:p></span></pre><pre
style='margin-left:.25in;text-indent:-.25in;mso-list:l9 level1 lfo7'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:black'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span
style='color:black'><span style='mso-spacerun:yes'> </span>-Q "EXEC <span
class=SpellE>sp_attach_db</span> <span class=SpellE>N'Northwind</span>',<o:p></o:p></span></pre><pre
style='margin-left:.25in'><span style='color:black'> <span class=SpellE>N'c</span>:\SQL Server 2000 Sample Databases\<span
class=SpellE>northwind.mdf</span>'"<o:p></o:p></span></pre>
<h5><span style='font-size:10.0pt;font-family:Verdana;color:black'>Running the
Scripts Using SQL Query Analyzer<o:p></o:p></span></h5>
<p><b><span style='font-size:8.5pt;font-family:Verdana;color:black'>To run the
scripts using SQL Query Analyzer:</span></b><span style='font-size:8.5pt;
font-family:Verdana;color:black'> <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l7 level1 lfo8;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>1.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>From the Start menu, point to <b>All Programs</b>, point to <b>Microsoft
SQL Server</b>, and then click the <b>Query Analyzer</b> icon.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l7 level1 lfo8;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>2.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Connect to the instance of SQL Server 2000 on which you want to
create the sample database.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l7 level1 lfo8;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>3.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>On the <b>File</b> menu, click <b>Open</b>, and navigate to the
c:\SQL Server 2000 Sample Databases folder. Select either <span class=SpellE>Instpubs.sql</span>
or <span class=SpellE>Instnwnd.sql</span>.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l7 level1 lfo8;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>4.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>On the toolbar, click <b>Execute Query</b>.<o:p></o:p></span></p>
<h5><span style='font-size:10.0pt;font-family:Verdana;color:black'>Running the
Scripts <span class=GramE>Using</span> <span class=SpellE>osql</span><o:p></o:p></span></h5>
<p><b><span style='font-size:8.5pt;font-family:Verdana;color:black'>To run the
scripts using <span class=SpellE>osql</span>:</span></b><span style='font-size:
8.5pt;font-family:Verdana;color:black'> <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l6 level1 lfo9;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>1.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Open a command prompt window.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l6 level1 lfo9;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>2.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>From the command prompt, use the <span class=SpellE>cd</span>
command to navigate to the folder containing the SQL Server 2000 Sample
Database Scripts:<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l6 level1 lfo9;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>3.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span class=SpellE><span style='font-size:8.5pt;
font-family:Verdana;color:black'>cd</span></span><span style='font-size:8.5pt;
font-family:Verdana;color:black'> c:\SQL Server 2000 Sample Databases<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l6 level1 lfo9;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>4.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Run <span class=SpellE>osql</span> specifying either <span
class=SpellE>Instpubs.sql</span> or <span class=SpellE>Instnwnd.sql</span> as
the input file. Here are some examples: <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.6in;text-indent:-.25in;mso-list:l6 level2 lfo9;tab-stops:list 1.0in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>To install the <span class=SpellE><b>Northwind</b></span> database
on a default instance on the same computer: <o:p></o:p></span></p>
<pre style='margin-left:.6in'><span class=SpellE><span class=GramE><span
style='color:black'>osql</span></span></span><span style='color:black'> -E -<span
class=SpellE>i</span> <span class=SpellE>instnwnd.sql</span><o:p></o:p></span></pre>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.6in;text-indent:-.25in;mso-list:l6 level2 lfo9;tab-stops:list 1.0in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>To install the <b>pubs</b> database on a default instance on a
different computer: <o:p></o:p></span></p>
<pre style='margin-left:.6in'><span class=SpellE><span class=GramE><span
style='color:black'>osql</span></span></span><span style='color:black'> -E -<st1:place
w:st="on">S <span class=SpellE><i>ComputerName</i></span></st1:place> -<span
class=SpellE>i</span> <span class=SpellE>instpubs.sql</span><o:p></o:p></span></pre>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.6in;text-indent:-.25in;mso-list:l6 level2 lfo9;tab-stops:list 1.0in'><![if !supportLists]><span
style='font-size:10.0pt;mso-bidi-font-size:8.5pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol;color:black'><span style='mso-list:Ignore'>·<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>To install the <span class=SpellE><b>Northwind</b></span> database
on a named instance: <o:p></o:p></span></p>
<pre style='margin-left:.6in'><span class=SpellE><span class=GramE><span
style='color:black'>osql</span></span></span><span style='color:black'> -E -S <span
class=SpellE><i>ComputerName</i>/<i>InstanceName</i></span> -<span
class=SpellE>i</span> <span class=SpellE>instnwnd.sql</span><o:p></o:p></span></pre>
<h5><span style='font-size:10.0pt;font-family:Verdana;color:black'>Assigning
Permissions<o:p></o:p></span></h5>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>The logon you
use when creating or attaching a database becomes the owner of the sample
database, and of all the objects within the database. That login and any login
in the <span class=SpellE><b>sysadmin</b></span> fixed server role will have
permission to access the data and objects in the sample database. All other
logins must be granted permissions before they can access the sample data and
objects.<o:p></o:p></span></p>
<h6><span style='font-size:9.5pt;font-family:Verdana;color:black'>Granting a
Login Access to a Database<o:p></o:p></span></h6>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>You can grant
access to the sample databases using Enterprise Manager or the <span
class=SpellE><b>sp_grantdbaccess</b></span> system stored procedure. Only a
database user that is a member of at least one of the following roles can grant
access to a database: the <span class=SpellE><b>sysadmin</b></span> fixed
server role, the <span class=SpellE><b>db_accessadmin</b></span> fixed database
role, or the <span class=SpellE><b>db_owner</b></span> fixed database role.<o:p></o:p></span></p>
<p><b><span style='font-size:8.5pt;font-family:Verdana;color:black'>To grant
access using Enterprise Manager:</span></b><span style='font-size:8.5pt;
font-family:Verdana;color:black'> <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l8 level1 lfo10;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>1.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Expand the server group and then expand the server.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l8 level1 lfo10;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>2.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Expand <b>Databases</b> and select the sample database.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l8 level1 lfo10;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>3.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Right-click <span class=GramE><b>Users</b>,</span> and then click <b>New
Database User</b>.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l8 level1 lfo10;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>4.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Complete the <b>Database User Properties</b> form.<o:p></o:p></span></p>
<p><b><span style='font-size:8.5pt;font-family:Verdana;color:black'>To grant
access using <span class=SpellE>sp_grantdbaccess</span></span></b><span
style='font-size:8.5pt;font-family:Verdana;color:black'><o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>Having
connected to the server with either <span class=SpellE><b>osql</b></span> or
SQL Query Analyzer, you can use <span class=SpellE><b>sp_grantdbaccess</b></span>
to enable a domain user to access the database. For example, the following
commands grant access to <b>pubs</b> to a domain user named <span class=SpellE>Hamid</span>:<o:p></o:p></span></p>
<pre><span style='color:black'>USE pubs;<o:p></o:p></span></pre><pre><span
style='color:black'>GO<o:p></o:p></span></pre><pre><span class=SpellE><span
style='color:black'>sp_grantdbaccess</span></span><span style='color:black'> 'CORPORATE\<span
class=SpellE>hamid</span>', '<span class=SpellE>hamid</span>';<o:p></o:p></span></pre><pre><span
style='color:black'>GO<o:p></o:p></span></pre>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>For more
information about granting logins access to a database, see the following
topics in SQL Server Books Online:<o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'><a
href="http://go.microsoft.com/fwlink/?LinkId=24755" target="_blank">Granting a
Windows User or Group Access to a Database</a><o:p></o:p></span></p>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'><a
href="http://go.microsoft.com/fwlink/?LinkId=24756" target="_blank">Granting a
SQL Server Login Access to a Database</a><o:p></o:p></span></p>
<h6><span style='font-size:9.5pt;font-family:Verdana;color:black'>Granting User
Accounts Permissions<o:p></o:p></span></h6>
<p><span style='font-size:8.5pt;font-family:Verdana;color:black'>Once a login
has been associated with a user account in the sample database, you must grant
that user account permissions to access database objects. Only a database user
that is a member of at least one of the following roles can grant access to
database objects: the <span class=SpellE><b>sysadmin</b></span> fixed server
role, the <span class=SpellE><b>db_accessadmin</b></span> fixed database role,
or the <span class=SpellE><b>db_owner</b></span> fixed database role.<o:p></o:p></span></p>
<p><b><span style='font-size:8.5pt;font-family:Verdana;color:black'>To grant
account permissions using Enterprise Manager</span></b><span style='font-size:
8.5pt;font-family:Verdana;color:black'> <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l3 level1 lfo11;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>1.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Expand the server group and then expand the server.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l3 level1 lfo11;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>2.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;
color:black'>Expand <b>Databases</b> and select the sample database.<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:8.4pt;
margin-left:.35in;text-indent:-.25in;mso-list:l3 level1 lfo11;tab-stops:list .5in'><![if !supportLists]><span
style='font-size:8.5pt;font-family:Verdana;mso-fareast-font-family:Verdana;
mso-bidi-font-family:Verdana;color:black'><span style='mso-list:Ignore'>3.<span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:8.5pt;font-family:Verdana;