Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Wednesday, March 28, 2012

Recovery model on user db automatically changes from Full to Simpl

We have a user database on which the recovery model keeps changing to Simple.
I go in every day and manually change it to Full, but nearly every night it
automatically gets set back to Simple. Why is this happening?
Note: I have read the previous threads which discuss this problem happening
with the msdb database. But in my case, it isn't msdb - it is a USER
database."CadeBryant" <CadeBryant@.discussions.microsoft.com> wrote in message
news:F90570AE-4AD3-4D2F-B53C-0928E6D6FD0B@.microsoft.com...
> We have a user database on which the recovery model keeps changing to
> Simple.
> I go in every day and manually change it to Full, but nearly every night
> it
> automatically gets set back to Simple. Why is this happening?
> Note: I have read the previous threads which discuss this problem
> happening
> with the msdb database. But in my case, it isn't msdb - it is a USER
> database.
Check for any maintenance jobs, especially any that do attempt fixes on the
databases.
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com|||The only maintenance jobs are for the system DBs - nothing for the user DBs.
"Greg D. Moore (Strider)" wrote:
> "CadeBryant" <CadeBryant@.discussions.microsoft.com> wrote in message
> news:F90570AE-4AD3-4D2F-B53C-0928E6D6FD0B@.microsoft.com...
> > We have a user database on which the recovery model keeps changing to
> > Simple.
> > I go in every day and manually change it to Full, but nearly every night
> > it
> > automatically gets set back to Simple. Why is this happening?
> >
> > Note: I have read the previous threads which discuss this problem
> > happening
> > with the msdb database. But in my case, it isn't msdb - it is a USER
> > database.
>
> Check for any maintenance jobs, especially any that do attempt fixes on the
> databases.
>
> --
> Greg Moore
> SQL Server DBA Consulting
> sql (at) greenms.com http://www.greenms.com
>
>|||I suggest you use a server side Profiler trace to catch commands (use filter in the trace) such as
sp_dboption and ALTER DATABASE.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"CadeBryant" <CadeBryant@.discussions.microsoft.com> wrote in message
news:27A46AE4-5BD3-4E09-A433-002A030782DB@.microsoft.com...
> The only maintenance jobs are for the system DBs - nothing for the user DBs.
> "Greg D. Moore (Strider)" wrote:
>> "CadeBryant" <CadeBryant@.discussions.microsoft.com> wrote in message
>> news:F90570AE-4AD3-4D2F-B53C-0928E6D6FD0B@.microsoft.com...
>> > We have a user database on which the recovery model keeps changing to
>> > Simple.
>> > I go in every day and manually change it to Full, but nearly every night
>> > it
>> > automatically gets set back to Simple. Why is this happening?
>> >
>> > Note: I have read the previous threads which discuss this problem
>> > happening
>> > with the msdb database. But in my case, it isn't msdb - it is a USER
>> > database.
>>
>> Check for any maintenance jobs, especially any that do attempt fixes on the
>> databases.
>>
>> --
>> Greg Moore
>> SQL Server DBA Consulting
>> sql (at) greenms.com http://www.greenms.com
>>

Recovery model on user db automatically changes from Full to Simpl

We have a user database on which the recovery model keeps changing to Simple.
I go in every day and manually change it to Full, but nearly every night it
automatically gets set back to Simple. Why is this happening?
Note: I have read the previous threads which discuss this problem happening
with the msdb database. But in my case, it isn't msdb - it is a USER
database.
"CadeBryant" <CadeBryant@.discussions.microsoft.com> wrote in message
news:F90570AE-4AD3-4D2F-B53C-0928E6D6FD0B@.microsoft.com...
> We have a user database on which the recovery model keeps changing to
> Simple.
> I go in every day and manually change it to Full, but nearly every night
> it
> automatically gets set back to Simple. Why is this happening?
> Note: I have read the previous threads which discuss this problem
> happening
> with the msdb database. But in my case, it isn't msdb - it is a USER
> database.
Check for any maintenance jobs, especially any that do attempt fixes on the
databases.
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com
|||The only maintenance jobs are for the system DBs - nothing for the user DBs.
"Greg D. Moore (Strider)" wrote:

> "CadeBryant" <CadeBryant@.discussions.microsoft.com> wrote in message
> news:F90570AE-4AD3-4D2F-B53C-0928E6D6FD0B@.microsoft.com...
>
> Check for any maintenance jobs, especially any that do attempt fixes on the
> databases.
>
> --
> Greg Moore
> SQL Server DBA Consulting
> sql (at) greenms.com http://www.greenms.com
>
>

Recovery model on user db automatically changes from Full to Simpl

We have a user database on which the recovery model keeps changing to Simple
.
I go in every day and manually change it to Full, but nearly every night it
automatically gets set back to Simple. Why is this happening?
Note: I have read the previous threads which discuss this problem happening
with the msdb database. But in my case, it isn't msdb - it is a USER
database."CadeBryant" <CadeBryant@.discussions.microsoft.com> wrote in message
news:F90570AE-4AD3-4D2F-B53C-0928E6D6FD0B@.microsoft.com...
> We have a user database on which the recovery model keeps changing to
> Simple.
> I go in every day and manually change it to Full, but nearly every night
> it
> automatically gets set back to Simple. Why is this happening?
> Note: I have read the previous threads which discuss this problem
> happening
> with the msdb database. But in my case, it isn't msdb - it is a USER
> database.
Check for any maintenance jobs, especially any that do attempt fixes on the
databases.
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com

Tuesday, March 20, 2012

Recover SDF-File

Hi,

we're using SQL Server CE 2.0 on our CE 4.2 device (mobile scanning device).
In some cases, the application freezes and the user must perfom a cold boot.

After the cold boot, the database is some kind of corrupt - the application can't build up a new connection and a "Fatal Applicatio Error ...." is thrown.

If you try to connect to that SDF-File via the Query Analyser Tool, it also throws an exception .... "DBInitiliaze"....

Do have anyone an idea whats wrong with the SDF-File and more important: How could we recover such files - most times there is already business data stored, which would be than lost...

Thanks
WilliBaldDid you try compacting the SQL CE 2.0 database.

Thanks,
Laxmi|||Hi,

sorry - I can't follow you - what do you mean with "compacting"?

I fare as I understand, the SQL Server CE 2.0 database stores its data in such *.sdf files and I'm not aware, that we compress or compact them in any way - the problem is, that if the application freezes when you perform a database action, the database falls in some stage, where you even can't connect with the QueryAnalyzer - as if the *.sdf file is still open...

Thanks
WilliBald|||

There could be an option in ISQLW tool before connecting to a database do "Repair & Connect".

Thanks,
Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The easiest way to kick off a Compact on an .sdf file is to use the
"SQLCE Database Viewer" tool.

Aswell as letting you view & edit your SQLCE2.0 and SQL Server Mobile
databases from your Desktop, this has a friendly ActiveSync Explorer
style front-end, and you can literally right-click on an .sdf file, and
select "Compact.."

You don't have to tap on your device's screen once !
It doesn't get much easier than that...

www.pocketpctoolkit.com
Mike
|||WilliBald,

With SQL CE 2.0, the only option available to attempt to repair a database is to call Compact on the SqlCeEngine object. Compact verifies database integrity, reclaims unused space, recalculates index statistics, etc. Unfortunately, if you cannot Compact the database, there is little else you can do to recover it. With SQL Mobile, this improves with the addition of Verify and Repair options on the database engine.

In most cases, SQL CE databases that I have seen become corrupted are on storage cards or other removable storage.

-Darren Shaffer|||Hi Mike,

thanks VERY much!
The tool is great and I've managed to restore the database files!

One more question: Is there a chance to get the mobile binaries also for SH4 processor? - Cause we have devices with that typ of cpu.

regads
willibald|||

hello Mike,

I read your answer and i download the same viewer and its really helpful. But still i am not able to compact my database. whenever i use compact database option it keep trying and doing nothing at the end. Even i wrote my own application to do so using Data.engin etc, but still unable to recover my database .SDF file.

Kindly tell me is there any clue to rectify this ?

Thanks in advance

|||

I have had the same problem with a corrupt SDF file.

All I did was Compact it.

Encrypt it again.

All works fine.

Recover SDF-File

Hi,

we're using SQL Server CE 2.0 on our CE 4.2 device (mobile scanning device).
In some cases, the application freezes and the user must perfom a cold boot.

After the cold boot, the database is some kind of corrupt - the application can't build up a new connection and a "Fatal Applicatio Error ...." is thrown.

If you try to connect to that SDF-File via the Query Analyser Tool, it also throws an exception .... "DBInitiliaze"....

Do have anyone an idea whats wrong with the SDF-File and more important: How could we recover such files - most times there is already business data stored, which would be than lost...

Thanks
WilliBaldDid you try compacting the SQL CE 2.0 database.

Thanks,
Laxmi|||Hi,

sorry - I can't follow you - what do you mean with "compacting"?

I fare as I understand, the SQL Server CE 2.0 database stores its data in such *.sdf files and I'm not aware, that we compress or compact them in any way - the problem is, that if the application freezes when you perform a database action, the database falls in some stage, where you even can't connect with the QueryAnalyzer - as if the *.sdf file is still open...

Thanks
WilliBald|||

There could be an option in ISQLW tool before connecting to a database do "Repair & Connect".

Thanks,
Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The easiest way to kick off a Compact on an .sdf file is to use the
"SQLCE Database Viewer" tool.

Aswell as letting you view & edit your SQLCE2.0 and SQL Server Mobile
databases from your Desktop, this has a friendly ActiveSync Explorer
style front-end, and you can literally right-click on an .sdf file, and
select "Compact.."

You don't have to tap on your device's screen once !
It doesn't get much easier than that...

www.pocketpctoolkit.com
Mike
|||WilliBald,

With SQL CE 2.0, the only option available to attempt to repair a database is to call Compact on the SqlCeEngine object. Compact verifies database integrity, reclaims unused space, recalculates index statistics, etc. Unfortunately, if you cannot Compact the database, there is little else you can do to recover it. With SQL Mobile, this improves with the addition of Verify and Repair options on the database engine.

In most cases, SQL CE databases that I have seen become corrupted are on storage cards or other removable storage.

-Darren Shaffer|||Hi Mike,

thanks VERY much!
The tool is great and I've managed to restore the database files!

One more question: Is there a chance to get the mobile binaries also for SH4 processor? - Cause we have devices with that typ of cpu.

regads
willibald|||

hello Mike,

I read your answer and i download the same viewer and its really helpful. But still i am not able to compact my database. whenever i use compact database option it keep trying and doing nothing at the end. Even i wrote my own application to do so using Data.engin etc, but still unable to recover my database .SDF file.

Kindly tell me is there any clue to rectify this ?

Thanks in advance

|||

I have had the same problem with a corrupt SDF file.

All I did was Compact it.

Encrypt it again.

All works fine.

|||As file incourrpt , if the sdf is corrupt , could repair this file is very lucky.

Try to use SqlCeEngine .Repaire method. if failure, reCreate the sdf maybe is the only way .

Recover SDF-File

Hi,

we're using SQL Server CE 2.0 on our CE 4.2 device (mobile scanning device).
In some cases, the application freezes and the user must perfom a cold boot.

After the cold boot, the database is some kind of corrupt - the application can't build up a new connection and a "Fatal Applicatio Error ...." is thrown.

If you try to connect to that SDF-File via the Query Analyser Tool, it also throws an exception .... "DBInitiliaze"....

Do have anyone an idea whats wrong with the SDF-File and more important: How could we recover such files - most times there is already business data stored, which would be than lost...

Thanks
WilliBaldDid you try compacting the SQL CE 2.0 database.

Thanks,
Laxmi|||Hi,

sorry - I can't follow you - what do you mean with "compacting"?

I fare as I understand, the SQL Server CE 2.0 database stores its data in such *.sdf files and I'm not aware, that we compress or compact them in any way - the problem is, that if the application freezes when you perform a database action, the database falls in some stage, where you even can't connect with the QueryAnalyzer - as if the *.sdf file is still open...

Thanks
WilliBald|||

There could be an option in ISQLW tool before connecting to a database do "Repair & Connect".

Thanks,
Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The easiest way to kick off a Compact on an .sdf file is to use the
"SQLCE Database Viewer" tool.

Aswell as letting you view & edit your SQLCE2.0 and SQL Server Mobile
databases from your Desktop, this has a friendly ActiveSync Explorer
style front-end, and you can literally right-click on an .sdf file, and
select "Compact.."

You don't have to tap on your device's screen once !
It doesn't get much easier than that...

www.pocketpctoolkit.com
Mike
|||WilliBald,

With SQL CE 2.0, the only option available to attempt to repair a database is to call Compact on the SqlCeEngine object. Compact verifies database integrity, reclaims unused space, recalculates index statistics, etc. Unfortunately, if you cannot Compact the database, there is little else you can do to recover it. With SQL Mobile, this improves with the addition of Verify and Repair options on the database engine.

In most cases, SQL CE databases that I have seen become corrupted are on storage cards or other removable storage.

-Darren Shaffer|||Hi Mike,

thanks VERY much!
The tool is great and I've managed to restore the database files!

One more question: Is there a chance to get the mobile binaries also for SH4 processor? - Cause we have devices with that typ of cpu.

regads
willibald|||

hello Mike,

I read your answer and i download the same viewer and its really helpful. But still i am not able to compact my database. whenever i use compact database option it keep trying and doing nothing at the end. Even i wrote my own application to do so using Data.engin etc, but still unable to recover my database .SDF file.

Kindly tell me is there any clue to rectify this ?

Thanks in advance

|||

I have had the same problem with a corrupt SDF file.

All I did was Compact it.

Encrypt it again.

All works fine.

|||As file incourrpt , if the sdf is corrupt , could repair this file is very lucky.

Try to use SqlCeEngine .Repaire method. if failure, reCreate the sdf maybe is the only way .

Recover SDF-File

Hi,

we're using SQL Server CE 2.0 on our CE 4.2 device (mobile scanning device).
In some cases, the application freezes and the user must perfom a cold boot.

After the cold boot, the database is some kind of corrupt - the application can't build up a new connection and a "Fatal Applicatio Error ...." is thrown.

If you try to connect to that SDF-File via the Query Analyser Tool, it also throws an exception .... "DBInitiliaze"....

Do have anyone an idea whats wrong with the SDF-File and more important: How could we recover such files - most times there is already business data stored, which would be than lost...

Thanks
WilliBaldDid you try compacting the SQL CE 2.0 database.

Thanks,
Laxmi|||Hi,

sorry - I can't follow you - what do you mean with "compacting"?

I fare as I understand, the SQL Server CE 2.0 database stores its data in such *.sdf files and I'm not aware, that we compress or compact them in any way - the problem is, that if the application freezes when you perform a database action, the database falls in some stage, where you even can't connect with the QueryAnalyzer - as if the *.sdf file is still open...

Thanks
WilliBald|||

There could be an option in ISQLW tool before connecting to a database do "Repair & Connect".

Thanks,
Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The easiest way to kick off a Compact on an .sdf file is to use the
"SQLCE Database Viewer" tool.

Aswell as letting you view & edit your SQLCE2.0 and SQL Server Mobile
databases from your Desktop, this has a friendly ActiveSync Explorer
style front-end, and you can literally right-click on an .sdf file, and
select "Compact.."

You don't have to tap on your device's screen once !
It doesn't get much easier than that...

www.pocketpctoolkit.com
Mike
|||WilliBald,

With SQL CE 2.0, the only option available to attempt to repair a database is to call Compact on the SqlCeEngine object. Compact verifies database integrity, reclaims unused space, recalculates index statistics, etc. Unfortunately, if you cannot Compact the database, there is little else you can do to recover it. With SQL Mobile, this improves with the addition of Verify and Repair options on the database engine.

In most cases, SQL CE databases that I have seen become corrupted are on storage cards or other removable storage.

-Darren Shaffer|||Hi Mike,

thanks VERY much!
The tool is great and I've managed to restore the database files!

One more question: Is there a chance to get the mobile binaries also for SH4 processor? - Cause we have devices with that typ of cpu.

regads
willibald|||

hello Mike,

I read your answer and i download the same viewer and its really helpful. But still i am not able to compact my database. whenever i use compact database option it keep trying and doing nothing at the end. Even i wrote my own application to do so using Data.engin etc, but still unable to recover my database .SDF file.

Kindly tell me is there any clue to rectify this ?

Thanks in advance

|||

I have had the same problem with a corrupt SDF file.

All I did was Compact it.

Encrypt it again.

All works fine.

Recover SDF-File

Hi,

we're using SQL Server CE 2.0 on our CE 4.2 device (mobile scanning device).
In some cases, the application freezes and the user must perfom a cold boot.

After the cold boot, the database is some kind of corrupt - the application can't build up a new connection and a "Fatal Applicatio Error ...." is thrown.

If you try to connect to that SDF-File via the Query Analyser Tool, it also throws an exception .... "DBInitiliaze"....

Do have anyone an idea whats wrong with the SDF-File and more important: How could we recover such files - most times there is already business data stored, which would be than lost...

Thanks
WilliBaldDid you try compacting the SQL CE 2.0 database.

Thanks,
Laxmi|||Hi,

sorry - I can't follow you - what do you mean with "compacting"?

I fare as I understand, the SQL Server CE 2.0 database stores its data in such *.sdf files and I'm not aware, that we compress or compact them in any way - the problem is, that if the application freezes when you perform a database action, the database falls in some stage, where you even can't connect with the QueryAnalyzer - as if the *.sdf file is still open...

Thanks
WilliBald|||

There could be an option in ISQLW tool before connecting to a database do "Repair & Connect".

Thanks,
Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The easiest way to kick off a Compact on an .sdf file is to use the
"SQLCE Database Viewer" tool.

Aswell as letting you view & edit your SQLCE2.0 and SQL Server Mobile
databases from your Desktop, this has a friendly ActiveSync Explorer
style front-end, and you can literally right-click on an .sdf file, and
select "Compact.."

You don't have to tap on your device's screen once !
It doesn't get much easier than that...

www.pocketpctoolkit.com
Mike|||WilliBald,

With SQL CE 2.0, the only option available to attempt to repair a database is to call Compact on the SqlCeEngine object. Compact verifies database integrity, reclaims unused space, recalculates index statistics, etc. Unfortunately, if you cannot Compact the database, there is little else you can do to recover it. With SQL Mobile, this improves with the addition of Verify and Repair options on the database engine.

In most cases, SQL CE databases that I have seen become corrupted are on storage cards or other removable storage.

-Darren Shaffer|||Hi Mike,

thanks VERY much!
The tool is great and I've managed to restore the database files!

One more question: Is there a chance to get the mobile binaries also for SH4 processor? - Cause we have devices with that typ of cpu.

regads
willibald|||

hello Mike,

I read your answer and i download the same viewer and its really helpful. But still i am not able to compact my database. whenever i use compact database option it keep trying and doing nothing at the end. Even i wrote my own application to do so using Data.engin etc, but still unable to recover my database .SDF file.

Kindly tell me is there any clue to rectify this ?

Thanks in advance

|||

I have had the same problem with a corrupt SDF file.

All I did was Compact it.

Encrypt it again.

All works fine.

Recover SDF-File

Hi,

we're using SQL Server CE 2.0 on our CE 4.2 device (mobile scanning device).
In some cases, the application freezes and the user must perfom a cold boot.

After the cold boot, the database is some kind of corrupt - the application can't build up a new connection and a "Fatal Applicatio Error ...." is thrown.

If you try to connect to that SDF-File via the Query Analyser Tool, it also throws an exception .... "DBInitiliaze"....

Do have anyone an idea whats wrong with the SDF-File and more important: How could we recover such files - most times there is already business data stored, which would be than lost...

Thanks
WilliBaldDid you try compacting the SQL CE 2.0 database.

Thanks,
Laxmi|||Hi,

sorry - I can't follow you - what do you mean with "compacting"?

I fare as I understand, the SQL Server CE 2.0 database stores its data in such *.sdf files and I'm not aware, that we compress or compact them in any way - the problem is, that if the application freezes when you perform a database action, the database falls in some stage, where you even can't connect with the QueryAnalyzer - as if the *.sdf file is still open...

Thanks
WilliBald|||

There could be an option in ISQLW tool before connecting to a database do "Repair & Connect".

Thanks,
Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The easiest way to kick off a Compact on an .sdf file is to use the
"SQLCE Database Viewer" tool.

Aswell as letting you view & edit your SQLCE2.0 and SQL Server Mobile
databases from your Desktop, this has a friendly ActiveSync Explorer
style front-end, and you can literally right-click on an .sdf file, and
select "Compact.."

You don't have to tap on your device's screen once !
It doesn't get much easier than that...

www.pocketpctoolkit.com
Mike
|||WilliBald,

With SQL CE 2.0, the only option available to attempt to repair a database is to call Compact on the SqlCeEngine object. Compact verifies database integrity, reclaims unused space, recalculates index statistics, etc. Unfortunately, if you cannot Compact the database, there is little else you can do to recover it. With SQL Mobile, this improves with the addition of Verify and Repair options on the database engine.

In most cases, SQL CE databases that I have seen become corrupted are on storage cards or other removable storage.

-Darren Shaffer|||Hi Mike,

thanks VERY much!
The tool is great and I've managed to restore the database files!

One more question: Is there a chance to get the mobile binaries also for SH4 processor? - Cause we have devices with that typ of cpu.

regads
willibald|||

hello Mike,

I read your answer and i download the same viewer and its really helpful. But still i am not able to compact my database. whenever i use compact database option it keep trying and doing nothing at the end. Even i wrote my own application to do so using Data.engin etc, but still unable to recover my database .SDF file.

Kindly tell me is there any clue to rectify this ?

Thanks in advance

|||

I have had the same problem with a corrupt SDF file.

All I did was Compact it.

Encrypt it again.

All works fine.

|||As file incourrpt , if the sdf is corrupt , could repair this file is very lucky.

Try to use SqlCeEngine .Repaire method. if failure, reCreate the sdf maybe is the only way .

Monday, March 12, 2012

Recover db from .mdf and .ldf files in sql server7.0

Hi,
how to recover a user database in sql server 7.0 if I only have the .mdf fil
e and the .ldf file but no backup file? Backup file of master database exist
s.
Found a utiliy tool called "MSSQLRecovery" on the net that recreates the dat
abase script out of the .mdf-file, so far so good. But I need the informatio
n in the .ldf file too.. How to get the information in the .ldf file?
Thanks.Hi,
With the MDF and LDF files did you tried attaching the database?
steps:
1. Copy the MDF and LDF to harddisk say (c:\mssql\data)
2. use the below command to attach the database in to sql server
sp_attach_db 'dbname','c:\mssql\data\dbname.mdf','c:\mssql\data\dbname.ldf'
This will work out if your mdf and ldf is not corrupted.
Thanks
Hari
MCDBA
"Siri" <anonymous@.discussions.microsoft.com> wrote in message
news:996575F8-05F3-4392-A8B3-7E858AC6CF68@.microsoft.com...
> Hi,
> how to recover a user database in sql server 7.0 if I only have the .mdf
file and the .ldf file but no backup file? Backup file of master database
exists.
> Found a utiliy tool called "MSSQLRecovery" on the net that recreates the
database script out of the .mdf-file, so far so good. But I need the
information in the .ldf file too.. How to get the information in the .ldf
file?
> Thanks.|||Yes,
I have tried to attach the database using sp_attach_db, but I got the messag
e that the .ldf file is corrupt.. :o(
Is there anything else I can do to recover data from the .ldf file?
Thanks!
Siri|||You could try to attach only the mdf file, using sp_attach_single_file_db. I
f that doesn't work, I suggest
that you open a case with MS Support.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Siri" <anonymous@.discussions.microsoft.com> wrote in message
news:CFC69081-B490-42D0-AA27-DAE197B37AE9@.microsoft.com...
> Yes,
> I have tried to attach the database using sp_attach_db, but I got the message that
the .ldf file is
corrupt.. :o(
> Is there anything else I can do to recover data from the .ldf file?
> Thanks!
> Siri

Recover db from .mdf and .ldf files in sql server7.0

Hi,
how to recover a user database in sql server 7.0 if I only have the .mdf file and the .ldf file but no backup file? Backup file of master database exists.
Found a utiliy tool called "MSSQLRecovery" on the net that recreates the database script out of the .mdf-file, so far so good. But I need the information in the .ldf file too.. How to get the information in the .ldf file?
Thanks.
Hi,
With the MDF and LDF files did you tried attaching the database?
steps:
1. Copy the MDF and LDF to harddisk say (c:\mssql\data)
2. use the below command to attach the database in to sql server
sp_attach_db 'dbname','c:\mssql\data\dbname.mdf','c:\mssql\data \dbname.ldf'
This will work out if your mdf and ldf is not corrupted.
Thanks
Hari
MCDBA
"Siri" <anonymous@.discussions.microsoft.com> wrote in message
news:996575F8-05F3-4392-A8B3-7E858AC6CF68@.microsoft.com...
> Hi,
> how to recover a user database in sql server 7.0 if I only have the .mdf
file and the .ldf file but no backup file? Backup file of master database
exists.
> Found a utiliy tool called "MSSQLRecovery" on the net that recreates the
database script out of the .mdf-file, so far so good. But I need the
information in the .ldf file too.. How to get the information in the .ldf
file?
> Thanks.
|||Yes,
I have tried to attach the database using sp_attach_db, but I got the message that the .ldf file is corrupt.. :o(
Is there anything else I can do to recover data from the .ldf file?
Thanks!
Siri
|||You could try to attach only the mdf file, using sp_attach_single_file_db. If that doesn't work, I suggest
that you open a case with MS Support.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Siri" <anonymous@.discussions.microsoft.com> wrote in message
news:CFC69081-B490-42D0-AA27-DAE197B37AE9@.microsoft.com...
> Yes,
> I have tried to attach the database using sp_attach_db, but I got the message that the .ldf file is
corrupt.. :o(
> Is there anything else I can do to recover data from the .ldf file?
> Thanks!
> Siri

Recover db from .mdf and .ldf files in sql server7.0

Hi,
how to recover a user database in sql server 7.0 if I only have the .mdf file and the .ldf file but no backup file? Backup file of master database exists.
Found a utiliy tool called "MSSQLRecovery" on the net that recreates the database script out of the .mdf-file, so far so good. But I need the information in the .ldf file too.. How to get the information in the .ldf file?
Thanks.Hi,
With the MDF and LDF files did you tried attaching the database?
steps:
1. Copy the MDF and LDF to harddisk say (c:\mssql\data)
2. use the below command to attach the database in to sql server
sp_attach_db 'dbname','c:\mssql\data\dbname.mdf','c:\mssql\data\dbname.ldf'
This will work out if your mdf and ldf is not corrupted.
Thanks
Hari
MCDBA
"Siri" <anonymous@.discussions.microsoft.com> wrote in message
news:996575F8-05F3-4392-A8B3-7E858AC6CF68@.microsoft.com...
> Hi,
> how to recover a user database in sql server 7.0 if I only have the .mdf
file and the .ldf file but no backup file? Backup file of master database
exists.
> Found a utiliy tool called "MSSQLRecovery" on the net that recreates the
database script out of the .mdf-file, so far so good. But I need the
information in the .ldf file too.. How to get the information in the .ldf
file?
> Thanks.|||Yes
I have tried to attach the database using sp_attach_db, but I got the message that the .ldf file is corrupt.. :o
Is there anything else I can do to recover data from the .ldf file?
Thanks
Siri|||You could try to attach only the mdf file, using sp_attach_single_file_db. If that doesn't work, I suggest
that you open a case with MS Support.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Siri" <anonymous@.discussions.microsoft.com> wrote in message
news:CFC69081-B490-42D0-AA27-DAE197B37AE9@.microsoft.com...
> Yes,
> I have tried to attach the database using sp_attach_db, but I got the message that the .ldf file is
corrupt.. :o(
> Is there anything else I can do to recover data from the .ldf file?
> Thanks!
> Siri|||Hello,
Have you tried the command sp_attach_single_file_db ?
This will attach you datafile, but not your log file as it
seems the log file is currupt, so you may have some data
loss.
J
>--Original Message--
>Hi,
>how to recover a user database in sql server 7.0 if I
only have the .mdf file and the .ldf file but no backup
file? Backup file of master database exists.
>Found a utiliy tool called "MSSQLRecovery" on the net
that recreates the database script out of the .mdf-file,
so far so good. But I need the information in the .ldf
file too.. How to get the information in the .ldf file?
>Thanks.
>.
>|||Yes
I have tried sp_attach_single_file_db, but as you say I will get some data loss with this method
My problem is the log file never seems to been backuped, so I guess I will get quite a lot of data loss
Thanks
Siri|||That really depends upon how you have programmed your
application. Depending upon the last commit statement or
chekpoint you may of lost a lot less data than you think.
I strongly doubt if it will weeks, days or hours of lost
information, personally I think it will be minutes.
Try attaching anyway then seeing if there any timestap
fields in you app, when the last one was. That should give
you an indication.
J
>--Original Message--
>Yes,
>I have tried sp_attach_single_file_db, but as you say I
will get some data loss with this method.
>My problem is the log file never seems to been backuped,
so I guess I will get quite a lot of data loss.
>Thanks,
>Siri
>.
>

Wednesday, March 7, 2012

RecordSelectionFormula not appearing in the Query

I am using Crystal Reports 7 with VB6.
I am sending some user defined parameters from the application to filter the records and its getting set to the CRPEAuto.Report.RecordSelectionFormula, along with a hardcoded condition in the Report-Edit Selection Formula at design time. The design time and runtime parameter values are getting concatenated properly with the required relational operator.

1.
But the method CRPEAuto.Report.SQLQueryString, retrieves the query of the report(Show SQL Query), without the condition set in the RecordSelectionFormula above.

2.
The query returned above, when executed in the SQL Navigator, runs in 6mins and records are fetched. But the report preview from the application which displays the records on Crystal Report runs indefinetly and no output is got.

Any inputs on this would be appreciated.
Many Thanks.You can use stored procedure with input parameters
Did the query returned is valid?

Saturday, February 25, 2012

Records don't lock-one user receives error

I created a MSAccess application with the forms in one db (front end) and the tables in another db (back end). The network admin migrated the back end to SQL Server. With a few minor changes (changing -1 to 1 in queries, etc.) the migration seemed to go pretty smoothly and everything works fine except....

The MSAccess backend used to lock records when someone was editing them. The status of the record was indicated in the record selector on each form, a right pointing arrow to indicate the record was free, a pencil with three dots indicating the record was locked by the current user, and a circle with a diagonal line to indicate the record was locked by another user. When 2 users attempted to simultaneously edit a record, the first user got the lock on the record. The second user received a message as soon as they attempted to edit the locked record to the effect that the record was locked.

Now (since the migration to SQL Server) the record selectors no longer give any indication as to the locking status of the records. When 2 users attempt to simultaneously edit a record, both are able to enter information in their forms, but when the second user attempts to save the record they receive the following message:

This record has been changed by another user since you started editing it. If you save the record, you will overwrite the changes the other user made. Copying the changes to the clipboard will let you look at the values the other user entered, and then paste your changes back in if you decide to make changes.

Please help me find the cause of this behavior. Is it something I need to change in the MSAccess front end or something that needs to be set in the SQL Server back end by the network admin?

I am moving this question to the SQL Server Database Engine forum.

Monday, February 20, 2012

record, page, table locking

Hello,
I have set up a sql server database with three tables, and I am using MS Acc
ess as the front end for user view, inserts, and updates.
The transaction properties for the database are set as follows:
lock_timeout = 1800
Session isolation level = serializable
access mode is multiuser.
Recently, one person had the MS Access database open and made deletions with
out any problem, closed the database and then opened it later to delete more
records from a table but recieved this message "the microsoft jet db engine
stopped the process becaus
e you and another user are attempting to change the same data at the same ti
me." error 2197. but they are the only one's who have the db open. Would any
one be able to tell me which setting I have misconfigured?
Thanks,
ChiekoThis is an Access issue. I suggest you post the question to an Access group.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Chieko Kuroda" <anonymous@.discussions.microsoft.com> wrote in message
news:22D5A1D3-6B23-4E53-9809-F13CA9C97A20@.microsoft.com...
> Hello,
> I have set up a sql server database with three tables, and I am using MS
Access as the front end for user view, inserts, and updates.
> The transaction properties for the database are set as follows:
> lock_timeout = 1800
> Session isolation level = serializable
> access mode is multiuser.
> Recently, one person had the MS Access database open and made deletions
without any problem, closed the database and then opened it later to delete
more records from a table but recieved this message "the microsoft jet db
engine stopped the process because you and another user are attempting to
change the same data at the same time." error 2197. but they are the only
one's who have the db open. Would anyone be able to tell me which setting I
have misconfigured?
> Thanks,
> Chieko
>

record, page table locking

Hello,
I have set up a sql server database with three tables, and I am using MS Acc
ess as the front end for user view, inserts, and updates.
The transaction properties for the database are set as follows:
lock_timeout = 1800
Session isolation level = serializable
access mode is multiuser.
Recently, one person had the MS Access database open and made deletions with
out any problem, closed the database and then opened it later to delete more
records from a table but recieved this message "the microsoft jet db engine
stopped the process becaus
e you and another user are attempting to change the same data at the same ti
me." error 2197. but they are the only one's who have the db open. Would any
one be able to tell me which setting I have misconfigured?
Thanks,
ChiekoThis can happen with a few different scenarios. Basically,
ODBC will use a timestamp to determine if the record has
been updated. If there is no timestamp column, it compares
all column values to see if the record has been updated.
Some situations can cause Access to become "confused" as to
whether the record has been update - such as having float
data types. Try adding a timestamp column to the SQL table
and see if the fixes the problem. There should be some
Access knowledge base articles on this subject that you may
want to search for.
-Sue
On Thu, 18 Mar 2004 11:21:05 -0800, "chieko Kuroda"
<anonymous@.discussions.microsoft.com> wrote:

>Hello,
>I have set up a sql server database with three tables, and I am using MS Ac
cess as the front end for user view, inserts, and updates.
>The transaction properties for the database are set as follows:
>lock_timeout = 1800
>Session isolation level = serializable
>access mode is multiuser.
>Recently, one person had the MS Access database open and made deletions without any
problem, closed the database and then opened it later to delete more records from a
table but recieved this message "the microsoft jet db engine stopped the process be
cau
se you and another user are attempting to change the same data at the same time." error 219
7. but they are the only one's who have the db open. Would anyone be able to tell me which
setting I have misconfigured?
>Thanks,
>Chieko
>
>
>

Record Selection Crystal Reports

I'm trying to get Crystal reports to prompt the user each time they run the report for the company they want to run the report an the date range they want to run the report on. Unfortunatly I can only get it to do the company at run time. In order to filter out the date range and the company I have to use the selection expert which dosent really help my users is there anyway to filter both sets of values when running the report live for the customer?Cant you pass these values thru the Application you are using?