Home All Groups Group Topic Archive Search About

opening SQL server 2000 MDF + LDF file from DVD

Author
14 Jul 2006 6:16 AM
chentiangemalc
Hi,

I'm in the process of writing an application to open a database as read only
to view historical log data on a DVD. The databases were created with SQL
Server 2000. I am able to open them with SQL Server 2005 Express Edition, but
have to copy them onto my harddrive first.

I've had a look with google but didn't find any clear info.

What can I do so that I can open them read only from the DVD drive?

I haven't done programming for over year so a bit out of touch. I think
maybe I will need SQL 2000 MSDE?

The database won't include all the LDF files, so the database will be
incomplete, just want to view what is on the DVD.

Thanks if you have any advice...

Author
14 Jul 2006 6:29 AM
Uri Dimant
Hi
Copy the files on hard disk and then RESTORE the database

You don't want to store the file on DVD ,do you?


Show quote
"chentiangemalc" <chentiangem***@discussions.microsoft.com> wrote in message
news:0BBE11B8-42B0-4DB6-ABFF-255FA8BAC102@microsoft.com...
> Hi,
>
> I'm in the process of writing an application to open a database as read
> only
> to view historical log data on a DVD. The databases were created with SQL
> Server 2000. I am able to open them with SQL Server 2005 Express Edition,
> but
> have to copy them onto my harddrive first.
>
> I've had a look with google but didn't find any clear info.
>
> What can I do so that I can open them read only from the DVD drive?
>
> I haven't done programming for over year so a bit out of touch. I think
> maybe I will need SQL 2000 MSDE?
>
> The database won't include all the LDF files, so the database will be
> incomplete, just want to view what is on the DVD.
>
> Thanks if you have any advice...
>
>
>
Author
14 Jul 2006 6:39 AM
chentiangemalc
Ideally I don't want to copy the files to the harddisk, I want them to stay
on DVD if possible.

I'm not sure if it's possible?

The database is historical data collected in an industrial process control.
The client has no way to view this on any machine except the machine that
created the database. I just want to make a quick utility for displaying the
data on othe DVD.

If I have to I will copy the DVD temporarily onto the harddisk, but it's 
2-4 GB file so wouldn't be very fast...



Show quote
"Uri Dimant" wrote:

> Hi
> Copy the files on hard disk and then RESTORE the database
>
> You don't want to store the file on DVD ,do you?
>
>
> "chentiangemalc" <chentiangem***@discussions.microsoft.com> wrote in message
> news:0BBE11B8-42B0-4DB6-ABFF-255FA8BAC102@microsoft.com...
> > Hi,
> >
> > I'm in the process of writing an application to open a database as read
> > only
> > to view historical log data on a DVD. The databases were created with SQL
> > Server 2000. I am able to open them with SQL Server 2005 Express Edition,
> > but
> > have to copy them onto my harddrive first.
> >
> > I've had a look with google but didn't find any clear info.
> >
> > What can I do so that I can open them read only from the DVD drive?
> >
> > I haven't done programming for over year so a bit out of touch. I think
> > maybe I will need SQL 2000 MSDE?
> >
> > The database won't include all the LDF files, so the database will be
> > incomplete, just want to view what is on the DVD.
> >
> > Thanks if you have any advice...
> >
> >
> >
>
>
>
Author
14 Jul 2006 6:32 AM
Helmut Woess
Am Thu, 13 Jul 2006 23:16:01 -0700 schrieb chentiangemalc:

> I'm in the process of writing an application to open a database as read only
> to view historical log data on a DVD. The databases were created with SQL
> Server 2000. I am able to open them with SQL Server 2005 Express Edition, but
> have to copy them onto my harddrive first.

It is possible with some limitations:
http://www.sqlteam.com/item.asp?ItemID=127

bye, Helmut
Author
14 Jul 2006 6:34 AM
Arnie Rowland
You could use sp_attach_db. Check in Books on Line for a refresher,
parameters, etc.

You will need both the data file (mdf) and a single log file (ldf) to
successfully attach the read-only db. The log file can be the smallest
possible since it can't be written to.

--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."



Show quote
"chentiangemalc" <chentiangem***@discussions.microsoft.com> wrote in message
news:0BBE11B8-42B0-4DB6-ABFF-255FA8BAC102@microsoft.com...
> Hi,
>
> I'm in the process of writing an application to open a database as read
> only
> to view historical log data on a DVD. The databases were created with SQL
> Server 2000. I am able to open them with SQL Server 2005 Express Edition,
> but
> have to copy them onto my harddrive first.
>
> I've had a look with google but didn't find any clear info.
>
> What can I do so that I can open them read only from the DVD drive?
>
> I haven't done programming for over year so a bit out of touch. I think
> maybe I will need SQL 2000 MSDE?
>
> The database won't include all the LDF files, so the database will be
> incomplete, just want to view what is on the DVD.
>
> Thanks if you have any advice...
>
>
>
Author
14 Jul 2006 6:42 AM
chentiangemalc
Thanks, that sounds like it should work.

Just looking in my original post I realise I should have said MDF+NDF.

I have the MDF, NDF and LDF file on the DVD.


Show quote
"Arnie Rowland" wrote:

> You could use sp_attach_db. Check in Books on Line for a refresher,
> parameters, etc.
>
> You will need both the data file (mdf) and a single log file (ldf) to
> successfully attach the read-only db. The log file can be the smallest
> possible since it can't be written to.
>
> --
> Arnie Rowland*
> "To be successful, your heart must accompany your knowledge."
>
>
>
> "chentiangemalc" <chentiangem***@discussions.microsoft.com> wrote in message
> news:0BBE11B8-42B0-4DB6-ABFF-255FA8BAC102@microsoft.com...
> > Hi,
> >
> > I'm in the process of writing an application to open a database as read
> > only
> > to view historical log data on a DVD. The databases were created with SQL
> > Server 2000. I am able to open them with SQL Server 2005 Express Edition,
> > but
> > have to copy them onto my harddrive first.
> >
> > I've had a look with google but didn't find any clear info.
> >
> > What can I do so that I can open them read only from the DVD drive?
> >
> > I haven't done programming for over year so a bit out of touch. I think
> > maybe I will need SQL 2000 MSDE?
> >
> > The database won't include all the LDF files, so the database will be
> > incomplete, just want to view what is on the DVD.
> >
> > Thanks if you have any advice...
> >
> >
> >
>
>
>
Author
14 Jul 2006 7:01 AM
Uri Dimant
Hi
Well, one thing  consider , sql server may encounter a probelm whit attach
DATABASE because the files weren't  detach first  as it describes in the
BOL.



Show quote
"chentiangemalc" <chentiangem***@discussions.microsoft.com> wrote in message
news:EF8DB6CD-7CD4-4D20-9394-B9AAAA91290F@microsoft.com...
> Thanks, that sounds like it should work.
>
> Just looking in my original post I realise I should have said MDF+NDF.
>
> I have the MDF, NDF and LDF file on the DVD.
>
>
> "Arnie Rowland" wrote:
>
>> You could use sp_attach_db. Check in Books on Line for a refresher,
>> parameters, etc.
>>
>> You will need both the data file (mdf) and a single log file (ldf) to
>> successfully attach the read-only db. The log file can be the smallest
>> possible since it can't be written to.
>>
>> --
>> Arnie Rowland*
>> "To be successful, your heart must accompany your knowledge."
>>
>>
>>
>> "chentiangemalc" <chentiangem***@discussions.microsoft.com> wrote in
>> message
>> news:0BBE11B8-42B0-4DB6-ABFF-255FA8BAC102@microsoft.com...
>> > Hi,
>> >
>> > I'm in the process of writing an application to open a database as read
>> > only
>> > to view historical log data on a DVD. The databases were created with
>> > SQL
>> > Server 2000. I am able to open them with SQL Server 2005 Express
>> > Edition,
>> > but
>> > have to copy them onto my harddrive first.
>> >
>> > I've had a look with google but didn't find any clear info.
>> >
>> > What can I do so that I can open them read only from the DVD drive?
>> >
>> > I haven't done programming for over year so a bit out of touch. I think
>> > maybe I will need SQL 2000 MSDE?
>> >
>> > The database won't include all the LDF files, so the database will be
>> > incomplete, just want to view what is on the DVD.
>> >
>> > Thanks if you have any advice...
>> >
>> >
>> >
>>
>>
>>
Author
14 Jul 2006 7:14 AM
Arnie Rowland
It will be necessary to move the db files to a drive with the same path as a
'typical' dvd, attach them, adjust file sizes (shrinkdatabase and
shrinkfile), and then detach them BEFORE burning to disk.

This will not work unless the file location is properly recorded within the
datafile itself. It the disk is burned with the file thinking that it is
located on D:, it will not open of E:. Copying to the hard disk is the more
robust option.

See: http://www.sqlteam.com/item.asp?ItemID=127

--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."



Show quote
"Uri Dimant" <u***@iscar.co.il> wrote in message
news:uAhkkMxpGHA.2452@TK2MSFTNGP03.phx.gbl...
> Hi
> Well, one thing  consider , sql server may encounter a probelm whit attach
> DATABASE because the files weren't  detach first  as it describes in the
> BOL.
>
>
>
> "chentiangemalc" <chentiangem***@discussions.microsoft.com> wrote in
> message news:EF8DB6CD-7CD4-4D20-9394-B9AAAA91290F@microsoft.com...
>> Thanks, that sounds like it should work.
>>
>> Just looking in my original post I realise I should have said MDF+NDF.
>>
>> I have the MDF, NDF and LDF file on the DVD.
>>
>>
>> "Arnie Rowland" wrote:
>>
>>> You could use sp_attach_db. Check in Books on Line for a refresher,
>>> parameters, etc.
>>>
>>> You will need both the data file (mdf) and a single log file (ldf) to
>>> successfully attach the read-only db. The log file can be the smallest
>>> possible since it can't be written to.
>>>
>>> --
>>> Arnie Rowland*
>>> "To be successful, your heart must accompany your knowledge."
>>>
>>>
>>>
>>> "chentiangemalc" <chentiangem***@discussions.microsoft.com> wrote in
>>> message
>>> news:0BBE11B8-42B0-4DB6-ABFF-255FA8BAC102@microsoft.com...
>>> > Hi,
>>> >
>>> > I'm in the process of writing an application to open a database as
>>> > read
>>> > only
>>> > to view historical log data on a DVD. The databases were created with
>>> > SQL
>>> > Server 2000. I am able to open them with SQL Server 2005 Express
>>> > Edition,
>>> > but
>>> > have to copy them onto my harddrive first.
>>> >
>>> > I've had a look with google but didn't find any clear info.
>>> >
>>> > What can I do so that I can open them read only from the DVD drive?
>>> >
>>> > I haven't done programming for over year so a bit out of touch. I
>>> > think
>>> > maybe I will need SQL 2000 MSDE?
>>> >
>>> > The database won't include all the LDF files, so the database will be
>>> > incomplete, just want to view what is on the DVD.
>>> >
>>> > Thanks if you have any advice...
>>> >
>>> >
>>> >
>>>
>>>
>>>
>
>
Author
14 Jul 2006 7:13 AM
oj
If you did not set the original database to readonly before you detach it
and put it on the CD/DVD, you will not successfully attach it as readonly.
In another word, if the database is still set as read_write, on attach (via
sp_attach_db or create/for attach), the system will have to put it back into
that mode. Having it on a readonly media will cause a failure.

--
-oj



Show quote
"chentiangemalc" <chentiangem***@discussions.microsoft.com> wrote in message
news:0BBE11B8-42B0-4DB6-ABFF-255FA8BAC102@microsoft.com...
> Hi,
>
> I'm in the process of writing an application to open a database as read
> only
> to view historical log data on a DVD. The databases were created with SQL
> Server 2000. I am able to open them with SQL Server 2005 Express Edition,
> but
> have to copy them onto my harddrive first.
>
> I've had a look with google but didn't find any clear info.
>
> What can I do so that I can open them read only from the DVD drive?
>
> I haven't done programming for over year so a bit out of touch. I think
> maybe I will need SQL 2000 MSDE?
>
> The database won't include all the LDF files, so the database will be
> incomplete, just want to view what is on the DVD.
>
> Thanks if you have any advice...
>
>
>

AddThis Social Bookmark Button