Showing posts with label ldf. Show all posts
Showing posts with label ldf. Show all posts

Friday, March 30, 2012

I get confused about my MDF and LDF files against backup files

My MDF and LDF files sizes are like 100 MG each one.
We bakup the database always. When we do this, we get 5 txt files with information about the backup,
one BAK file with size like my MDF file, but we get another BAK file that have a BIG size, like 8 GB.
What happened here?
I assume that you mean 100 MB, and not 100 MG.
Remember that when you backup a database, and you always use the same backup
file names, the backup files are appended onto the existing files unless you
use the INIT option. That may explain why the other file is so big. To
view the contents of each backup set within that file, use the RESTORE
HEADERONLY command.
Peter Yeoh
http://www.yohz.com
Need smaller backup files? Try MiniSQLBackup
"Rekiller" <incerbro@.cablenet.com.ni> wrote in message
news:3C6594E4-8049-413F-9705-1DAB3330519B@.microsoft.com...
> My MDF and LDF files sizes are like 100 MG each one.
> We bakup the database always. When we do this, we get 5 txt files with
information about the backup,
> one BAK file with size like my MDF file, but we get another BAK file that
have a BIG size, like 8 GB.
> What happened here?
>

I get confused about my MDF and LDF files against backup files

My MDF and LDF files sizes are like 100 MG each one.
We bakup the database always. When we do this, we get 5 txt files with infor
mation about the backup,
one BAK file with size like my MDF file, but we get another BAK file that ha
ve a BIG size, like 8 GB.
What happened here?I assume that you mean 100 MB, and not 100 MG.
Remember that when you backup a database, and you always use the same backup
file names, the backup files are appended onto the existing files unless you
use the INIT option. That may explain why the other file is so big. To
view the contents of each backup set within that file, use the RESTORE
HEADERONLY command.
Peter Yeoh
http://www.yohz.com
Need smaller backup files? Try MiniSQLBackup
"Rekiller" <incerbro@.cablenet.com.ni> wrote in message
news:3C6594E4-8049-413F-9705-1DAB3330519B@.microsoft.com...
> My MDF and LDF files sizes are like 100 MG each one.
> We bakup the database always. When we do this, we get 5 txt files with
information about the backup,
> one BAK file with size like my MDF file, but we get another BAK file that
have a BIG size, like 8 GB.
> What happened here?
>sql

I get confused about my MDF and LDF files against backup files

My MDF and LDF files sizes are like 100 MG each one
We bakup the database always. When we do this, we get 5 txt files with information about the backup
one BAK file with size like my MDF file, but we get another BAK file that have a BIG size, like 8 GB
What happened hereI assume that you mean 100 MB, and not 100 MG.
Remember that when you backup a database, and you always use the same backup
file names, the backup files are appended onto the existing files unless you
use the INIT option. That may explain why the other file is so big. To
view the contents of each backup set within that file, use the RESTORE
HEADERONLY command.
Peter Yeoh
http://www.yohz.com
Need smaller backup files? Try MiniSQLBackup
"Rekiller" <incerbro@.cablenet.com.ni> wrote in message
news:3C6594E4-8049-413F-9705-1DAB3330519B@.microsoft.com...
> My MDF and LDF files sizes are like 100 MG each one.
> We bakup the database always. When we do this, we get 5 txt files with
information about the backup,
> one BAK file with size like my MDF file, but we get another BAK file that
have a BIG size, like 8 GB.
> What happened here?
>

Wednesday, March 28, 2012

I don't remember how it was...

Using this system function (::fn_dblog(null,null)) you find out how many transactions are been confirmed in your .LDF. Although by means of another system function you can see further information, i mean statistical ones.

Any help would be very appreciated.

Hi,

how about this one here:

DBCC LOGINFO(db_id)

Select * from fn_dblog(null,null)

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

I don't remember how it was...

Using this system function (::fn_log(null,null)) you can find out how many transactions have been confirmed in your .LDF. Although by means of another system function you can see further information, such as statitical.

Any help would be very appreciated.

Thanks

There isn't a function by that name. There's a similarly named undocumented and unsupported function (that I'm not going to discuss) for use during troubleshooting by Product Support and the product group.

What exactly are you trying to find out?

I dont have any backup of my database, but I have the mdf's and ldf's files

Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:?
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
=B7"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
=B7Error: 823, Severity: 24, State: 6
=B7"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
=B7Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
=B7Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?=20
Thank you very much...:DSeems that the "magic" tool didnt work, database seem to be (physical)
corrupt.
Offset 0000000000000000 failure doent sounds good to me.
Jens Suessmeyer.
"in_the_middle" <mediodia@.gmail.com> schrieb im Newsbeitrag
news:1114002784.429829.178480@.f14g2000cwb.googlegroups.com...
Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:?
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
Error: 823, Severity: 24, State: 6
"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?
Thank you very much...:D|||I agree with Jens. You could try to open a case with MS support, but I have
little hope that they
can help you as the database files seem to be, at least partially, overwritt
en.
(I've listed one "repair/recovery" tool in my links page on my web site, but
I wouldn't have much
hope for that either...)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"in_the_middle" <mediodia@.gmail.com> wrote in message
news:1114002784.429829.178480@.f14g2000cwb.googlegroups.com...
Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:?
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
Error: 823, Severity: 24, State: 6
"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?
Thank you very much...:D|||you mean MSSQLRecovery ... I have tried it... It found 0 corrupt
files...
The content of the tables is important...But it is more important for
me recovering the Schema...(tables, stored procedures, indexes)...Do
you know any other tool which can help me to do this?
Thank you in advanced!|||I'm afraid that MSSQLRecovery is the only tool I know of. Sorry... :-(
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"in_the_middle" <mediodia@.gmail.com> wrote in message
news:1114004870.150171.315500@.f14g2000cwb.googlegroups.com...
> you mean MSSQLRecovery ... I have tried it... It found 0 corrupt
> files...
> The content of the tables is important...But it is more important for
> me recovering the Schema...(tables, stored procedures, indexes)...Do
> you know any other tool which can help me to do this?
> Thank you in advanced!
>|||You've had it I'm afraid - the database is physically corrupt (i.e. the OS
can't read the file from the disk) right at the start. You may be able to
get a data recovery service to salvage raw data from the drive, but that's
your only hope in this kind of hardware failure - there's nothing Product
Support can do to help.
Good luck.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"in_the_middle" <mediodia@.gmail.com> wrote in message
news:1114002784.429829.178480@.f14g2000cwb.googlegroups.com...
Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:?
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
Error: 823, Severity: 24, State: 6
"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?
Thank you very much...:D|||Thank you very much for all your attentionsql

I dont have any backup of my database, but I have the mdf's and ldf's files

Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:? :(
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
=B7"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
=B7Error: 823, Severity: 24, State: 6
=B7"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
=B7Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
=B7Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas? Thank you very much...:DSeems that the "magic" tool di´dn´t work, database seem to be (physical)
corrupt.
Offset 0000000000000000 failure doen´t sounds good to me.
Jens Suessmeyer.
"in_the_middle" <mediodia@.gmail.com> schrieb im Newsbeitrag
news:1114002784.429829.178480@.f14g2000cwb.googlegroups.com...
Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:? :(
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
·"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
·Error: 823, Severity: 24, State: 6
·"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
·Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
·Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?
Thank you very much...:D|||I agree with Jens. You could try to open a case with MS support, but I have little hope that they
can help you as the database files seem to be, at least partially, overwritten.
(I've listed one "repair/recovery" tool in my links page on my web site, but I wouldn't have much
hope for that either...)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"in_the_middle" <mediodia@.gmail.com> wrote in message
news:1114002784.429829.178480@.f14g2000cwb.googlegroups.com...
Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:? :(
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
·"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
·Error: 823, Severity: 24, State: 6
·"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
·Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
·Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?
Thank you very much...:D|||you mean MSSQLRecovery ... I have tried it... It found 0 corrupt
files...:( :(
The content of the tables is important...But it is more important for
me recovering the Schema...(tables, stored procedures, indexes)...Do
you know any other tool which can help me to do this?
Thank you in advanced!|||I'm afraid that MSSQLRecovery is the only tool I know of. Sorry... :-(
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"in_the_middle" <mediodia@.gmail.com> wrote in message
news:1114004870.150171.315500@.f14g2000cwb.googlegroups.com...
> you mean MSSQLRecovery ... I have tried it... It found 0 corrupt
> files...:( :(
> The content of the tables is important...But it is more important for
> me recovering the Schema...(tables, stored procedures, indexes)...Do
> you know any other tool which can help me to do this?
> Thank you in advanced!
>|||You've had it I'm afraid - the database is physically corrupt (i.e. the OS
can't read the file from the disk) right at the start. You may be able to
get a data recovery service to salvage raw data from the drive, but that's
your only hope in this kind of hardware failure - there's nothing Product
Support can do to help.
Good luck.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"in_the_middle" <mediodia@.gmail.com> wrote in message
news:1114002784.429829.178480@.f14g2000cwb.googlegroups.com...
Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:? :(
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
·"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
·Error: 823, Severity: 24, State: 6
·"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
·Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
·Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?
Thank you very much...:D|||Thank you very much for all your attention

I dont have any backup of my database, but I have the mdf's and ldf's files

Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:?
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
=B7"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
=B7Error: 823, Severity: 24, State: 6
=B7"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
=B7Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
=B7Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?=20
Thank you very much...:D
Seems that the "magic" tool didnt work, database seem to be (physical)
corrupt.
Offset 0000000000000000 failure doent sounds good to me.
Jens Suessmeyer.
"in_the_middle" <mediodia@.gmail.com> schrieb im Newsbeitrag
news:1114002784.429829.178480@.f14g2000cwb.googlegr oups.com...
Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:?
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
Error: 823, Severity: 24, State: 6
"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?
Thank you very much...:D
|||I agree with Jens. You could try to open a case with MS support, but I have little hope that they
can help you as the database files seem to be, at least partially, overwritten.
(I've listed one "repair/recovery" tool in my links page on my web site, but I wouldn't have much
hope for that either...)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"in_the_middle" <mediodia@.gmail.com> wrote in message
news:1114002784.429829.178480@.f14g2000cwb.googlegr oups.com...
Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:?
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
Error: 823, Severity: 24, State: 6
"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?
Thank you very much...:D
|||you mean MSSQLRecovery ... I have tried it... It found 0 corrupt
files...
The content of the tables is important...But it is more important for
me recovering the Schema...(tables, stored procedures, indexes)...Do
you know any other tool which can help me to do this?
Thank you in advanced!
|||I'm afraid that MSSQLRecovery is the only tool I know of. Sorry... :-(
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"in_the_middle" <mediodia@.gmail.com> wrote in message
news:1114004870.150171.315500@.f14g2000cwb.googlegr oups.com...
> you mean MSSQLRecovery ... I have tried it... It found 0 corrupt
> files...
> The content of the tables is important...But it is more important for
> me recovering the Schema...(tables, stored procedures, indexes)...Do
> you know any other tool which can help me to do this?
> Thank you in advanced!
>
|||You've had it I'm afraid - the database is physically corrupt (i.e. the OS
can't read the file from the disk) right at the start. You may be able to
get a data recovery service to salvage raw data from the drive, but that's
your only hope in this kind of hardware failure - there's nothing Product
Support can do to help.
Good luck.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"in_the_middle" <mediodia@.gmail.com> wrote in message
news:1114002784.429829.178480@.f14g2000cwb.googlegr oups.com...
Im trying to recover my database using the mdf and ldf files.
I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:?
Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:
"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.
Error: 823, Severity: 24, State: 6
"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file
Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.
When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
Could not open FCB for invalid file ID 0 in database 'Logs'.
Do you have any ideas?
Thank you very much...:D
|||Thank you very much for all your attention

I dont have any backup of my database, but I have the mdfs and ldfs files

Im trying to recover my database using the mdf and ldf files.

I dont have any backup and i have recovered two of the mdf files using
a tool which "discovers" deleted files after hard drive formatting...
It sounds cool, isnt it...:? :(

Obviously, i get a "suspect" message when the server starts and the log
file says this kind of things:

"Full Path\Name.MDF is not a primary database file." (This is one of
the files repaired using the magic tool.

Error: 823, Severity: 24, State: 6

"I/O error (torn page) detected during read at offset
0000000000000000 in file 'Full Pathi\Name2.mdf'... Name2.mdf is the
second file

Device activation error. The physical file name 'Full Path\Name2.mdf'
may be incorrect.

When i try to execute the command "DBCC CHECKDB ('Database_Name') WITH
PHYSICAL_ONLY" i get the following message :
Could not open FCB for invalid file ID 0 in database 'Logs'.

Do you have any ideas?
Thank you very much...:DIt sounds like the files are probably damaged beyond repair, or at
least beyond the sort of repairs that you can do without help from
Microsoft. If the contents of the database are valuable enough, I would
call MS to see if they can help you to recover the data, otherwise
you'll probably have to recreate everything.

And (obviously) you should plan a backup/restore strategy and a source
control system for your database code, to prevent any similar problems
in the future.

Simon|||Probably, thats what i'll do (call Microsoft asking for help help
help...:D )...

I swear this is the first time i dont plan a backup/restore
strategy... The database was configured a long time ago and I didnt
realize to do it...but i promise ill do the next time...:D

Anyway, I have run the demo tool MSSQLRecovery. This program analyze a
mdf file and recovers corrupt data. It has checked the tables, stored
procedures, indexes, relationships... and says that everything is
OK...but it doesnt generate any report...

Do you know any tool which recovers tables, stored procedures using the
primary mdf file?

Thank you in advanced

Monday, March 12, 2012

I am trying to attach a database through SQLDMO ...........

Problem is: "I am trying to attach a database through SQLDMO using VB6 In MSDE (Microsoft Sql Server Desktop Engine). If my '.mdf' and '.ldf' files are placed in a folder with Spaces then it give me error because it is picking up the folder name up to first space."

Try to give file paths between quotation marks. Something like sPath="\"c:\\program files\\MSSQL\\Data\\My file.mdf\"".