Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Tuesday, March 27, 2012

Error 9004 attaching a database

I've been given a database backup in the form of an .mdf file, a bunch
of .ndf files, and a .log file. When I try to attach the .mdf file in
Server Management Studio, I get error 9004, An error occurred while
processing the log.
Any suggestions?
Phil Hibbs.Phil,
Kevin Farlee's answer has helped a couple of people with your problem.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=598396&SiteID=1
RLF
"PhilHibbs" <snarks@.gmail.com> wrote in message
news:1193140510.353843.250240@.y27g2000pre.googlegroups.com...
> I've been given a database backup in the form of an .mdf file, a bunch
> of .ndf files, and a .log file. When I try to attach the .mdf file in
> Server Management Studio, I get error 9004, An error occurred while
> processing the log.
> Any suggestions?
> Phil Hibbs.
>|||On 23 Oct, 13:31, "Russell Fields" <russellfie...@.nomail.com> wrote:
> Kevin Farlee's answer has helped a couple of people with your problem.
> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=598396&SiteID=1
Hm, looked promising, but when I try to "bring online" the database
with the files replaced, I get a load of errors in this form:
E:\data\data_file_09.ndf is not a primary database file
I have a .mdf file and 26 .ndf files, it looks like the creation of
the empty database is creating these files in a different way to the
original database.
Phil Hibbs.|||Phil,
Did you first create the 26 ndf files in your database to be replaced before
trying to copy the files into place?
RLF
"PhilHibbs" <snarks@.gmail.com> wrote in message
news:1193148065.531336.193770@.e34g2000pro.googlegroups.com...
> On 23 Oct, 13:31, "Russell Fields" <russellfie...@.nomail.com> wrote:
>> Kevin Farlee's answer has helped a couple of people with your problem.
>> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=598396&SiteID=1
> Hm, looked promising, but when I try to "bring online" the database
> with the files replaced, I get a load of errors in this form:
> E:\data\data_file_09.ndf is not a primary database file
> I have a .mdf file and 26 .ndf files, it looks like the creation of
> the empty database is creating these files in a different way to the
> original database.
> Phil Hibbs.
>|||On 23 Oct, 20:15, "Russell Fields" <russellfie...@.nomail.com> wrote:
> Did you first create the 26 ndf files in your database to be replaced before
> trying to copy the files into place?
Yep. I made a big CREATE DATABASE statement with the .mdf and all
the .ndf files specified in it.
Phil Hibbs.|||On 23 Oct, 20:15, "Russell Fields" <russellfie...@.nomail.com> wrote:
> Did you first create the 26 ndf files in your database to be replaced before
> trying to copy the files into place?
Yep. I made a big CREATE DATABASE statement with the .mdf and all
the .ndf files specified in it.
Phil Hibbs.|||Phil,
I understand that you are using SQL Server 2005, since you mention
Management Studio. I have tested and not been able to duplicate your
problem. When you use SSMS to do the attach, have you pressed the Script
command at the top of the panel. This will provide an exact script of the
commands to be run. If you do that, perhaps you will see something helpful.
Or, you can post it here for review.
Obviously something is different between our setups. I am running SQL
Server 2005 SP2. Are you also running SP2? I ask because SP2 fixed some
Management Studio problems and you should update to it (plus some hotfixes)
if you have not done so.
This describe my patch level:
http://blogs.msdn.com/psssql/archive/2007/04/06/post-sql-server-2005-service-pack-2-sp2-fixes-explained.aspx
For more recent fixes, see also: http://support.microsoft.com/kb/937137/LN/
RLF
"PhilHibbs" <snarks@.gmail.com> wrote in message
news:1193222031.764752.35650@.v29g2000prd.googlegroups.com...
> On 23 Oct, 20:15, "Russell Fields" <russellfie...@.nomail.com> wrote:
>> Did you first create the 26 ndf files in your database to be replaced
>> before
>> trying to copy the files into place?
> Yep. I made a big CREATE DATABASE statement with the .mdf and all
> the .ndf files specified in it.
> Phil Hibbs.
>|||On 25 Oct, 17:34, "Russell Fields" <russellfie...@.nomail.com> wrote:
> I have tested and not been able to duplicate your
> problem.
I suspect that is because you don't have the same .mdf and .ndf
and .log files that I have.
Phil Hibbs.|||Phil, No doubt about that. Sorry this did not help. - RLF
"PhilHibbs" <snarks@.gmail.com> wrote in message
news:1193761341.010344.78000@.k79g2000hse.googlegroups.com...
> On 25 Oct, 17:34, "Russell Fields" <russellfie...@.nomail.com> wrote:
>> I have tested and not been able to duplicate your
>> problem.
> I suspect that is because you don't have the same .mdf and .ndf
> and .log files that I have.
> Phil Hibbs.
>

Error 9002 tempdb log file is full

Hi,
I've the following error message, which doesn't make sense to me.
The log file is not full, it has autogrow set to on and the disk drive on
which it
resides has 256GB free space. I hope i'm missing something and welcome
any suggestions on what to do or what to look at.
"Server: Msg 9002, Level 17, State 6, Line 1
The log file for database 'tempdb' is full. Back up the
transaction log for the database to free up some log space."If the application is requesting space in TempDB and the request interval is
faster than the disk can allocate the space then you will see this message
whilst the Autogrow is happening.
If you have this much space then try pre allocating a larger TempDB
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Stressed" <k@.c.co.uk> wrote in message
news:ufQ6UCJlDHA.2536@.tk2msftngp13.phx.gbl...
> Hi,
>
> I've the following error message, which doesn't make sense to me.
> The log file is not full, it has autogrow set to on and the disk drive on
> which it
> resides has 256GB free space. I hope i'm missing something and welcome
> any suggestions on what to do or what to look at.
>
> "Server: Msg 9002, Level 17, State 6, Line 1
>
> The log file for database 'tempdb' is full. Back up the
> transaction log for the database to free up some log space."
>|||Thanks for that, it all makes sense now.
"Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
news:O$FlXLJlDHA.1084@.tk2msftngp13.phx.gbl...
> If the application is requesting space in TempDB and the request interval
is
> faster than the disk can allocate the space then you will see this message
> whilst the Autogrow is happening.
> If you have this much space then try pre allocating a larger TempDB
>
> --
> --
> Allan Mitchell (Microsoft SQL Server MVP)
> MCSE,MCDBA
> www.SQLDTS.com
> I support PASS - the definitive, global community
> for SQL Server professionals - http://www.sqlpass.org
> "Stressed" <k@.c.co.uk> wrote in message
> news:ufQ6UCJlDHA.2536@.tk2msftngp13.phx.gbl...
> > Hi,
> >
> >
> >
> > I've the following error message, which doesn't make sense to me.
> >
> > The log file is not full, it has autogrow set to on and the disk drive
on
> > which it
> >
> > resides has 256GB free space. I hope i'm missing something and welcome
> >
> > any suggestions on what to do or what to look at.
> >
> >
> >
> > "Server: Msg 9002, Level 17, State 6, Line 1
> >
> >
> >
> > The log file for database 'tempdb' is full. Back up the
> >
> > transaction log for the database to free up some log space."
> >
> >
>|||Just to add - check with Profiler what is going on. TempDb could be a target
of a DoS attack.
--
Dejan Sarka, SQL Server MVP
Please reply only to the newsgroups.
"Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
news:O$FlXLJlDHA.1084@.tk2msftngp13.phx.gbl...
> If the application is requesting space in TempDB and the request interval
is
> faster than the disk can allocate the space then you will see this message
> whilst the Autogrow is happening.
> If you have this much space then try pre allocating a larger TempDB
>
> --
> --
> Allan Mitchell (Microsoft SQL Server MVP)
> MCSE,MCDBA
> www.SQLDTS.com
> I support PASS - the definitive, global community
> for SQL Server professionals - http://www.sqlpass.org
> "Stressed" <k@.c.co.uk> wrote in message
> news:ufQ6UCJlDHA.2536@.tk2msftngp13.phx.gbl...
> > Hi,
> >
> >
> >
> > I've the following error message, which doesn't make sense to me.
> >
> > The log file is not full, it has autogrow set to on and the disk drive
on
> > which it
> >
> > resides has 256GB free space. I hope i'm missing something and welcome
> >
> > any suggestions on what to do or what to look at.
> >
> >
> >
> > "Server: Msg 9002, Level 17, State 6, Line 1
> >
> >
> >
> > The log file for database 'tempdb' is full. Back up the
> >
> > transaction log for the database to free up some log space."
> >
> >
>|||The server isn't exposed to the outside world, although the point has been
taken
on board for future occurences of the same.
Thanks.
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:OPFEUOJlDHA.3024@.tk2msftngp13.phx.gbl...
> Just to add - check with Profiler what is going on. TempDb could be a
target
> of a DoS attack.
> --
> Dejan Sarka, SQL Server MVP
> Please reply only to the newsgroups.
> "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> news:O$FlXLJlDHA.1084@.tk2msftngp13.phx.gbl...
> > If the application is requesting space in TempDB and the request
interval
> is
> > faster than the disk can allocate the space then you will see this
message
> > whilst the Autogrow is happening.
> >
> > If you have this much space then try pre allocating a larger TempDB
> >
> >
> >
> > --
> > --
> >
> > Allan Mitchell (Microsoft SQL Server MVP)
> > MCSE,MCDBA
> > www.SQLDTS.com
> > I support PASS - the definitive, global community
> > for SQL Server professionals - http://www.sqlpass.org
> >
> > "Stressed" <k@.c.co.uk> wrote in message
> > news:ufQ6UCJlDHA.2536@.tk2msftngp13.phx.gbl...
> > > Hi,
> > >
> > >
> > >
> > > I've the following error message, which doesn't make sense to me.
> > >
> > > The log file is not full, it has autogrow set to on and the disk drive
> on
> > > which it
> > >
> > > resides has 256GB free space. I hope i'm missing something and welcome
> > >
> > > any suggestions on what to do or what to look at.
> > >
> > >
> > >
> > > "Server: Msg 9002, Level 17, State 6, Line 1
> > >
> > >
> > >
> > > The log file for database 'tempdb' is full. Back up the
> > >
> > > transaction log for the database to free up some log space."
> > >
> > >
> >
> >
>sql

error 9002 occur

I found this error on my sql server:
The log file for database dbname is full. Back up the transaction log for
the database to free up some log space.
Then I run the backup program for transaction log, now my sql can work fine.
But the .LDF file still very big. Can I decrease this file's size?
Such as defrag or compress'Dear all:
I've check the file again and find out that the .LDF file was smaller then
before!
From 3G to 1M !!! I think its because the backup.
But why not change size immedialy?
Thank you very much!
"LetsCount" <come2@.ms1.pchome.com.tw> ¦b¶l¥ó
news:u82uPwQxDHA.2356@.TK2MSFTNGP12.phx.gbl ¤¤¼¶¼g...
> I found this error on my sql server:
> The log file for database dbname is full. Back up the transaction log for
> the database to free up some log space.
> Then I run the backup program for transaction log, now my sql can work
fine.
> But the .LDF file still very big. Can I decrease this file's size?
> Such as defrag or compress'
>|||Check out below KB articles:
INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/default.aspx?scid=kb;en-us;256650
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/default.aspx?scid=kb;en-us;272318
Log File Grows too big
http://www.support.microsoft.com/?id=317375
Log file filling up
http://www.support.microsoft.com/?id=110139
Considerations for Autogrow and AutoShrink
http://www.support.microsoft.com/?id=315512
http://www.mssqlserver.com/faq/logs-shrinklog.asp
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"LetsCount" <come2@.ms1.pchome.com.tw> wrote in message news:u82uPwQxDHA.2356@.TK2MSFTNGP12.phx.gbl...
> I found this error on my sql server:
> The log file for database dbname is full. Back up the transaction log for
> the database to free up some log space.
> Then I run the backup program for transaction log, now my sql can work fine.
> But the .LDF file still very big. Can I decrease this file's size?
> Such as defrag or compress'
>

Error 8985 cannot locate file xxx in sysfiles

I am attempting to shrink a datafile (I have 2 primary data files) when I
receive this error message 'Error 8985 cannot locate file xxx in sysfiles'.
I have repeatedly verified the data file name and even did a 'cut n paste'
into a query in qa dbcc shrinkfile with the same results. I have no
problem shrinking the second file and the log file through either method.
I even ran dbcc shrinkfile (3, emptyfile) moving all data to the problem
file. After removing the second datafile I created a new second datafile
in the primary filegroup and am in the process of moving the data to the
new file. Hopefully I will be able to remove the problem file afterward.
Although I suspect this will still not work because I will have to use the
logical file name and not the number.
Any help will be greatly appreciated!
Thanks
Message posted via http://www.sqlmonster.com
You did a cut and paste from where? What column of what
query? Generally the error is due to referencing the
physical file name and not the logical file name. It's hard
to tell as you example is using the file id which is fine as
well. Also, make sure you are in the correct database when
getting the logical file name or id and when executing the
shrinkfile. If you are selecting from sysfiles or executing
sp_helpdb to get the name, it applies to the current
database only. If it still fails and you aren't using
fileid, try using that instead. It could be an issue with
the logical file name not following the rules for
identifiers.
-Sue
On Wed, 02 Mar 2005 19:49:01 GMT, "andy williams via
SQLMonster.com" <forum@.SQLMonster.com> wrote:

>I am attempting to shrink a datafile (I have 2 primary data files) when I
>receive this error message 'Error 8985 cannot locate file xxx in sysfiles'.
>I have repeatedly verified the data file name and even did a 'cut n paste'
>into a query in qa dbcc shrinkfile with the same results. I have no
>problem shrinking the second file and the log file through either method.
>I even ran dbcc shrinkfile (3, emptyfile) moving all data to the problem
>file. After removing the second datafile I created a new second datafile
>in the primary filegroup and am in the process of moving the data to the
>new file. Hopefully I will be able to remove the problem file afterward.
>Although I suspect this will still not work because I will have to use the
>logical file name and not the number.
>Any help will be greatly appreciated!
>Thanks

Error 8985 cannot locate file xxx in sysfiles

I am attempting to shrink a datafile (I have 2 primary data files) when I
receive this error message 'Error 8985 cannot locate file xxx in sysfiles'.
I have repeatedly verified the data file name and even did a 'cut n paste'
into a query in qa dbcc shrinkfile with the same results. I have no
problem shrinking the second file and the log file through either method.
I even ran dbcc shrinkfile (3, emptyfile) moving all data to the problem
file. After removing the second datafile I created a new second datafile
in the primary filegroup and am in the process of moving the data to the
new file. Hopefully I will be able to remove the problem file afterward.
Although I suspect this will still not work because I will have to use the
logical file name and not the number.
Any help will be greatly appreciated!
Thanks
Message posted via http://www.droptable.comYou did a cut and paste from where? What column of what
query? Generally the error is due to referencing the
physical file name and not the logical file name. It's hard
to tell as you example is using the file id which is fine as
well. Also, make sure you are in the correct database when
getting the logical file name or id and when executing the
shrinkfile. If you are selecting from sysfiles or executing
sp_helpdb to get the name, it applies to the current
database only. If it still fails and you aren't using
fileid, try using that instead. It could be an issue with
the logical file name not following the rules for
identifiers.
-Sue
On Wed, 02 Mar 2005 19:49:01 GMT, "andy williams via
droptable.com" <forum@.droptable.com> wrote:

>I am attempting to shrink a datafile (I have 2 primary data files) when I
>receive this error message 'Error 8985 cannot locate file xxx in sysfiles'.
>I have repeatedly verified the data file name and even did a 'cut n paste'
>into a query in qa dbcc shrinkfile with the same results. I have no
>problem shrinking the second file and the log file through either method.
>I even ran dbcc shrinkfile (3, emptyfile) moving all data to the problem
>file. After removing the second datafile I created a new second datafile
>in the primary filegroup and am in the process of moving the data to the
>new file. Hopefully I will be able to remove the problem file afterward.
>Although I suspect this will still not work because I will have to use the
>logical file name and not the number.
>Any help will be greatly appreciated!
>Thanks

error 8985

Hi folks,
When I shrink database, the system raise error 8985: Could not locate file 'databasename_dat' in sysfiles.
Does anyone has experience to solve this error...?
thanks
Sjaiful BahriThis typically means that you've had a device (disk drive) go offline. There is rarely any way to recover unless you can either bring the device back online or restore a backup to another disk.

-PatP

Monday, March 26, 2012

Error 823: I/O error (torn page) detected during read at offset...

Hi,
HDD failure caused to move the data to a new disk. We are no longer able to
attach the MDF file. I searched a lot but all of solutions work only when
the database is running under SQL Server and is suspected, not for me
(detached database).
I get this error when trying to attach the MDF file:
Error 823: I/O error (torn page) detected during read at offset
(0x0000036cba0000 in file 'D:\Data\Data_file)
Unfortunately the backup is 2 hours behind from the failure!
Any help would be greatly appreciated.
LeilaLeila (Leilas@.hotpop.com) writes:
> Date: Sun, 23 Apr 2006 20:49:51 +0430
Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.

> HDD failure caused to move the data to a new disk. We are no longer able
> to attach the MDF file. I searched a lot but all of solutions work only
> when the database is running under SQL Server and is suspected, not for
> me (detached database).
> I get this error when trying to attach the MDF file:
> Error 823: I/O error (torn page) detected during read at offset
> (0x0000036cba0000 in file 'D:\Data\Data_file)
> Unfortunately the backup is 2 hours behind from the failure!
> Any help would be greatly appreciated.
Well, at least there is a backup!
I have no idea how to handle the situation, and the only advice would
be to open a case with Microsoft, but I realise that this may not be
easy where you are located.
I'll inquire with Microsoft, but I would have too much hope.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||> Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
I really don't know what's wrong with my clock :-(

> I'll inquire with Microsoft, but I would have too much hope.
Thanks indeed!
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97AE9408A75F1Yazorman@.127.0.0.1...
> Leila (Leilas@.hotpop.com) writes:
> Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
>
> Well, at least there is a backup!
> I have no idea how to handle the situation, and the only advice would
> be to open a case with Microsoft, but I realise that this may not be
> easy where you are located.
> I'll inquire with Microsoft, but I would have too much hope.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Leila (Leilas@.hotpop.com) writes:
> I really don't know what's wrong with my clock :-(
As we say up here "Time goes fast, when you're having fun!". :-)
[vbcol=seagreen]
One suggestion I got from a fellow MVP was:
How about stopping SS, renaming the corrupted database files, starting
SS, create new database with same filenames as corrupted db had
originally, stopping SS, removing new database files and then renaming
corrupted db backup to the original names? SQL Server will possibly
recover the database fine...
If I were to do this operation, I would make sure that I have a copy of
the bad database files, to keep a starting point.
I'm a little skeptic that the above actually works. I guess that whar
you are really after is the transaction log, so you can back it up, and
apply it to the backup, so you don't lose those two hours of work.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Leila,
If you can read Russian, or fill in the gaps with
some online translation, this might help:
http://www.sql.ru/faq/faq_topic.aspx?fid=123
Steve Kass
Drew University
Leila wrote:

>I really don't know what's wrong with my clock :-(
>
>
>Thanks indeed!
>
>
>"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>news:Xns97AE9408A75F1Yazorman@.127.0.0.1...
>
>
>|||> As we say up here "Time goes fast, when you're having fun!". :-)
lol! We say exactly the same thing here! But it seems my notebook is having
fun, not me!

> How about stopping SS, renaming the corrupted database files, starting...
oops! Really tricky! I must try it...
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97AECB33EE3F0Yazorman@.127.0.0.1...
> Leila (Leilas@.hotpop.com) writes:
> As we say up here "Time goes fast, when you're having fun!". :-)
>
> One suggestion I got from a fellow MVP was:
> How about stopping SS, renaming the corrupted database files, starting
> SS, create new database with same filenames as corrupted db had
> originally, stopping SS, removing new database files and then renaming
> corrupted db backup to the original names? SQL Server will possibly
> recover the database fine...
> If I were to do this operation, I would make sure that I have a copy of
> the bad database files, to keep a starting point.
> I'm a little skeptic that the above actually works. I guess that whar
> you are really after is the transaction log, so you can back it up, and
> apply it to the backup, so you don't lose those two hours of work.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thanks Steve!
Unfortunately I cannot read Russian but the TSQL seems that you must at
least
have your database attached to SQL Server before using that instruction?
"Steve Kass" <skass@.drew.edu> wrote in message
news:%23dKWuUwZGHA.3532@.TK2MSFTNGP05.phx.gbl...[vbcol=seagreen]
> Leila,
> If you can read Russian, or fill in the gaps with
> some online translation, this might help:
> http://www.sql.ru/faq/faq_topic.aspx?fid=123
> Steve Kass
> Drew University
> Leila wrote:
>|||Leila (Leilas@.hotpop.com) writes:
> Unfortunately I cannot read Russian but the TSQL seems that you must at
> least
> have your database attached to SQL Server before using that instruction?
Which can be solved by creating a database, and the throwing the files
for that away, and then slapping the files for the broken database in
place.
However, I doubt that this is the solution to your problem. That script
seems to create an empty log file, and if I understand correctly, the
log file is what you want to be able to access?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Leila (Leilas@.hotpop.com) writes:
> HDD failure caused to move the data to a new disk. We are no longer able
> to attach the MDF file. I searched a lot but all of solutions work only
> when the database is running under SQL Server and is suspected, not for
> me (detached database). I get this error when trying to attach the MDF
> file: Error 823: I/O error (torn page) detected during read at offset
> (0x0000036cba0000 in file 'D:\Data\Data_file)
> Unfortunately the backup is 2 hours behind from the failure!
> Any help would be greatly appreciated.
I guess that you by now already have restored that two-hour old backup.
Unfortunately, it took some time to find out the correct procedure.
It is described on
http://www.sqljunkies.com/HowTo/F5B...8DDB08B0C1.scuk
With quite some help of some MVP colleagues I developed the demo script
below, to illustrate the procedure.
It assumes that you know the name and location of your log files, but
with a full backup available, it should not be difficult to work out.
-- See also
-- http://www.sqljunkies.com/HowTo/F5B...8DDB08B0C1.scuk
-- First take a copy of Northwind that we can mess up a bit.
BACKUP DATABASE Northwind to disk = 'c:\temp\Northwind.bak'
go
RESTORE DATABASE northbreeze from disk = 'c:\temp\Northwind.bak'
WITH MOVE 'Northwind' TO 'C:\temp\northbreeze.mdf',
MOVE 'Northwind_log' TO 'C:\temp\northbreeze.ldf',
REPLACE
go
-- And make sure that it has full recovery.
ALTER DATABASE northbreeze SET RECOVERY FULL
go
USE northbreeze
go
-- Let's add a new customer to northbreeze.
INSERT Customers (CustomerID, CompanyName, ContactName,
ContactTitle, Address, City, Region, PostalCode,
Country, Phone, Fax)
VALUES ('GARBO', 'Greta Garbos Deliktatesshandel', 'Frk. Gustafsson',
'Frken', 'Mosebacke Torg 12', 'Stockholm', NULL, '11223',
'Sweden', '+46-8-90510', NULL)
go
-- Make sure that this database is backed up on its own. Backup the log
-- as well.
BACKUP DATABASE northbreeze to disk = 'c:\temp\Northbreeze.bak'
BACKUP LOG northbreeze to disk = 'c:\temp\Northbreeze.logbak'
go
-- Perform further updates in the database.
DELETE Customers
FROM Customers C
WHERE NOT EXISTS (SELECT *
FROM Orders O
WHERE O.CustomerID = C.CustomerID)
AND C.CustomerID <> 'GARBO'
go
-- Go to master
USE master
go
-- And detach database
EXEC sp_detach_db northbreeze
go
-- Assume that something bad happens to the MDF file while it is detached.
-- First step is to rename the files. (Although we could toss the bsd MDF
-- file.)
EXEC xp_cmdshell 'MOVE c:\temp\northbreeze.mdf c:\temp\northbreeze-
crashed.mdf'
EXEC xp_cmdshell 'MOVE c:\temp\northbreeze.ldf c:\temp\northbreeze-
crashed.ldf'
go
-- Create a new empty database were we want the real thing to be. Make sure
-- that we have full recovery-
CREATE DATABASE northbreeze
ON (NAME = 'Northwind', FILENAME = 'C:\temp\northbreeze.mdf')
LOG ON (NAME = 'Northwind.log', FILENAME = 'C:\temp\northbreeze.ldf')
ALTER DATABASE northbreeze SET RECOVERY FULL
go
-- Shut down SQL Server.
SHUTDOWN
go
-- In file system do this:
-- 1) move northbreeze.mdf to northbreeze-dummy.mdf (or delete it)
-- 1) move northbreeze.ldf to northbreeze-dummy.ldf (or delete it)
-- 2) move northbreeze-crashed.ldf to northbreeze.ldf
-- Start server again
go
-- The northbreeze database does at this point consist of the log file only!
-- (Or SQL Server created a new MDF; I did not check.)
-- We can now back up the tail of the log. Note NO_TRUNCATE!
BACKUP LOG northbreeze TO DISK = 'C:\temp\northbreeze-tail.logbak'
WITH NO_TRUNCATE
go
-- Drop the database
DROP DATABASE northbreeze
go
-- The log file may still be there, just move it out of the way.
EXEC xp_cmdshell
'MOVE c:\temp\northbreeze.ldf c:\temp\northbreeze-crashed.ldf'
go
-- Restore the database, use no NORECOVER, as we will apply logs as well.
RESTORE DATABASE northbreeze from disk = 'c:\temp\Northbreeze.bak'
WITH NORECOVERY
-- Restore the fist log dump.
RESTORE LOG northbreeze from disk = 'C:\temp\northbreeze.logbak'
WITH NORECOVERY
-- Apply the tail log.
RESTORE LOG northbreeze from disk = 'C:\temp\northbreeze-tail.logbak'
go
-- Verify that northbreeze != Northwind.
SELECT a.CustomerID, b.CustomerID
FROM Northwind..Customers a
FULL JOIN northbreeze..Customers b ON a.CustomerID = b.CustomerID
WHERE a.CustomerID IS NULL OR
b.CustomerID IS NULL
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Error 823: I/O error (torn page) detected during read at offset...

Hi,
HDD failure caused to move the data to a new disk. We are no longer able to
attach the MDF file. I searched a lot but all of solutions work only when
the database is running under SQL Server and is suspected, not for me
(detached database).
I get this error when trying to attach the MDF file:
Error 823: I/O error (torn page) detected during read at offset
(0x0000036cba0000 in file 'D:\Data\Data_file)
Unfortunately the backup is 2 hours behind from the failure!
Any help would be greatly appreciated.
LeilaLeila (Leilas@.hotpop.com) writes:
> Date: Sun, 23 Apr 2006 20:49:51 +0430
Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.

> HDD failure caused to move the data to a new disk. We are no longer able
> to attach the MDF file. I searched a lot but all of solutions work only
> when the database is running under SQL Server and is suspected, not for
> me (detached database).
> I get this error when trying to attach the MDF file:
> Error 823: I/O error (torn page) detected during read at offset
> (0x0000036cba0000 in file 'D:\Data\Data_file)
> Unfortunately the backup is 2 hours behind from the failure!
> Any help would be greatly appreciated.
Well, at least there is a backup!
I have no idea how to handle the situation, and the only advice would
be to open a case with Microsoft, but I realise that this may not be
easy where you are located.
I'll inquire with Microsoft, but I would have too much hope.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||> Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
I really don't know what's wrong with my clock :-(

> I'll inquire with Microsoft, but I would have too much hope.
Thanks indeed!
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97AE9408A75F1Yazorman@.127.0.0.1...
> Leila (Leilas@.hotpop.com) writes:
> Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
>
> Well, at least there is a backup!
> I have no idea how to handle the situation, and the only advice would
> be to open a case with Microsoft, but I realise that this may not be
> easy where you are located.
> I'll inquire with Microsoft, but I would have too much hope.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Leila (Leilas@.hotpop.com) writes:
> I really don't know what's wrong with my clock :-(
As we say up here "Time goes fast, when you're having fun!". :-)
One suggestion I got from a fellow MVP was:
How about stopping SS, renaming the corrupted database files, starting
SS, create new database with same filenames as corrupted db had
originally, stopping SS, removing new database files and then renaming
corrupted db backup to the original names? SQL Server will possibly
recover the database fine...
If I were to do this operation, I would make sure that I have a copy of
the bad database files, to keep a starting point.
I'm a little skeptic that the above actually works. I guess that whar
you are really after is the transaction log, so you can back it up, and
apply it to the backup, so you don't lose those two hours of work.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Leila,
If you can read Russian, or fill in the gaps with
some online translation, this might help:
http://www.sql.ru/faq/faq_topic.aspx?fid=123
Steve Kass
Drew University
Leila wrote:

>I really don't know what's wrong with my clock :-(
>
>
>Thanks indeed!
>
>
>"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>news:Xns97AE9408A75F1Yazorman@.127.0.0.1...
>
>
>|||> As we say up here "Time goes fast, when you're having fun!". :-)
lol! We say exactly the same thing here! But it seems my notebook is having
fun, not me!

> How about stopping SS, renaming the corrupted database files, starting...
oops! Really tricky! I must try it...
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97AECB33EE3F0Yazorman@.127.0.0.1...
> Leila (Leilas@.hotpop.com) writes:
> As we say up here "Time goes fast, when you're having fun!". :-)
>
> One suggestion I got from a fellow MVP was:
> How about stopping SS, renaming the corrupted database files, starting
> SS, create new database with same filenames as corrupted db had
> originally, stopping SS, removing new database files and then renaming
> corrupted db backup to the original names? SQL Server will possibly
> recover the database fine...
> If I were to do this operation, I would make sure that I have a copy of
> the bad database files, to keep a starting point.
> I'm a little skeptic that the above actually works. I guess that whar
> you are really after is the transaction log, so you can back it up, and
> apply it to the backup, so you don't lose those two hours of work.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thanks Steve!
Unfortunately I cannot read Russian but the TSQL seems that you must at
least
have your database attached to SQL Server before using that instruction?
"Steve Kass" <skass@.drew.edu> wrote in message
news:%23dKWuUwZGHA.3532@.TK2MSFTNGP05.phx.gbl...
> Leila,
> If you can read Russian, or fill in the gaps with
> some online translation, this might help:
> http://www.sql.ru/faq/faq_topic.aspx?fid=123
> Steve Kass
> Drew University
> Leila wrote:
>|||Leila (Leilas@.hotpop.com) writes:
> Unfortunately I cannot read Russian but the TSQL seems that you must at
> least
> have your database attached to SQL Server before using that instruction?
Which can be solved by creating a database, and the throwing the files
for that away, and then slapping the files for the broken database in
place.
However, I doubt that this is the solution to your problem. That script
seems to create an empty log file, and if I understand correctly, the
log file is what you want to be able to access?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Leila (Leilas@.hotpop.com) writes:
> HDD failure caused to move the data to a new disk. We are no longer able
> to attach the MDF file. I searched a lot but all of solutions work only
> when the database is running under SQL Server and is suspected, not for
> me (detached database). I get this error when trying to attach the MDF
> file: Error 823: I/O error (torn page) detected during read at offset
> (0x0000036cba0000 in file 'D:\Data\Data_file)
> Unfortunately the backup is 2 hours behind from the failure!
> Any help would be greatly appreciated.
I guess that you by now already have restored that two-hour old backup.
Unfortunately, it took some time to find out the correct procedure.
It is described on
http://www.sqljunkies.com/HowTo/F5B...8DDB08B0C1.scuk
With quite some help of some MVP colleagues I developed the demo script
below, to illustrate the procedure.
It assumes that you know the name and location of your log files, but
with a full backup available, it should not be difficult to work out.
-- See also
-- http://www.sqljunkies.com/HowTo/F5B...8DDB08B0C1.scuk
-- First take a copy of Northwind that we can mess up a bit.
BACKUP DATABASE Northwind to disk = 'c:\temp\Northwind.bak'
go
RESTORE DATABASE northbreeze from disk = 'c:\temp\Northwind.bak'
WITH MOVE 'Northwind' TO 'C:\temp\northbreeze.mdf',
MOVE 'Northwind_log' TO 'C:\temp\northbreeze.ldf',
REPLACE
go
-- And make sure that it has full recovery.
ALTER DATABASE northbreeze SET RECOVERY FULL
go
USE northbreeze
go
-- Let's add a new customer to northbreeze.
INSERT Customers (CustomerID, CompanyName, ContactName,
ContactTitle, Address, City, Region, PostalCode,
Country, Phone, Fax)
VALUES ('GARBO', 'Greta Garbos Deliktatesshandel', 'Frk. Gustafsson',
'Frken', 'Mosebacke Torg 12', 'Stockholm', NULL, '11223',
'Sweden', '+46-8-90510', NULL)
go
-- Make sure that this database is backed up on its own. Backup the log
-- as well.
BACKUP DATABASE northbreeze to disk = 'c:\temp\Northbreeze.bak'
BACKUP LOG northbreeze to disk = 'c:\temp\Northbreeze.logbak'
go
-- Perform further updates in the database.
DELETE Customers
FROM Customers C
WHERE NOT EXISTS (SELECT *
FROM Orders O
WHERE O.CustomerID = C.CustomerID)
AND C.CustomerID <> 'GARBO'
go
-- Go to master
USE master
go
-- And detach database
EXEC sp_detach_db northbreeze
go
-- Assume that something bad happens to the MDF file while it is detached.
-- First step is to rename the files. (Although we could toss the bsd MDF
-- file.)
EXEC xp_cmdshell 'MOVE c:\temp\northbreeze.mdf c:\temp\northbreeze-
crashed.mdf'
EXEC xp_cmdshell 'MOVE c:\temp\northbreeze.ldf c:\temp\northbreeze-
crashed.ldf'
go
-- Create a new empty database were we want the real thing to be. Make sure
-- that we have full recovery-
CREATE DATABASE northbreeze
ON (NAME = 'Northwind', FILENAME = 'C:\temp\northbreeze.mdf')
LOG ON (NAME = 'Northwind.log', FILENAME = 'C:\temp\northbreeze.ldf')
ALTER DATABASE northbreeze SET RECOVERY FULL
go
-- Shut down SQL Server.
SHUTDOWN
go
-- In file system do this:
-- 1) move northbreeze.mdf to northbreeze-dummy.mdf (or delete it)
-- 1) move northbreeze.ldf to northbreeze-dummy.ldf (or delete it)
-- 2) move northbreeze-crashed.ldf to northbreeze.ldf
-- Start server again
go
-- The northbreeze database does at this point consist of the log file only!
-- (Or SQL Server created a new MDF; I did not check.)
-- We can now back up the tail of the log. Note NO_TRUNCATE!
BACKUP LOG northbreeze TO DISK = 'C:\temp\northbreeze-tail.logbak'
WITH NO_TRUNCATE
go
-- Drop the database
DROP DATABASE northbreeze
go
-- The log file may still be there, just move it out of the way.
EXEC xp_cmdshell
'MOVE c:\temp\northbreeze.ldf c:\temp\northbreeze-crashed.ldf'
go
-- Restore the database, use no NORECOVER, as we will apply logs as well.
RESTORE DATABASE northbreeze from disk = 'c:\temp\Northbreeze.bak'
WITH NORECOVERY
-- Restore the fist log dump.
RESTORE LOG northbreeze from disk = 'C:\temp\northbreeze.logbak'
WITH NORECOVERY
-- Apply the tail log.
RESTORE LOG northbreeze from disk = 'C:\temp\northbreeze-tail.logbak'
go
-- Verify that northbreeze != Northwind.
SELECT a.CustomerID, b.CustomerID
FROM Northwind..Customers a
FULL JOIN northbreeze..Customers b ON a.CustomerID = b.CustomerID
WHERE a.CustomerID IS NULL OR
b.CustomerID IS NULL
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspxsql

Error 823: I/O error (torn page) detected during read at offset...

Hi,
HDD failure caused to move the data to a new disk. We are no longer able to
attach the MDF file. I searched a lot but all of solutions work only when
the database is running under SQL Server and is suspected, not for me
(detached database).
I get this error when trying to attach the MDF file:
Error 823: I/O error (torn page) detected during read at offset
(0x0000036cba0000 in file 'D:\Data\Data_file)
Unfortunately the backup is 2 hours behind from the failure!
Any help would be greatly appreciated.
LeilaLeila (Leilas@.hotpop.com) writes:
> Date: Sun, 23 Apr 2006 20:49:51 +0430
Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
> HDD failure caused to move the data to a new disk. We are no longer able
> to attach the MDF file. I searched a lot but all of solutions work only
> when the database is running under SQL Server and is suspected, not for
> me (detached database).
> I get this error when trying to attach the MDF file:
> Error 823: I/O error (torn page) detected during read at offset
> (0x0000036cba0000 in file 'D:\Data\Data_file)
> Unfortunately the backup is 2 hours behind from the failure!
> Any help would be greatly appreciated.
Well, at least there is a backup!
I have no idea how to handle the situation, and the only advice would
be to open a case with Microsoft, but I realise that this may not be
easy where you are located.
I'll inquire with Microsoft, but I would have too much hope.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||> Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
I really don't know what's wrong with my clock :-(
> I'll inquire with Microsoft, but I would have too much hope.
Thanks indeed!
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97AE9408A75F1Yazorman@.127.0.0.1...
> Leila (Leilas@.hotpop.com) writes:
>> Date: Sun, 23 Apr 2006 20:49:51 +0430
> Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
>> HDD failure caused to move the data to a new disk. We are no longer able
>> to attach the MDF file. I searched a lot but all of solutions work only
>> when the database is running under SQL Server and is suspected, not for
>> me (detached database).
>> I get this error when trying to attach the MDF file:
>> Error 823: I/O error (torn page) detected during read at offset
>> (0x0000036cba0000 in file 'D:\Data\Data_file)
>> Unfortunately the backup is 2 hours behind from the failure!
>> Any help would be greatly appreciated.
> Well, at least there is a backup!
> I have no idea how to handle the situation, and the only advice would
> be to open a case with Microsoft, but I realise that this may not be
> easy where you are located.
> I'll inquire with Microsoft, but I would have too much hope.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||Leila (Leilas@.hotpop.com) writes:
>> Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
> I really don't know what's wrong with my clock :-(
As we say up here "Time goes fast, when you're having fun!". :-)
>> I'll inquire with Microsoft, but I would have too much hope.
One suggestion I got from a fellow MVP was:
How about stopping SS, renaming the corrupted database files, starting
SS, create new database with same filenames as corrupted db had
originally, stopping SS, removing new database files and then renaming
corrupted db backup to the original names? SQL Server will possibly
recover the database fine...
If I were to do this operation, I would make sure that I have a copy of
the bad database files, to keep a starting point.
I'm a little skeptic that the above actually works. I guess that whar
you are really after is the transaction log, so you can back it up, and
apply it to the backup, so you don't lose those two hours of work.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||Leila,
If you can read Russian, or fill in the gaps with
some online translation, this might help:
http://www.sql.ru/faq/faq_topic.aspx?fid=123
Steve Kass
Drew University
Leila wrote:
>>Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
>>
>I really don't know what's wrong with my clock :-(
>
>>I'll inquire with Microsoft, but I would have too much hope.
>>
>Thanks indeed!
>
>
>"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>news:Xns97AE9408A75F1Yazorman@.127.0.0.1...
>
>>Leila (Leilas@.hotpop.com) writes:
>>
>>Date: Sun, 23 Apr 2006 20:49:51 +0430
>>
>>Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
>>
>>HDD failure caused to move the data to a new disk. We are no longer able
>>to attach the MDF file. I searched a lot but all of solutions work only
>>when the database is running under SQL Server and is suspected, not for
>>me (detached database).
>>I get this error when trying to attach the MDF file:
>>Error 823: I/O error (torn page) detected during read at offset
>>(0x0000036cba0000 in file 'D:\Data\Data_file)
>>Unfortunately the backup is 2 hours behind from the failure!
>>Any help would be greatly appreciated.
>>
>>Well, at least there is a backup!
>>I have no idea how to handle the situation, and the only advice would
>>be to open a case with Microsoft, but I realise that this may not be
>>easy where you are located.
>>I'll inquire with Microsoft, but I would have too much hope.
>>
>>--
>>Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>Books Online for SQL Server 2005 at
>>http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
>>Books Online for SQL Server 2000 at
>>http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>>
>
>|||> As we say up here "Time goes fast, when you're having fun!". :-)
lol! We say exactly the same thing here! But it seems my notebook is having
fun, not me!
> How about stopping SS, renaming the corrupted database files, starting...
oops! Really tricky! I must try it...
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97AECB33EE3F0Yazorman@.127.0.0.1...
> Leila (Leilas@.hotpop.com) writes:
>> Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
>> I really don't know what's wrong with my clock :-(
> As we say up here "Time goes fast, when you're having fun!". :-)
>
>> I'll inquire with Microsoft, but I would have too much hope.
> One suggestion I got from a fellow MVP was:
> How about stopping SS, renaming the corrupted database files, starting
> SS, create new database with same filenames as corrupted db had
> originally, stopping SS, removing new database files and then renaming
> corrupted db backup to the original names? SQL Server will possibly
> recover the database fine...
> If I were to do this operation, I would make sure that I have a copy of
> the bad database files, to keep a starting point.
> I'm a little skeptic that the above actually works. I guess that whar
> you are really after is the transaction log, so you can back it up, and
> apply it to the backup, so you don't lose those two hours of work.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||Thanks Steve!
Unfortunately I cannot read Russian but the TSQL seems that you must at
least
have your database attached to SQL Server before using that instruction?
"Steve Kass" <skass@.drew.edu> wrote in message
news:%23dKWuUwZGHA.3532@.TK2MSFTNGP05.phx.gbl...
> Leila,
> If you can read Russian, or fill in the gaps with
> some online translation, this might help:
> http://www.sql.ru/faq/faq_topic.aspx?fid=123
> Steve Kass
> Drew University
> Leila wrote:
>>Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
>>I really don't know what's wrong with my clock :-(
>>
>>I'll inquire with Microsoft, but I would have too much hope.
>>Thanks indeed!
>>
>>
>>"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
>>news:Xns97AE9408A75F1Yazorman@.127.0.0.1...
>>Leila (Leilas@.hotpop.com) writes:
>>Date: Sun, 23 Apr 2006 20:49:51 +0430
>>Your clock is ahead ahain! It's 14:30 over here, and I'm on +0200.
>>
>>HDD failure caused to move the data to a new disk. We are no longer able
>>to attach the MDF file. I searched a lot but all of solutions work only
>>when the database is running under SQL Server and is suspected, not for
>>me (detached database).
>>I get this error when trying to attach the MDF file:
>>Error 823: I/O error (torn page) detected during read at offset
>>(0x0000036cba0000 in file 'D:\Data\Data_file)
>>Unfortunately the backup is 2 hours behind from the failure!
>>Any help would be greatly appreciated.
>>Well, at least there is a backup!
>>I have no idea how to handle the situation, and the only advice would
>>be to open a case with Microsoft, but I realise that this may not be
>>easy where you are located.
>>I'll inquire with Microsoft, but I would have too much hope.
>>
>>--
>>Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>Books Online for SQL Server 2005 at
>>http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
>>Books Online for SQL Server 2000 at
>>http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>>|||Leila (Leilas@.hotpop.com) writes:
> Unfortunately I cannot read Russian but the TSQL seems that you must at
> least
> have your database attached to SQL Server before using that instruction?
Which can be solved by creating a database, and the throwing the files
for that away, and then slapping the files for the broken database in
place.
However, I doubt that this is the solution to your problem. That script
seems to create an empty log file, and if I understand correctly, the
log file is what you want to be able to access?
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||Leila (Leilas@.hotpop.com) writes:
> HDD failure caused to move the data to a new disk. We are no longer able
> to attach the MDF file. I searched a lot but all of solutions work only
> when the database is running under SQL Server and is suspected, not for
> me (detached database). I get this error when trying to attach the MDF
> file: Error 823: I/O error (torn page) detected during read at offset
> (0x0000036cba0000 in file 'D:\Data\Data_file)
> Unfortunately the backup is 2 hours behind from the failure!
> Any help would be greatly appreciated.
I guess that you by now already have restored that two-hour old backup.
Unfortunately, it took some time to find out the correct procedure.
It is described on
http://www.sqljunkies.com/HowTo/F5B99949-4D67-4B27-B752-AA8DDB08B0C1.scuk
With quite some help of some MVP colleagues I developed the demo script
below, to illustrate the procedure.
It assumes that you know the name and location of your log files, but
with a full backup available, it should not be difficult to work out.
-- See also
-- http://www.sqljunkies.com/HowTo/F5B99949-4D67-4B27-B752-AA8DDB08B0C1.scuk
-- First take a copy of Northwind that we can mess up a bit.
BACKUP DATABASE Northwind to disk = 'c:\temp\Northwind.bak'
go
RESTORE DATABASE northbreeze from disk = 'c:\temp\Northwind.bak'
WITH MOVE 'Northwind' TO 'C:\temp\northbreeze.mdf',
MOVE 'Northwind_log' TO 'C:\temp\northbreeze.ldf',
REPLACE
go
-- And make sure that it has full recovery.
ALTER DATABASE northbreeze SET RECOVERY FULL
go
USE northbreeze
go
-- Let's add a new customer to northbreeze.
INSERT Customers (CustomerID, CompanyName, ContactName,
ContactTitle, Address, City, Region, PostalCode,
Country, Phone, Fax)
VALUES ('GARBO', 'Greta Garbos Deliktatesshandel', 'Frk. Gustafsson',
'Fröken', 'Mosebacke Torg 12', 'Stockholm', NULL, '11223',
'Sweden', '+46-8-90510', NULL)
go
-- Make sure that this database is backed up on its own. Backup the log
-- as well.
BACKUP DATABASE northbreeze to disk = 'c:\temp\Northbreeze.bak'
BACKUP LOG northbreeze to disk = 'c:\temp\Northbreeze.logbak'
go
-- Perform further updates in the database.
DELETE Customers
FROM Customers C
WHERE NOT EXISTS (SELECT *
FROM Orders O
WHERE O.CustomerID = C.CustomerID)
AND C.CustomerID <> 'GARBO'
go
-- Go to master
USE master
go
-- And detach database
EXEC sp_detach_db northbreeze
go
-- Assume that something bad happens to the MDF file while it is detached.
-- First step is to rename the files. (Although we could toss the bsd MDF
-- file.)
EXEC xp_cmdshell 'MOVE c:\temp\northbreeze.mdf c:\temp\northbreeze-
crashed.mdf'
EXEC xp_cmdshell 'MOVE c:\temp\northbreeze.ldf c:\temp\northbreeze-
crashed.ldf'
go
-- Create a new empty database were we want the real thing to be. Make sure
-- that we have full recovery-
CREATE DATABASE northbreeze
ON (NAME = 'Northwind', FILENAME = 'C:\temp\northbreeze.mdf')
LOG ON (NAME = 'Northwind.log', FILENAME = 'C:\temp\northbreeze.ldf')
ALTER DATABASE northbreeze SET RECOVERY FULL
go
-- Shut down SQL Server.
SHUTDOWN
go
-- In file system do this:
-- 1) move northbreeze.mdf to northbreeze-dummy.mdf (or delete it)
-- 1) move northbreeze.ldf to northbreeze-dummy.ldf (or delete it)
-- 2) move northbreeze-crashed.ldf to northbreeze.ldf
-- Start server again
go
-- The northbreeze database does at this point consist of the log file only!
-- (Or SQL Server created a new MDF; I did not check.)
-- We can now back up the tail of the log. Note NO_TRUNCATE!
BACKUP LOG northbreeze TO DISK = 'C:\temp\northbreeze-tail.logbak'
WITH NO_TRUNCATE
go
-- Drop the database
DROP DATABASE northbreeze
go
-- The log file may still be there, just move it out of the way.
EXEC xp_cmdshell
'MOVE c:\temp\northbreeze.ldf c:\temp\northbreeze-crashed.ldf'
go
-- Restore the database, use no NORECOVER, as we will apply logs as well.
RESTORE DATABASE northbreeze from disk = 'c:\temp\Northbreeze.bak'
WITH NORECOVERY
-- Restore the fist log dump.
RESTORE LOG northbreeze from disk = 'C:\temp\northbreeze.logbak'
WITH NORECOVERY
-- Apply the tail log.
RESTORE LOG northbreeze from disk = 'C:\temp\northbreeze-tail.logbak'
go
-- Verify that northbreeze != Northwind.
SELECT a.CustomerID, b.CustomerID
FROM Northwind..Customers a
FULL JOIN northbreeze..Customers b ON a.CustomerID = b.CustomerID
WHERE a.CustomerID IS NULL OR
b.CustomerID IS NULL
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Error 823 : SQL Server

Hi
I'm getting an Error 823, when I tried to attach a detached SQL DB
[JPG file attached]
Tried this KB http://support.microsoft.com/default...b;EN-US;828339
But does not seem to work..
Any Ideas ?!
-- Logu
Did you run consistency checks on the database before detaching it? You might just have a corrupt database,
and detach/attach won't clean such corruptions...
http://www.karaszi.com/sqlserver/inf...suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Logu" <klogu@.scapevelocity.com> wrote in message news:uoN$ZBOMEHA.620@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> I'm getting an Error 823, when I tried to attach a detached SQL DB
> [JPG file attached]
> Tried this KB http://support.microsoft.com/default...b;EN-US;828339
> But does not seem to work..
>
> Any Ideas ?!
> -- Logu
>
|||Hi Logu,
I wanted to post a quick note to see if you would like additional
assistance or information regarding this particular issue. We appreciate
your patience and look forward to hearing from you!
Sincerely yours,
Michael Cheng
Microsoft Online Support
************************************************** *********
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.

Error 823 : SQL Server

Hi
I'm getting an Error 823, when I tried to attach a detached SQL DB
[JPG file attached]
Tried this KB http://support.microsoft.com/default.aspx?scid=kb;EN-US;828339
But does not seem to work..
Any Ideas ?!
-- LoguDid you run consistency checks on the database before detaching it? You might just have a corrupt database,
and detach/attach won't clean such corruptions...
http://www.karaszi.com/sqlserver/info_corrupt_suspect_db.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Logu" <klogu@.scapevelocity.com> wrote in message news:uoN$ZBOMEHA.620@.TK2MSFTNGP10.phx.gbl...
> Hi
>
> I'm getting an Error 823, when I tried to attach a detached SQL DB
> [JPG file attached]
> Tried this KB http://support.microsoft.com/default.aspx?scid=kb;EN-US;828339
> But does not seem to work..
>
> Any Ideas ?!
> -- Logu
>|||Hi Logu,
I wanted to post a quick note to see if you would like additional
assistance or information regarding this particular issue. We appreciate
your patience and look forward to hearing from you!
Sincerely yours,
Michael Cheng
Microsoft Online Support
***********************************************************
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.

Error 823 : SQL Server

Hi
I'm getting an Error 823, when I tried to attach a detached SQL DB
[JPG file attached]
Tried this KB http://support.microsoft.com/defaul...kb;EN-US;828339
But does not seem to work..
Any Ideas ?!
-- LoguDid you run consistency checks on the database before detaching it? You migh
t just have a corrupt database,
and detach/attach won't clean such corruptions...
http://www.karaszi.com/sqlserver/in..._suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Logu" <klogu@.scapevelocity.com> wrote in message news:uoN$ZBOMEHA.620@.TK2MSFTNGP10.phx.gbl.
.
> Hi
>
> I'm getting an Error 823, when I tried to attach a detached SQL DB
> [JPG file attached]
> Tried this KB [url]http://support.microsoft.com/default.aspx?scid=kb;EN-US;828339[/ur
l]
> But does not seem to work..
>
> Any Ideas ?!
> -- Logu
>|||Hi Logu,
I wanted to post a quick note to see if you would like additional
assistance or information regarding this particular issue. We appreciate
your patience and look forward to hearing from you!
Sincerely yours,
Michael Cheng
Microsoft Online Support
****************************************
*******************
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.sql

Error 823

When I try to attach a database I get the SQL 823: I/O
error (torn page) detected during 0x000000000... in
the ... .mdf file.
I tried to attach it using single (i.e. .mdf file) but
still the same error.
Could anyone tell me how can I attach this database?
The only thing I know about is when you get a torn page detected, the best
you can do to resolve is restore from backups...
<anonymous@.discussions.microsoft.com> wrote in message
news:03c501c49791$493e0570$a401280a@.phx.gbl...
> When I try to attach a database I get the SQL 823: I/O
> error (torn page) detected during 0x000000000... in
> the ... .mdf file.
> I tried to attach it using single (i.e. .mdf file) but
> still the same error.
> Could anyone tell me how can I attach this database?
|||that's the problem... unfortunately we have a very old
backup.

>--Original Message--
>The only thing I know about is when you get a torn page
detected, the best
>you can do to resolve is restore from backups...
><anonymous@.discussions.microsoft.com> wrote in message
>news:03c501c49791$493e0570$a401280a@.phx.gbl...
>
>.
>
|||Open a case with MS. They *might* have some way to get the db back...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:03ab01c497bf$9e02ae20$a501280a@.phx.gbl...[vbcol=seagreen]
> that's the problem... unfortunately we have a very old
> backup.
> detected, the best
sql

Error 823

When I try to attach a database I get the SQL 823: I/O
error (torn page) detected during 0x000000000... in
the ... .mdf file.
I tried to attach it using single (i.e. .mdf file) but
still the same error.
Could anyone tell me how can I attach this database?The only thing I know about is when you get a torn page detected, the best
you can do to resolve is restore from backups...
<anonymous@.discussions.microsoft.com> wrote in message
news:03c501c49791$493e0570$a401280a@.phx.gbl...
> When I try to attach a database I get the SQL 823: I/O
> error (torn page) detected during 0x000000000... in
> the ... .mdf file.
> I tried to attach it using single (i.e. .mdf file) but
> still the same error.
> Could anyone tell me how can I attach this database?|||that's the problem... unfortunately we have a very old
backup.
>--Original Message--
>The only thing I know about is when you get a torn page
detected, the best
>you can do to resolve is restore from backups...
><anonymous@.discussions.microsoft.com> wrote in message
>news:03c501c49791$493e0570$a401280a@.phx.gbl...
>> When I try to attach a database I get the SQL 823: I/O
>> error (torn page) detected during 0x000000000... in
>> the ... .mdf file.
>> I tried to attach it using single (i.e. .mdf file) but
>> still the same error.
>> Could anyone tell me how can I attach this database?
>
>.
>|||Open a case with MS. They *might* have some way to get the db back...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:03ab01c497bf$9e02ae20$a501280a@.phx.gbl...
> that's the problem... unfortunately we have a very old
> backup.
>>--Original Message--
>>The only thing I know about is when you get a torn page
> detected, the best
>>you can do to resolve is restore from backups...
>><anonymous@.discussions.microsoft.com> wrote in message
>>news:03c501c49791$493e0570$a401280a@.phx.gbl...
>> When I try to attach a database I get the SQL 823: I/O
>> error (torn page) detected during 0x000000000... in
>> the ... .mdf file.
>> I tried to attach it using single (i.e. .mdf file) but
>> still the same error.
>> Could anyone tell me how can I attach this database?
>>
>>.

Wednesday, March 21, 2012

error '80004005' on .asp

I have the following error on executing a. asp file which uploads a file
into a 2005 SQL DB.
Take note that the SQL server and IIS resides in the same server.
Mcrosoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find se
rver
'servername' in sysservers. Execute sp_addlinkedserver to add the server to
sysservers.Hi Monica
You can use SQL Profiler to see the statements you are sending to the server
.
If the server has been renamed check out
http://support.microsoft.com/kb/303774.
John
"Monica" wrote:

> I have the following error on executing a. asp file which uploads a file
> into a 2005 SQL DB.
> Take note that the SQL server and IIS resides in the same server.
> --
> Mcrosoft OLE DB Provider for ODBC Drivers error '80004005'
> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find
server
> 'servername' in sysservers. Execute sp_addlinkedserver to add the server t
o
> sysservers.
> --
>
>|||hi John,
Is this also an issue even if the server was renamed even before I created
the DB? BTW, the Db came from a SQL 2000 version that was working fine, but
had this problem when I restored in the 2005 version.
Thanks,
Monica
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:FEB13C42-80EC-4218-B5F0-E6B2C0E841BD@.microsoft.com...[vbcol=seagreen]
> Hi Monica
> You can use SQL Profiler to see the statements you are sending to the
> server.
> If the server has been renamed check out
> http://support.microsoft.com/kb/303774.
> John
> "Monica" wrote:
>|||Hi Monica
This is a problem with the server and not the database. If you have not
renamed the SQL 2005 Server then you should not have this problem. Checking
@.@.SERVERNAME will show if you have this problem also check out "Hot to:
Rename a Stand-alone Instance of SQL Server 2005" in books online for more
information.
If @.@.SERVERNAME is correct you may have some SQL that is not compatible with
SQL 2005, this can be checked by running SQL Profiler.
John
"Monica" wrote:

> hi John,
> Is this also an issue even if the server was renamed even before I created
> the DB? BTW, the Db came from a SQL 2000 version that was working fine, b
ut
> had this problem when I restored in the 2005 version.
> Thanks,
> Monica
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:FEB13C42-80EC-4218-B5F0-E6B2C0E841BD@.microsoft.com...
>
>|||Hi John,
Now I have this error message,
Microsoft OLE DB Provider for ODBC Drivers error '80040e23'
[Microsoft][ODBC SQL Server Driver][SQL Server]The cursor does n
ot include
the table being modified or the table is not updatable through the cursor.
What does this mean?
Monica
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:3C74BC77-EF9F-4063-A26E-2110688DB2A5@.microsoft.com...[vbcol=seagreen]
> Hi Monica
> This is a problem with the server and not the database. If you have not
> renamed the SQL 2005 Server then you should not have this problem.
> Checking
> @.@.SERVERNAME will show if you have this problem also check out "Hot to:
> Rename a Stand-alone Instance of SQL Server 2005" in books online for more
> information.
> If @.@.SERVERNAME is correct you may have some SQL that is not compatible
> with
> SQL 2005, this can be checked by running SQL Profiler.
> John
>
> "Monica" wrote:
>|||Hi Monica
This sounds a bit like http://support.microsoft.com//kb/290413 although it
will not apply to your version, it could be something to do with how you are
forming your SQL statements, can you pinpoint the statement with SQL profile
r?
John
"Monica" wrote:

> Hi John,
> Now I have this error message,
> Microsoft OLE DB Provider for ODBC Drivers error '80040e23'
> [Microsoft][ODBC SQL Server Driver][SQL Server]The cursor does
not include
> the table being modified or the table is not updatable through the cursor.
> What does this mean?
>
> Monica
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:3C74BC77-EF9F-4063-A26E-2110688DB2A5@.microsoft.com...
>
>

error '80004005' on .asp

I have the following error on executing a. asp file which uploads a file
into a 2005 SQL DB.
Take note that the SQL server and IIS resides in the same server.
--
Mcrosoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server
'servername' in sysservers. Execute sp_addlinkedserver to add the server to
sysservers.
--Hi Monica
You can use SQL Profiler to see the statements you are sending to the server.
If the server has been renamed check out
http://support.microsoft.com/kb/303774.
John
"Monica" wrote:
> I have the following error on executing a. asp file which uploads a file
> into a 2005 SQL DB.
> Take note that the SQL server and IIS resides in the same server.
> --
> Mcrosoft OLE DB Provider for ODBC Drivers error '80004005'
> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server
> 'servername' in sysservers. Execute sp_addlinkedserver to add the server to
> sysservers.
> --
>
>|||hi John,
Is this also an issue even if the server was renamed even before I created
the DB? BTW, the Db came from a SQL 2000 version that was working fine, but
had this problem when I restored in the 2005 version.
Thanks,
Monica
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:FEB13C42-80EC-4218-B5F0-E6B2C0E841BD@.microsoft.com...
> Hi Monica
> You can use SQL Profiler to see the statements you are sending to the
> server.
> If the server has been renamed check out
> http://support.microsoft.com/kb/303774.
> John
> "Monica" wrote:
>> I have the following error on executing a. asp file which uploads a file
>> into a 2005 SQL DB.
>> Take note that the SQL server and IIS resides in the same server.
>> --
>> Mcrosoft OLE DB Provider for ODBC Drivers error '80004005'
>> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server
>> 'servername' in sysservers. Execute sp_addlinkedserver to add the server
>> to
>> sysservers.
>> --
>>|||Hi Monica
This is a problem with the server and not the database. If you have not
renamed the SQL 2005 Server then you should not have this problem. Checking
@.@.SERVERNAME will show if you have this problem also check out "Hot to:
Rename a Stand-alone Instance of SQL Server 2005" in books online for more
information.
If @.@.SERVERNAME is correct you may have some SQL that is not compatible with
SQL 2005, this can be checked by running SQL Profiler.
John
"Monica" wrote:
> hi John,
> Is this also an issue even if the server was renamed even before I created
> the DB? BTW, the Db came from a SQL 2000 version that was working fine, but
> had this problem when I restored in the 2005 version.
> Thanks,
> Monica
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:FEB13C42-80EC-4218-B5F0-E6B2C0E841BD@.microsoft.com...
> > Hi Monica
> >
> > You can use SQL Profiler to see the statements you are sending to the
> > server.
> >
> > If the server has been renamed check out
> > http://support.microsoft.com/kb/303774.
> >
> > John
> >
> > "Monica" wrote:
> >
> >> I have the following error on executing a. asp file which uploads a file
> >> into a 2005 SQL DB.
> >>
> >> Take note that the SQL server and IIS resides in the same server.
> >>
> >> --
> >>
> >> Mcrosoft OLE DB Provider for ODBC Drivers error '80004005'
> >> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server
> >> 'servername' in sysservers. Execute sp_addlinkedserver to add the server
> >> to
> >> sysservers.
> >>
> >> --
> >>
> >>
> >>
>
>|||Hi John,
Now I have this error message,
Microsoft OLE DB Provider for ODBC Drivers error '80040e23'
[Microsoft][ODBC SQL Server Driver][SQL Server]The cursor does not include
the table being modified or the table is not updatable through the cursor.
What does this mean?
Monica
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:3C74BC77-EF9F-4063-A26E-2110688DB2A5@.microsoft.com...
> Hi Monica
> This is a problem with the server and not the database. If you have not
> renamed the SQL 2005 Server then you should not have this problem.
> Checking
> @.@.SERVERNAME will show if you have this problem also check out "Hot to:
> Rename a Stand-alone Instance of SQL Server 2005" in books online for more
> information.
> If @.@.SERVERNAME is correct you may have some SQL that is not compatible
> with
> SQL 2005, this can be checked by running SQL Profiler.
> John
>
> "Monica" wrote:
>> hi John,
>> Is this also an issue even if the server was renamed even before I
>> created
>> the DB? BTW, the Db came from a SQL 2000 version that was working fine,
>> but
>> had this problem when I restored in the 2005 version.
>> Thanks,
>> Monica
>> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
>> news:FEB13C42-80EC-4218-B5F0-E6B2C0E841BD@.microsoft.com...
>> > Hi Monica
>> >
>> > You can use SQL Profiler to see the statements you are sending to the
>> > server.
>> >
>> > If the server has been renamed check out
>> > http://support.microsoft.com/kb/303774.
>> >
>> > John
>> >
>> > "Monica" wrote:
>> >
>> >> I have the following error on executing a. asp file which uploads a
>> >> file
>> >> into a 2005 SQL DB.
>> >>
>> >> Take note that the SQL server and IIS resides in the same server.
>> >>
>> >> --
>> >>
>> >> Mcrosoft OLE DB Provider for ODBC Drivers error '80004005'
>> >> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server
>> >> 'servername' in sysservers. Execute sp_addlinkedserver to add the
>> >> server
>> >> to
>> >> sysservers.
>> >>
>> >> --
>> >>
>> >>
>> >>
>>|||Hi Monica
This sounds a bit like http://support.microsoft.com//kb/290413 although it
will not apply to your version, it could be something to do with how you are
forming your SQL statements, can you pinpoint the statement with SQL profiler?
John
"Monica" wrote:
> Hi John,
> Now I have this error message,
> Microsoft OLE DB Provider for ODBC Drivers error '80040e23'
> [Microsoft][ODBC SQL Server Driver][SQL Server]The cursor does not include
> the table being modified or the table is not updatable through the cursor.
> What does this mean?
>
> Monica
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:3C74BC77-EF9F-4063-A26E-2110688DB2A5@.microsoft.com...
> > Hi Monica
> >
> > This is a problem with the server and not the database. If you have not
> > renamed the SQL 2005 Server then you should not have this problem.
> > Checking
> > @.@.SERVERNAME will show if you have this problem also check out "Hot to:
> > Rename a Stand-alone Instance of SQL Server 2005" in books online for more
> > information.
> >
> > If @.@.SERVERNAME is correct you may have some SQL that is not compatible
> > with
> > SQL 2005, this can be checked by running SQL Profiler.
> >
> > John
> >
> >
> > "Monica" wrote:
> >
> >> hi John,
> >>
> >> Is this also an issue even if the server was renamed even before I
> >> created
> >> the DB? BTW, the Db came from a SQL 2000 version that was working fine,
> >> but
> >> had this problem when I restored in the 2005 version.
> >>
> >> Thanks,
> >> Monica
> >>
> >> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> >> news:FEB13C42-80EC-4218-B5F0-E6B2C0E841BD@.microsoft.com...
> >> > Hi Monica
> >> >
> >> > You can use SQL Profiler to see the statements you are sending to the
> >> > server.
> >> >
> >> > If the server has been renamed check out
> >> > http://support.microsoft.com/kb/303774.
> >> >
> >> > John
> >> >
> >> > "Monica" wrote:
> >> >
> >> >> I have the following error on executing a. asp file which uploads a
> >> >> file
> >> >> into a 2005 SQL DB.
> >> >>
> >> >> Take note that the SQL server and IIS resides in the same server.
> >> >>
> >> >> --
> >> >>
> >> >> Mcrosoft OLE DB Provider for ODBC Drivers error '80004005'
> >> >> [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server
> >> >> 'servername' in sysservers. Execute sp_addlinkedserver to add the
> >> >> server
> >> >> to
> >> >> sysservers.
> >> >>
> >> >> --
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>

Sunday, March 11, 2012

Error 53: Cannot generate SSPI Context

SQLserveragent service for SQL2K does not start and returns the following
error in the agent out file.
Error 53, Cannot generate SSPI Context
The agent was working until last week.
We have researched this error on Microsoft knowldge base and several news
groups and none of the stuff we read seems to work.
We CAN connect to the DB using the full DNS name or IP. But when trying to
use (local), the error appears. It just seems like SQL/Windows lost how to
find or resolve (local).
How does (local) work? This is happening on two servers in the same Active
Directory Win2k server domain. Could it be a domain level policy that is
goofed?
Thanks for any help.
"kenwu" <kenwu@.discussions.microsoft.com> wrote in message
news:61B5A8F9-AB41-4192-80D6-F9B96224DBF4@.microsoft.com...
> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying
to
> use (local), the error appears. It just seems like SQL/Windows lost how
to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same
Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.
|||need to try to connect to sqlagent using sa account and password. you can do
that with the
sqlagen manager, change authentication and ener account and password, then
restart sqlserver agent. (there is a known kba for this problem sorry I
cannot find it now)
I will then suggest re-booting the server.
I vaguely remember it being something to do with the sqlagent service
accounts not being able to communicate with the domain controller and there
fore not being authenticated,causing the error.
"kenwu" <kenwu@.discussions.microsoft.com> wrote in message
news:61B5A8F9-AB41-4192-80D6-F9B96224DBF4@.microsoft.com...
> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying
to
> use (local), the error appears. It just seems like SQL/Windows lost how
to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same
Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.
|||Hi Kenwu,
Look at this kbs:
http://support.microsoft.com/?id=814401
http://support.microsoft.com/?id=811889
http://dotnetjunkies.com/WebLog/pete...2/25/7897.aspx
Good Luck !
Rodrigo Fernandes
MCSE/MCDBA
"kenwu" wrote:

> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying to
> use (local), the error appears. It just seems like SQL/Windows lost how to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.
|||What changes you did last week?
Regards,
Daniel
"kenwu" <kenwu@.discussions.microsoft.com> wrote in message
news:61B5A8F9-AB41-4192-80D6-F9B96224DBF4@.microsoft.com...
> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying
to
> use (local), the error appears. It just seems like SQL/Windows lost how
to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same
Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.

Error 53: Cannot generate SSPI Context

SQLserveragent service for SQL2K does not start and returns the following
error in the agent out file.
Error 53, Cannot generate SSPI Context
The agent was working until last week.
We have researched this error on Microsoft knowldge base and several news
groups and none of the stuff we read seems to work.
We CAN connect to the DB using the full DNS name or IP. But when trying to
use (local), the error appears. It just seems like SQL/Windows lost how to
find or resolve (local).
How does (local) work? This is happening on two servers in the same Active
Directory Win2k server domain. Could it be a domain level policy that is
goofed?
Thanks for any help."kenwu" <kenwu@.discussions.microsoft.com> wrote in message
news:61B5A8F9-AB41-4192-80D6-F9B96224DBF4@.microsoft.com...
> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying
to
> use (local), the error appears. It just seems like SQL/Windows lost how
to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same
Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.|||need to try to connect to sqlagent using sa account and password. you can do
that with the
sqlagen manager, change authentication and ener account and password, then
restart sqlserver agent. (there is a known kba for this problem sorry I
cannot find it now)
I will then suggest re-booting the server.
I vaguely remember it being something to do with the sqlagent service
accounts not being able to communicate with the domain controller and there
fore not being authenticated,causing the error.
"kenwu" <kenwu@.discussions.microsoft.com> wrote in message
news:61B5A8F9-AB41-4192-80D6-F9B96224DBF4@.microsoft.com...
> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying
to
> use (local), the error appears. It just seems like SQL/Windows lost how
to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same
Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.|||Hi Kenwu,
Look at this kbs:
http://support.microsoft.com/?id=814401
http://support.microsoft.com/?id=811889
http://dotnetjunkies.com/WebLog/pet...02/25/7897.aspx
Good Luck !
Rodrigo Fernandes
MCSE/MCDBA
"kenwu" wrote:

> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying t
o
> use (local), the error appears. It just seems like SQL/Windows lost how t
o
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same Activ
e
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.|||What changes you did last week?
Regards,
Daniel
"kenwu" <kenwu@.discussions.microsoft.com> wrote in message
news:61B5A8F9-AB41-4192-80D6-F9B96224DBF4@.microsoft.com...
> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying
to
> use (local), the error appears. It just seems like SQL/Windows lost how
to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same
Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.

Error 53: Cannot generate SSPI Context

SQLserveragent service for SQL2K does not start and returns the following
error in the agent out file.
Error 53, Cannot generate SSPI Context
The agent was working until last week.
We have researched this error on Microsoft knowldge base and several news
groups and none of the stuff we read seems to work.
We CAN connect to the DB using the full DNS name or IP. But when trying to
use (local), the error appears. It just seems like SQL/Windows lost how to
find or resolve (local).
How does (local) work? This is happening on two servers in the same Active
Directory Win2k server domain. Could it be a domain level policy that is
goofed?
Thanks for any help."kenwu" <kenwu@.discussions.microsoft.com> wrote in message
news:61B5A8F9-AB41-4192-80D6-F9B96224DBF4@.microsoft.com...
> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying
to
> use (local), the error appears. It just seems like SQL/Windows lost how
to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same
Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.|||need to try to connect to sqlagent using sa account and password. you can do
that with the
sqlagen manager, change authentication and ener account and password, then
restart sqlserver agent. (there is a known kba for this problem sorry I
cannot find it now)
I will then suggest re-booting the server.
I vaguely remember it being something to do with the sqlagent service
accounts not being able to communicate with the domain controller and there
fore not being authenticated,causing the error.
"kenwu" <kenwu@.discussions.microsoft.com> wrote in message
news:61B5A8F9-AB41-4192-80D6-F9B96224DBF4@.microsoft.com...
> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying
to
> use (local), the error appears. It just seems like SQL/Windows lost how
to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same
Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.|||Hi Kenwu,
Look at this kbs:
http://support.microsoft.com/?id=814401
http://support.microsoft.com/?id=811889
http://dotnetjunkies.com/WebLog/petergekko/archive/2004/02/25/7897.aspx
Good Luck !
Rodrigo Fernandes
MCSE/MCDBA
"kenwu" wrote:
> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying to
> use (local), the error appears. It just seems like SQL/Windows lost how to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.|||What changes you did last week?
Regards,
Daniel
"kenwu" <kenwu@.discussions.microsoft.com> wrote in message
news:61B5A8F9-AB41-4192-80D6-F9B96224DBF4@.microsoft.com...
> SQLserveragent service for SQL2K does not start and returns the following
> error in the agent out file.
> Error 53, Cannot generate SSPI Context
> The agent was working until last week.
> We have researched this error on Microsoft knowldge base and several news
> groups and none of the stuff we read seems to work.
> We CAN connect to the DB using the full DNS name or IP. But when trying
to
> use (local), the error appears. It just seems like SQL/Windows lost how
to
> find or resolve (local).
> How does (local) work? This is happening on two servers in the same
Active
> Directory Win2k server domain. Could it be a domain level policy that is
> goofed?
> Thanks for any help.