all groups > sql server programming > july 2006 >
You're in the sql server programming group:
opening SQL server 2000 MDF + LDF file from DVD
sql server programming:
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...
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." [quoted text, click to view] "chentiangemalc" <chentiangemalc@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... > > >
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... [quoted text, click to view] "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" <chentiangemalc@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... > > > > > > > >
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. [quoted text, click to view] "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" <chentiangemalc@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... > > > > > > > >
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. [quoted text, click to view] "chentiangemalc" <chentiangemalc@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" <chentiangemalc@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... >> > >> > >> > >> >> >>
Hi Copy the files on hard disk and then RESTORE the database You don't want to store the file on DVD ,do you? [quoted text, click to view] "chentiangemalc" <chentiangemalc@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... > > >
Am Thu, 13 Jul 2006 23:16:01 -0700 schrieb chentiangemalc: [quoted text, click to view] > 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
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 [quoted text, click to view] "chentiangemalc" <chentiangemalc@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... > > >
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." [quoted text, click to view] "Uri Dimant" <urid@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" <chentiangemalc@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" <chentiangemalc@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... >>> > >>> > >>> > >>> >>> >>> > >
Don't see what you're looking for? Try a search.
|
|
|