Hi all:
I have MSCRM running in a VPC setup, so since I had 4 backup copies of the
VHD files, I never backed up the DBs themselves. Now for some reason all of
the images have an error in the MSCRM Metabase database, and I cannot
recover it. I tried this:
1. alter database Adventure_Works_Cycle_METABASE set emergency
2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
Which got the DB back online, but it dumped a bunch of necessary data and
broke MSCRM.
Can anyone make any suggestions as to how I can save the data? The metabase
tracks customizations to MSCRM, so if I lose it I'll lose all of my work.
Thanks in advance for any and all help.
John.
This message sent from Windows Vista Ultimate
http://mscrmguy.blogspot.com/
John
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
"John" <jstraumann@.nospam.hotmail.com> wrote in message
news:929ACB25-076E-4714-AC77-144F44FD319B@.microsoft.com...
> Hi all:
> I have MSCRM running in a VPC setup, so since I had 4 backup copies of the
> VHD files, I never backed up the DBs themselves. Now for some reason all
> of the images have an error in the MSCRM Metabase database, and I cannot
> recover it. I tried this:
> 1. alter database Adventure_Works_Cycle_METABASE set emergency
> 2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
> 3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
> 4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
> Which got the DB back online, but it dumped a bunch of necessary data and
> broke MSCRM.
> Can anyone make any suggestions as to how I can save the data? The
> metabase tracks customizations to MSCRM, so if I lose it I'll lose all of
> my work.
> Thanks in advance for any and all help.
> John.
> --
> This message sent from Windows Vista Ultimate
> http://mscrmguy.blogspot.com/
>
|||Thanks but those steps only work if the DB is backed up.
This message sent from Windows Vista Ultimate
http://mscrmguy.blogspot.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23039dpcGHHA.1188@.TK2MSFTNGP06.phx.gbl...
> John
> http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
>
> "John" <jstraumann@.nospam.hotmail.com> wrote in message
> news:929ACB25-076E-4714-AC77-144F44FD319B@.microsoft.com...
>
Showing posts with label copies. Show all posts
Showing posts with label copies. Show all posts
Friday, March 9, 2012
Recover data from corrupt DB
Hi all:
I have MSCRM running in a VPC setup, so since I had 4 backup copies of the
VHD files, I never backed up the DBs themselves. Now for some reason all of
the images have an error in the MSCRM Metabase database, and I cannot
recover it. I tried this:
1. alter database Adventure_Works_Cycle_METABASE set emergency
2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
Which got the DB back online, but it dumped a bunch of necessary data and
broke MSCRM.
Can anyone make any suggestions as to how I can save the data? The metabase
tracks customizations to MSCRM, so if I lose it I'll lose all of my work.
Thanks in advance for any and all help.
John.
--
This message sent from Windows Vista Ultimate
http://mscrmguy.blogspot.com/John
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
"John" <jstraumann@.nospam.hotmail.com> wrote in message
news:929ACB25-076E-4714-AC77-144F44FD319B@.microsoft.com...
> Hi all:
> I have MSCRM running in a VPC setup, so since I had 4 backup copies of the
> VHD files, I never backed up the DBs themselves. Now for some reason all
> of the images have an error in the MSCRM Metabase database, and I cannot
> recover it. I tried this:
> 1. alter database Adventure_Works_Cycle_METABASE set emergency
> 2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
> 3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
> 4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
> Which got the DB back online, but it dumped a bunch of necessary data and
> broke MSCRM.
> Can anyone make any suggestions as to how I can save the data? The
> metabase tracks customizations to MSCRM, so if I lose it I'll lose all of
> my work.
> Thanks in advance for any and all help.
> John.
> --
> This message sent from Windows Vista Ultimate
> http://mscrmguy.blogspot.com/
>|||Thanks but those steps only work if the DB is backed up.
--
This message sent from Windows Vista Ultimate
http://mscrmguy.blogspot.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23039dpcGHHA.1188@.TK2MSFTNGP06.phx.gbl...
> John
> http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
>
> "John" <jstraumann@.nospam.hotmail.com> wrote in message
> news:929ACB25-076E-4714-AC77-144F44FD319B@.microsoft.com...
>> Hi all:
>> I have MSCRM running in a VPC setup, so since I had 4 backup copies of
>> the VHD files, I never backed up the DBs themselves. Now for some reason
>> all of the images have an error in the MSCRM Metabase database, and I
>> cannot recover it. I tried this:
>> 1. alter database Adventure_Works_Cycle_METABASE set emergency
>> 2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
>> 3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
>> 4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
>> Which got the DB back online, but it dumped a bunch of necessary data and
>> broke MSCRM.
>> Can anyone make any suggestions as to how I can save the data? The
>> metabase tracks customizations to MSCRM, so if I lose it I'll lose all of
>> my work.
>> Thanks in advance for any and all help.
>> John.
>> --
>> This message sent from Windows Vista Ultimate
>> http://mscrmguy.blogspot.com/
>
I have MSCRM running in a VPC setup, so since I had 4 backup copies of the
VHD files, I never backed up the DBs themselves. Now for some reason all of
the images have an error in the MSCRM Metabase database, and I cannot
recover it. I tried this:
1. alter database Adventure_Works_Cycle_METABASE set emergency
2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
Which got the DB back online, but it dumped a bunch of necessary data and
broke MSCRM.
Can anyone make any suggestions as to how I can save the data? The metabase
tracks customizations to MSCRM, so if I lose it I'll lose all of my work.
Thanks in advance for any and all help.
John.
--
This message sent from Windows Vista Ultimate
http://mscrmguy.blogspot.com/John
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
"John" <jstraumann@.nospam.hotmail.com> wrote in message
news:929ACB25-076E-4714-AC77-144F44FD319B@.microsoft.com...
> Hi all:
> I have MSCRM running in a VPC setup, so since I had 4 backup copies of the
> VHD files, I never backed up the DBs themselves. Now for some reason all
> of the images have an error in the MSCRM Metabase database, and I cannot
> recover it. I tried this:
> 1. alter database Adventure_Works_Cycle_METABASE set emergency
> 2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
> 3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
> 4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
> Which got the DB back online, but it dumped a bunch of necessary data and
> broke MSCRM.
> Can anyone make any suggestions as to how I can save the data? The
> metabase tracks customizations to MSCRM, so if I lose it I'll lose all of
> my work.
> Thanks in advance for any and all help.
> John.
> --
> This message sent from Windows Vista Ultimate
> http://mscrmguy.blogspot.com/
>|||Thanks but those steps only work if the DB is backed up.
--
This message sent from Windows Vista Ultimate
http://mscrmguy.blogspot.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23039dpcGHHA.1188@.TK2MSFTNGP06.phx.gbl...
> John
> http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
>
> "John" <jstraumann@.nospam.hotmail.com> wrote in message
> news:929ACB25-076E-4714-AC77-144F44FD319B@.microsoft.com...
>> Hi all:
>> I have MSCRM running in a VPC setup, so since I had 4 backup copies of
>> the VHD files, I never backed up the DBs themselves. Now for some reason
>> all of the images have an error in the MSCRM Metabase database, and I
>> cannot recover it. I tried this:
>> 1. alter database Adventure_Works_Cycle_METABASE set emergency
>> 2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
>> 3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
>> 4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
>> Which got the DB back online, but it dumped a bunch of necessary data and
>> broke MSCRM.
>> Can anyone make any suggestions as to how I can save the data? The
>> metabase tracks customizations to MSCRM, so if I lose it I'll lose all of
>> my work.
>> Thanks in advance for any and all help.
>> John.
>> --
>> This message sent from Windows Vista Ultimate
>> http://mscrmguy.blogspot.com/
>
Recover data from corrupt DB
Hi all:
I have MSCRM running in a VPC setup, so since I had 4 backup copies of the
VHD files, I never backed up the DBs themselves. Now for some reason all of
the images have an error in the MSCRM Metabase database, and I cannot
recover it. I tried this:
1. alter database Adventure_Works_Cycle_METABASE set emergency
2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
Which got the DB back online, but it dumped a bunch of necessary data and
broke MSCRM.
Can anyone make any suggestions as to how I can save the data? The metabase
tracks customizations to MSCRM, so if I lose it I'll lose all of my work.
Thanks in advance for any and all help.
John.
This message sent from Windows Vista Ultimate
http://mscrmguy.blogspot.com/John
http://www.karaszi.com/SQLServer/in..._suspect_db.asp
"John" <jstraumann@.nospam.hotmail.com> wrote in message
news:929ACB25-076E-4714-AC77-144F44FD319B@.microsoft.com...
> Hi all:
> I have MSCRM running in a VPC setup, so since I had 4 backup copies of the
> VHD files, I never backed up the DBs themselves. Now for some reason all
> of the images have an error in the MSCRM Metabase database, and I cannot
> recover it. I tried this:
> 1. alter database Adventure_Works_Cycle_METABASE set emergency
> 2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
> 3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
> 4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
> Which got the DB back online, but it dumped a bunch of necessary data and
> broke MSCRM.
> Can anyone make any suggestions as to how I can save the data? The
> metabase tracks customizations to MSCRM, so if I lose it I'll lose all of
> my work.
> Thanks in advance for any and all help.
> John.
> --
> This message sent from Windows Vista Ultimate
> http://mscrmguy.blogspot.com/
>|||Thanks but those steps only work if the DB is backed up.
This message sent from Windows Vista Ultimate
http://mscrmguy.blogspot.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23039dpcGHHA.1188@.TK2MSFTNGP06.phx.gbl...
> John
> http://www.karaszi.com/SQLServer/in..._suspect_db.asp
>
> "John" <jstraumann@.nospam.hotmail.com> wrote in message
> news:929ACB25-076E-4714-AC77-144F44FD319B@.microsoft.com...
>
I have MSCRM running in a VPC setup, so since I had 4 backup copies of the
VHD files, I never backed up the DBs themselves. Now for some reason all of
the images have an error in the MSCRM Metabase database, and I cannot
recover it. I tried this:
1. alter database Adventure_Works_Cycle_METABASE set emergency
2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
Which got the DB back online, but it dumped a bunch of necessary data and
broke MSCRM.
Can anyone make any suggestions as to how I can save the data? The metabase
tracks customizations to MSCRM, so if I lose it I'll lose all of my work.
Thanks in advance for any and all help.
John.
This message sent from Windows Vista Ultimate
http://mscrmguy.blogspot.com/John
http://www.karaszi.com/SQLServer/in..._suspect_db.asp
"John" <jstraumann@.nospam.hotmail.com> wrote in message
news:929ACB25-076E-4714-AC77-144F44FD319B@.microsoft.com...
> Hi all:
> I have MSCRM running in a VPC setup, so since I had 4 backup copies of the
> VHD files, I never backed up the DBs themselves. Now for some reason all
> of the images have an error in the MSCRM Metabase database, and I cannot
> recover it. I tried this:
> 1. alter database Adventure_Works_Cycle_METABASE set emergency
> 2. sp_dboption Adventure_Works_Cycle_METABASE, single, true
> 3. dbcc checkdb (Adventure_Works_Cycle_METABASE, repair_allow_data_loss)
> 4. sp_dboption Adventure_Works_Cycle_METABASE, single, false
> Which got the DB back online, but it dumped a bunch of necessary data and
> broke MSCRM.
> Can anyone make any suggestions as to how I can save the data? The
> metabase tracks customizations to MSCRM, so if I lose it I'll lose all of
> my work.
> Thanks in advance for any and all help.
> John.
> --
> This message sent from Windows Vista Ultimate
> http://mscrmguy.blogspot.com/
>|||Thanks but those steps only work if the DB is backed up.
This message sent from Windows Vista Ultimate
http://mscrmguy.blogspot.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23039dpcGHHA.1188@.TK2MSFTNGP06.phx.gbl...
> John
> http://www.karaszi.com/SQLServer/in..._suspect_db.asp
>
> "John" <jstraumann@.nospam.hotmail.com> wrote in message
> news:929ACB25-076E-4714-AC77-144F44FD319B@.microsoft.com...
>
recover a database without backup
Hi,
Is there any way to recover a sql database from a file system backup (.mdf
and .ldf files copies taken every night while sql was up and running)? The
client does not have any sql backups. I know he should ...
Thanks very much.
BrianYou can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATT
ACH). It is only
guaranteed if you first detached the database, though.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
> Hi,
> Is there any way to recover a sql database from a file system backup (.mdf
> and .ldf files copies taken every night while sql was up and running)? The
> client does not have any sql backups. I know he should ...
> Thanks very much.
> --
> Brian|||unfortunately it was not detached... those files restored were just image
copied during OS backup process... thanks anyway.
--
Brian
"Tibor Karaszi" wrote:
> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR A
TTACH). It is only
> guaranteed if you first detached the database, though.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
>|||It is worth a try, it is likely it will work even though you didn't detached
first.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...[vbcol=seagreen]
> unfortunately it was not detached... those files restored were just image
> copied during OS backup process... thanks anyway.
> --
> Brian
>
> "Tibor Karaszi" wrote:
>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OxIuUgpgHHA.2640@.TK2MSFTNGP06.phx.gbl...
> It is worth a try, it is likely it will work even though you didn't
> detached first.
Be forewarned, even if it it DOES work... you may have corruption.
I'd certainly run a DBCC CHECKDB on all the databases. (with all the flags)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
Is there any way to recover a sql database from a file system backup (.mdf
and .ldf files copies taken every night while sql was up and running)? The
client does not have any sql backups. I know he should ...
Thanks very much.
BrianYou can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATT
ACH). It is only
guaranteed if you first detached the database, though.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
> Hi,
> Is there any way to recover a sql database from a file system backup (.mdf
> and .ldf files copies taken every night while sql was up and running)? The
> client does not have any sql backups. I know he should ...
> Thanks very much.
> --
> Brian|||unfortunately it was not detached... those files restored were just image
copied during OS backup process... thanks anyway.
--
Brian
"Tibor Karaszi" wrote:
> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR A
TTACH). It is only
> guaranteed if you first detached the database, though.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
>|||It is worth a try, it is likely it will work even though you didn't detached
first.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...[vbcol=seagreen]
> unfortunately it was not detached... those files restored were just image
> copied during OS backup process... thanks anyway.
> --
> Brian
>
> "Tibor Karaszi" wrote:
>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OxIuUgpgHHA.2640@.TK2MSFTNGP06.phx.gbl...
> It is worth a try, it is likely it will work even though you didn't
> detached first.
Be forewarned, even if it it DOES work... you may have corruption.
I'd certainly run a DBCC CHECKDB on all the databases. (with all the flags)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
recover a database without backup
Hi,
Is there any way to recover a sql database from a file system backup (.mdf
and .ldf files copies taken every night while sql was up and running)? The
client does not have any sql backups. I know he should ...
Thanks very much.
--
BrianYou can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATTACH). It is only
guaranteed if you first detached the database, though.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
> Hi,
> Is there any way to recover a sql database from a file system backup (.mdf
> and .ldf files copies taken every night while sql was up and running)? The
> client does not have any sql backups. I know he should ...
> Thanks very much.
> --
> Brian|||unfortunately it was not detached... those files restored were just image
copied during OS backup process... thanks anyway.
--
Brian
"Tibor Karaszi" wrote:
> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATTACH). It is only
> guaranteed if you first detached the database, though.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
> > Hi,
> >
> > Is there any way to recover a sql database from a file system backup (.mdf
> > and .ldf files copies taken every night while sql was up and running)? The
> > client does not have any sql backups. I know he should ...
> >
> > Thanks very much.
> >
> > --
> > Brian
>|||It is worth a try, it is likely it will work even though you didn't detached first.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...
> unfortunately it was not detached... those files restored were just image
> copied during OS backup process... thanks anyway.
> --
> Brian
>
> "Tibor Karaszi" wrote:
>> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATTACH). It is only
>> guaranteed if you first detached the database, though.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
>> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
>> > Hi,
>> >
>> > Is there any way to recover a sql database from a file system backup (.mdf
>> > and .ldf files copies taken every night while sql was up and running)? The
>> > client does not have any sql backups. I know he should ...
>> >
>> > Thanks very much.
>> >
>> > --
>> > Brian
>>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OxIuUgpgHHA.2640@.TK2MSFTNGP06.phx.gbl...
> It is worth a try, it is likely it will work even though you didn't
> detached first.
Be forewarned, even if it it DOES work... you may have corruption.
I'd certainly run a DBCC CHECKDB on all the databases. (with all the flags)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...
>> unfortunately it was not detached... those files restored were just image
>> copied during OS backup process... thanks anyway.
>> --
>> Brian
>>
>> "Tibor Karaszi" wrote:
>> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR
>> ATTACH). It is only
>> guaranteed if you first detached the database, though.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
>> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
>> > Hi,
>> >
>> > Is there any way to recover a sql database from a file system backup
>> > (.mdf
>> > and .ldf files copies taken every night while sql was up and running)?
>> > The
>> > client does not have any sql backups. I know he should ...
>> >
>> > Thanks very much.
>> >
>> > --
>> > Brian
>>
>
--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
Is there any way to recover a sql database from a file system backup (.mdf
and .ldf files copies taken every night while sql was up and running)? The
client does not have any sql backups. I know he should ...
Thanks very much.
--
BrianYou can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATTACH). It is only
guaranteed if you first detached the database, though.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
> Hi,
> Is there any way to recover a sql database from a file system backup (.mdf
> and .ldf files copies taken every night while sql was up and running)? The
> client does not have any sql backups. I know he should ...
> Thanks very much.
> --
> Brian|||unfortunately it was not detached... those files restored were just image
copied during OS backup process... thanks anyway.
--
Brian
"Tibor Karaszi" wrote:
> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATTACH). It is only
> guaranteed if you first detached the database, though.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
> > Hi,
> >
> > Is there any way to recover a sql database from a file system backup (.mdf
> > and .ldf files copies taken every night while sql was up and running)? The
> > client does not have any sql backups. I know he should ...
> >
> > Thanks very much.
> >
> > --
> > Brian
>|||It is worth a try, it is likely it will work even though you didn't detached first.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...
> unfortunately it was not detached... those files restored were just image
> copied during OS backup process... thanks anyway.
> --
> Brian
>
> "Tibor Karaszi" wrote:
>> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR ATTACH). It is only
>> guaranteed if you first detached the database, though.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
>> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
>> > Hi,
>> >
>> > Is there any way to recover a sql database from a file system backup (.mdf
>> > and .ldf files copies taken every night while sql was up and running)? The
>> > client does not have any sql backups. I know he should ...
>> >
>> > Thanks very much.
>> >
>> > --
>> > Brian
>>|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OxIuUgpgHHA.2640@.TK2MSFTNGP06.phx.gbl...
> It is worth a try, it is likely it will work even though you didn't
> detached first.
Be forewarned, even if it it DOES work... you may have corruption.
I'd certainly run a DBCC CHECKDB on all the databases. (with all the flags)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
> news:6B4403AF-8256-4086-825C-852CF5078B77@.microsoft.com...
>> unfortunately it was not detached... those files restored were just image
>> copied during OS backup process... thanks anyway.
>> --
>> Brian
>>
>> "Tibor Karaszi" wrote:
>> You can try sp_attach_db (or, preferred in 2005: CREATE DATABASE ... FOR
>> ATTACH). It is only
>> guaranteed if you first detached the database, though.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Brian Brian" <BrianBrian@.discussions.microsoft.com> wrote in message
>> news:8BB1D107-6E4B-42A6-B5AB-152D5693FF94@.microsoft.com...
>> > Hi,
>> >
>> > Is there any way to recover a sql database from a file system backup
>> > (.mdf
>> > and .ldf files copies taken every night while sql was up and running)?
>> > The
>> > client does not have any sql backups. I know he should ...
>> >
>> > Thanks very much.
>> >
>> > --
>> > Brian
>>
>
--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
Monday, February 20, 2012
Recordcount Issue
This is weird. I have (identical) copies of sql server running on two seperate machines. I have a vb app that accesses the data. It runs with both dbs but I have the following function that I call to show the record count in a particular display:
Code:------------------------
Dim rs As Recordset
'determines number of records in a sql statement
Set rs = New ADODB.Recordset
rs.Open sql, conn, adOpenStatic, adLockOptimistic
RecordCount = rs.RecordCount
rs.Close
Set rs = Nothing
------------------------With one db it works just fine but with the other it returns a value of -1 even though the data is displayed just fine. Any ideas?You need to make sure that you have a client side sursor for this to work.
I always work with disconnected recorsets so it's not an issue.|||I'm not a VB expert, but I think you need to use rs.movelast in order to get an accurate count.
blindman
Code:------------------------
Dim rs As Recordset
'determines number of records in a sql statement
Set rs = New ADODB.Recordset
rs.Open sql, conn, adOpenStatic, adLockOptimistic
RecordCount = rs.RecordCount
rs.Close
Set rs = Nothing
------------------------With one db it works just fine but with the other it returns a value of -1 even though the data is displayed just fine. Any ideas?You need to make sure that you have a client side sursor for this to work.
I always work with disconnected recorsets so it's not an issue.|||I'm not a VB expert, but I think you need to use rs.movelast in order to get an accurate count.
blindman
Subscribe to:
Posts (Atom)