|
 |
aspx thread: AdvWorks Database in ASP+ Preview
Message #1 by "Mark Phillips" <margia5@h...> on Tue, 8 May 2001 18:07:03
|
|
Hi,
I have received from wrox the AdvWorks database used in the ASP+ Preview
Book. The database is in the form of a .dat file named db.dat. A
accompanying readme file says to delete any existing copies of AdvWorks
and just "restore" this database. No other copy of AdvWorks is on my
computer. By opening the file in notepad, I see the words SQL 7 format. I
am using SQL 2000. I do not know how to restore this file. I do not know
how to access the .dat file through the restore or import wizards.
Any suggesstions?
Thanks,
Mark
Message #2 by "Peter Ehli" <peteehli@a...> on Fri, 2 Mar 2001 10:48:33 -0800
|
|
I did this a couple of class terms ago and don't remember how to do it, but
the procedure is pretty simple. Once you load the .dat file the database
will be there in SQL Server 2000. Since the .dat file is for SQL Server 7
you can add it to 2000 but not the other way around. The book should give
you exact directions on how to load the sample database - if it doesn't I
would be greatly surprised. Also the help files should tell you how to
import ( or Restore) this database in 2000. Restore is how you add the
database - you don't need a previous copy in your database - again, help
files and RESTORE - Also opening a .dat file can easily corrupt it -
download it again. Hope this helps
- Pete Ehli -
----- Original Message -----
From: "Mark Phillips" <margia5@h...>
To: "ASP+" <aspx@p...>
Sent: Tuesday, May 08, 2001 6:07 PM
Subject: [aspx] AdvWorks Database in ASP+ Preview
> Hi,
>
> I have received from wrox the AdvWorks database used in the ASP+ Preview
> Book. The database is in the form of a .dat file named db.dat. A
> accompanying readme file says to delete any existing copies of AdvWorks
> and just "restore" this database. No other copy of AdvWorks is on my
> computer. By opening the file in notepad, I see the words SQL 7 format. I
> am using SQL 2000. I do not know how to restore this file. I do not know
> how to access the .dat file through the restore or import wizards.
>
> Any suggesstions?
>
> Thanks,
> Mark
>
Message #3 by "Bosco" <jbsf@u...> on Tue, 8 May 2001 14:58:39 -0300
|
|
Hi Mark,
An MS SQL Server database has 2 files: *.mdf and *.ldf.
The *.dat file that you are talking about, is, probably, a data file.
You can import a data file through DTS.
Look at your SQL Server Books Online, under "Copying Data From a Data File
to SQL Server" topic.
Cheers,
Bosco
Message #4 by Scott Watermasysk <swatermasysk@C...> on Tue, 8 May 2001 14:05:07 -0400
|
|
No there was not any documentation.
Just:
Installing the database
=======================
delete any existing advworks database with SQL server, then restore the
database in dbback/db.dat
Any info would be appreciated.
-Scott
-----Original Message-----
From: Peter Ehli [mailto:peteehli@a...]
Sent: Friday, March 02, 2001 1:49 PM
To: ASP+
Subject: [aspx] Re: AdvWorks Database in ASP+ Preview
I did this a couple of class terms ago and don't remember how to do it, but
the procedure is pretty simple. Once you load the .dat file the database
will be there in SQL Server 2000. Since the .dat file is for SQL Server 7
you can add it to 2000 but not the other way around. The book should give
you exact directions on how to load the sample database - if it doesn't I
would be greatly surprised. Also the help files should tell you how to
import ( or Restore) this database in 2000. Restore is how you add the
database - you don't need a previous copy in your database - again, help
files and RESTORE - Also opening a .dat file can easily corrupt it -
download it again. Hope this helps
- Pete Ehli -
----- Original Message -----
From: "Mark Phillips" <margia5@h...>
To: "ASP+" <aspx@p...>
Sent: Tuesday, May 08, 2001 6:07 PM
Subject: [aspx] AdvWorks Database in ASP+ Preview
> Hi,
>
> I have received from wrox the AdvWorks database used in the ASP+ Preview
> Book. The database is in the form of a .dat file named db.dat. A
> accompanying readme file says to delete any existing copies of AdvWorks
> and just "restore" this database. No other copy of AdvWorks is on my
> computer. By opening the file in notepad, I see the words SQL 7 format. I
> am using SQL 2000. I do not know how to restore this file. I do not know
> how to access the .dat file through the restore or import wizards.
>
> Any suggesstions?
>
> Thanks,
> Mark
>
Message #5 by "Mark Phillips" <margia5@h...> on Wed, 9 May 2001 01:03:49
|
|
A person at Wrox was very helpful. Here are the instruction he sent me.
It worked almost to the letter.
Extract the zip file that I sent you - make a note of the path to the
db.dat
file, which should have extracted into a dbback directory. My path was
C:\Documents and
Settings\philp\Desktop\4753Samples\advworks\advworks\dbback, but for the
sake of clarity, I'll just call it:
C:\PATH\dbback
Step 1: I opened up a SQL Enterprise Manager MMC console, and I created a
new database and called it AdvWorks, accepting all the default values.
Step 2: While my newly-created AdvWorks database was still highlighted in
my
tree, in the Tools menu, I selected Restore Database. This brought up a
dialog box.
The first item is the Restore as Database box - if you had AdvWorks
selected, AdvWorks should be the default - if it's not already selected,
then select it now. (Here my system was different than the instructions.
I changed the value of "AdvWorks" to "advworks". I did this because my
system saw it as a duplicate database and aborted when the restore process
began, so it failed.)
Step 3: In the same dialog box, there's a set of option boxes for
restoring.
The default is Database, but you need to select From device.
Step 4: The box changes slightly so that there's a box for enternig devices
to restore from. Hit the button marked Select Devices... and in the new
dialog that appears, hit the Add button. There's yet another dialog box
here, and where it says File name, hit the ... button and browse to the
correct directory (C:\PATH\dbback) and select db.dat then hit OK.
Step 5: Hit OK when you return to the Restore Destination box and the
device
should now have appeared in the box.
Step 6: Hit OK and away it goes with an error message :) (at least it did
on
my system). I think that might be because the original database was a SQL 7
database, but I don't have access to a SQL 7 machine right now to test
this.
If you're using SQL Server 2000, in the Option Tab of the restore dialog
box, you need to change the paths in the box to
something like:
C:\Program Files\Microsoft SQL Server\MSSQL$SQL\Data\AdvWorks_Data.MDF for
the Data, and
C:\Program Files\Microsoft SQL Server\MSSQL$SQL\Data\AdvWorks_Log.LDF for
the Log.
This managed to fix it on my machine and it restored successfully.
Test it out by right-clicking on the Products table and click on Open Table
| Return all Rows and you should see quite a bit of data.
> Hi,
>
> I have received from wrox the AdvWorks database used in the ASP+ Preview
> Book. The database is in the form of a .dat file named db.dat. A
> accompanying readme file says to delete any existing copies of AdvWorks
> and just "restore" this database. No other copy of AdvWorks is on my
> computer. By opening the file in notepad, I see the words SQL 7 format.
I
> am using SQL 2000. I do not know how to restore this file. I do not
know
> how to access the .dat file through the restore or import wizards.
>
> Any suggesstions?
>
> Thanks,
Message #6 by Ron0079@a... on Wed, 9 May 2001 07:23:12 EDT
|
|
Thanks for sharing that info. The .dat file had me stumped too and was glad
to see someone raise the question.
Ron
<< A person at Wrox was very helpful. Here are the instruction he sent me.
It worked almost to the letter.
Extract the zip file that I sent you - make a note of the path to the
db.dat
file, which should have extracted into a dbback directory. My path was
C:\Documents and
Settings\philp\Desktop\4753Samples\advworks\advworks\dbback, but for the
sake of clarity, I'll just call it:
C:\PATH\dbback
Step 1: I opened up a SQL Enterprise Manager MMC console, and I created a
new database and called it AdvWorks, accepting all the default values.
Step 2: While my newly-created AdvWorks database was still highlighted in
my
tree, in the Tools menu, I selected Restore Database. This brought up a
dialog box.
The first item is the Restore as Database box - if you had AdvWorks
selected, AdvWorks should be the default - if it's not already selected,
then select it now. (Here my system was different than the instructions.
I changed the value of "AdvWorks" to "advworks". I did this because my
system saw it as a duplicate database and aborted when the restore process
began, so it failed.)
Step 3: In the same dialog box, there's a set of option boxes for
restoring.
The default is Database, but you need to select From device.
Step 4: The box changes slightly so that there's a box for enternig devices
to restore from. Hit the button marked Select Devices... and in the new
dialog that appears, hit the Add button. There's yet another dialog box
here, and where it says File name, hit the ... button and browse to the
correct directory (C:\PATH\dbback) and select db.dat then hit OK.
Step 5: Hit OK when you return to the Restore Destination box and the
device
should now have appeared in the box.
Step 6: Hit OK and away it goes with an error message :) (at least it did
on
my system). I think that might be because the original database was a SQL 7
database, but I don't have access to a SQL 7 machine right now to test
this.
If you're using SQL Server 2000, in the Option Tab of the restore dialog
box, you need to change the paths in the box to
something like:
C:\Program Files\Microsoft SQL Server\MSSQL$SQL\Data\AdvWorks_Data.MDF for
the Data, and
C:\Program Files\Microsoft SQL Server\MSSQL$SQL\Data\AdvWorks_Log.LDF for
the Log.
This managed to fix it on my machine and it restored successfully.
Test it out by right-clicking on the Products table and click on Open Table
| Return all Rows and you should see quite a bit of data.
>>
Message #7 by "Richard Anderson" <rja@a...> on Tue, 22 May 2001 21:05:36 +0100
|
|
Sorry for the confusion with the database. Due to time constraints we never
had time to include full docs in the book :(
----- Original Message -----
From: <Ron0079@a...>
To: "ASP+" <aspx@p...>
Sent: Wednesday, May 09, 2001 12:23 PM
Subject: [aspx] Re: AdvWorks Database in ASP+ Preview
> Thanks for sharing that info. The .dat file had me stumped too and was
glad
> to see someone raise the question.
>
> Ron
>
> << A person at Wrox was very helpful. Here are the instruction he sent
me.
> It worked almost to the letter.
>
> Extract the zip file that I sent you - make a note of the path to the
> db.dat
> file, which should have extracted into a dbback directory. My path was
> C:\Documents and
> Settings\philp\Desktop\4753Samples\advworks\advworks\dbback, but for the
> sake of clarity, I'll just call it:
> C:\PATH\dbback
>
> Step 1: I opened up a SQL Enterprise Manager MMC console, and I created a
> new database and called it AdvWorks, accepting all the default values.
>
> Step 2: While my newly-created AdvWorks database was still highlighted in
> my
> tree, in the Tools menu, I selected Restore Database. This brought up a
> dialog box.
>
> The first item is the Restore as Database box - if you had AdvWorks
> selected, AdvWorks should be the default - if it's not already selected,
> then select it now. (Here my system was different than the instructions.
> I changed the value of "AdvWorks" to "advworks". I did this because my
> system saw it as a duplicate database and aborted when the restore
process
> began, so it failed.)
>
> Step 3: In the same dialog box, there's a set of option boxes for
> restoring.
> The default is Database, but you need to select From device.
>
> Step 4: The box changes slightly so that there's a box for enternig
devices
> to restore from. Hit the button marked Select Devices... and in the new
> dialog that appears, hit the Add button. There's yet another dialog box
> here, and where it says File name, hit the ... button and browse to the
> correct directory (C:\PATH\dbback) and select db.dat then hit OK.
>
> Step 5: Hit OK when you return to the Restore Destination box and the
> device
> should now have appeared in the box.
>
> Step 6: Hit OK and away it goes with an error message :) (at least it did
> on
> my system). I think that might be because the original database was a SQL
7
> database, but I don't have access to a SQL 7 machine right now to test
> this.
> If you're using SQL Server 2000, in the Option Tab of the restore dialog
> box, you need to change the paths in the box to
> something like:
>
> C:\Program Files\Microsoft SQL Server\MSSQL$SQL\Data\AdvWorks_Data.MDF
for
> the Data, and
>
> C:\Program Files\Microsoft SQL Server\MSSQL$SQL\Data\AdvWorks_Log.LDF for
> the Log.
>
> This managed to fix it on my machine and it restored successfully.
>
> Test it out by right-clicking on the Products table and click on Open
Table
> | Return all Rows and you should see quite a bit of data.
> >>
>
|
|
 |