Showing posts with label whilst. Show all posts
Showing posts with label whilst. Show all posts

Tuesday, March 27, 2012

Error reattaching database following it being marked as Suspect

I am using SQL Server 2000 with SP3 (product version
8.00.760).
A database in this installation was marked as 'SUSPECT'
whilst I was excuting a DELETE SQL statement using the SQL
Query Analyzer tool.
Using Enterprise Manager I was subsequently unable to
access the database, and so thought the easiest option
would be to restore it from a BAK file that had been
created a few hours earlier as data modiefied in the time
between was not vital. I detached the database before
attemping this, and then discovered the only backup
available is a differential one and it will not restore.
Therefore, I was hoping to reattached the database and
reset the 'SUSPECT' flag, so I could at least access the
data again. However, when I attempt to attach the MDF
file (the associated LDF file is in the same location) I
get the following errors:
Error 9001: The log for database 'MY_DATABASE' is
not available.
and:
Attaching the database has failed.
I have also tried attaching the database using the
sp_attach_single_file_db stored procdure:
EXEC sp_attach_single_file_db @.dbname
= 'MY_DATABASE',
@.physname = 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\MY_DATABASE_Data.MDF'
which return the following error message:
Server: Msg 9001, Level 21, State 4, Line 1
The log for database 'ORBIT_REPORTS' is not
available.
And also tried using the sp_attach_db stored procedure:
EXEC sp_attach_db @.dbname = 'MY_DATABASE',
@.filename1 = 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\MY_DATABASE_Data.MDF',
@.filename2 = 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\MY_DATABASE_Log.LDF'
but still get the following error:
Server: Msg 9001, Level 21, State 1, Line 1
The log for database 'ORBIT_REPORTS' is not
available.
Both files _do_ exist in the directory:
'C:\Program Files\Microsoft SQL Server\MSSQL\Data\
Can anyone help?If you have a diff backup you should have a copy of a full backup (since
diff backup wont start until it knows a full backup exists).
Is the database called Orbits_reports?
If you have SQL 2K...right click database -all tasks and attach DB...does
the files come up as red? Have you got the correct permissions for a file?
Have you renamed a file?
Regards
Z
"Ian Munday" <ian.munday@.uk.pwc.com> wrote in message
news:078201c37c64$18bdc690$a001280a@.phx.gbl...
> I am using SQL Server 2000 with SP3 (product version
> 8.00.760).
> A database in this installation was marked as 'SUSPECT'
> whilst I was excuting a DELETE SQL statement using the SQL
> Query Analyzer tool.
> Using Enterprise Manager I was subsequently unable to
> access the database, and so thought the easiest option
> would be to restore it from a BAK file that had been
> created a few hours earlier as data modiefied in the time
> between was not vital. I detached the database before
> attemping this, and then discovered the only backup
> available is a differential one and it will not restore.
> Therefore, I was hoping to reattached the database and
> reset the 'SUSPECT' flag, so I could at least access the
> data again. However, when I attempt to attach the MDF
> file (the associated LDF file is in the same location) I
> get the following errors:
> Error 9001: The log for database 'MY_DATABASE' is
> not available.
> and:
> Attaching the database has failed.
>
> I have also tried attaching the database using the
> sp_attach_single_file_db stored procdure:
> EXEC sp_attach_single_file_db @.dbname
> = 'MY_DATABASE',
> @.physname = 'C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MY_DATABASE_Data.MDF'
> which return the following error message:
> Server: Msg 9001, Level 21, State 4, Line 1
> The log for database 'ORBIT_REPORTS' is not
> available.
> And also tried using the sp_attach_db stored procedure:
> EXEC sp_attach_db @.dbname = 'MY_DATABASE',
> @.filename1 = 'C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MY_DATABASE_Data.MDF',
> @.filename2 = 'C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\MY_DATABASE_Log.LDF'
> but still get the following error:
> Server: Msg 9001, Level 21, State 1, Line 1
> The log for database 'ORBIT_REPORTS' is not
> available.
> Both files _do_ exist in the directory:
> 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\
>
> Can anyone help?

Friday, February 24, 2012

Error Message Restoring a SQL Server 2000 db

What does the following error message mean encountered whilst attempting to
restore a SQL Server 2000 database?
'The backed-up database has on-disk structure version 539. The server
supports version 515 and cannot restore or upgrade this database.'
AFAIK, this usually means the backup was made by a version of sql server
that is **more** current than the one you are using to restore.
"T." <T@.discussions.microsoft.com> wrote in message
news:929A4958-2E6C-4C76-8F8F-5EAB6E1EB735@.microsoft.com...
> What does the following error message mean encountered whilst attempting
to
> restore a SQL Server 2000 database?
> 'The backed-up database has on-disk structure version 539. The server
> supports version 515 and cannot restore or upgrade this database.'
|||Those version numbers say that you're trying to restore a SQL Server 2000
database on a 7.0 server. As Scott says, you can't restore databases to a
down-level server.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Scott Morris" <bogus@.bogus.com> wrote in message
news:#YuDROeDFHA.3888@.TK2MSFTNGP09.phx.gbl...
> AFAIK, this usually means the backup was made by a version of sql server
> that is **more** current than the one you are using to restore.
> "T." <T@.discussions.microsoft.com> wrote in message
> news:929A4958-2E6C-4C76-8F8F-5EAB6E1EB735@.microsoft.com...
> to
>
|||Thanks both of you. What I suspected.
"Paul S Randal [MS]" wrote:

> Those version numbers say that you're trying to restore a SQL Server 2000
> database on a 7.0 server. As Scott says, you can't restore databases to a
> down-level server.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Scott Morris" <bogus@.bogus.com> wrote in message
> news:#YuDROeDFHA.3888@.TK2MSFTNGP09.phx.gbl...
>
>

Error Message Restoring a SQL Server 2000 db

What does the following error message mean encountered whilst attempting to
restore a SQL Server 2000 database?
'The backed-up database has on-disk structure version 539. The server
supports version 515 and cannot restore or upgrade this database.'AFAIK, this usually means the backup was made by a version of sql server
that is **more** current than the one you are using to restore.
"T." <T@.discussions.microsoft.com> wrote in message
news:929A4958-2E6C-4C76-8F8F-5EAB6E1EB735@.microsoft.com...
> What does the following error message mean encountered whilst attempting
to
> restore a SQL Server 2000 database?
> 'The backed-up database has on-disk structure version 539. The server
> supports version 515 and cannot restore or upgrade this database.'|||Those version numbers say that you're trying to restore a SQL Server 2000
database on a 7.0 server. As Scott says, you can't restore databases to a
down-level server.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Scott Morris" <bogus@.bogus.com> wrote in message
news:#YuDROeDFHA.3888@.TK2MSFTNGP09.phx.gbl...
> AFAIK, this usually means the backup was made by a version of sql server
> that is **more** current than the one you are using to restore.
> "T." <T@.discussions.microsoft.com> wrote in message
> news:929A4958-2E6C-4C76-8F8F-5EAB6E1EB735@.microsoft.com...
> to
>|||Thanks both of you. What I suspected.
"Paul S Randal [MS]" wrote:

> Those version numbers say that you're trying to restore a SQL Server 2000
> database on a 7.0 server. As Scott says, you can't restore databases to a
> down-level server.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Scott Morris" <bogus@.bogus.com> wrote in message
> news:#YuDROeDFHA.3888@.TK2MSFTNGP09.phx.gbl...
>
>

Error Message Restoring a SQL Server 2000 db

What does the following error message mean encountered whilst attempting to
restore a SQL Server 2000 database?
'The backed-up database has on-disk structure version 539. The server
supports version 515 and cannot restore or upgrade this database.'AFAIK, this usually means the backup was made by a version of sql server
that is **more** current than the one you are using to restore.
"T." <T@.discussions.microsoft.com> wrote in message
news:929A4958-2E6C-4C76-8F8F-5EAB6E1EB735@.microsoft.com...
> What does the following error message mean encountered whilst attempting
to
> restore a SQL Server 2000 database?
> 'The backed-up database has on-disk structure version 539. The server
> supports version 515 and cannot restore or upgrade this database.'|||Those version numbers say that you're trying to restore a SQL Server 2000
database on a 7.0 server. As Scott says, you can't restore databases to a
down-level server.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Scott Morris" <bogus@.bogus.com> wrote in message
news:#YuDROeDFHA.3888@.TK2MSFTNGP09.phx.gbl...
> AFAIK, this usually means the backup was made by a version of sql server
> that is **more** current than the one you are using to restore.
> "T." <T@.discussions.microsoft.com> wrote in message
> news:929A4958-2E6C-4C76-8F8F-5EAB6E1EB735@.microsoft.com...
> > What does the following error message mean encountered whilst attempting
> to
> > restore a SQL Server 2000 database?
> >
> > 'The backed-up database has on-disk structure version 539. The server
> > supports version 515 and cannot restore or upgrade this database.'
>|||Thanks both of you. What I suspected.
"Paul S Randal [MS]" wrote:
> Those version numbers say that you're trying to restore a SQL Server 2000
> database on a 7.0 server. As Scott says, you can't restore databases to a
> down-level server.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Scott Morris" <bogus@.bogus.com> wrote in message
> news:#YuDROeDFHA.3888@.TK2MSFTNGP09.phx.gbl...
> > AFAIK, this usually means the backup was made by a version of sql server
> > that is **more** current than the one you are using to restore.
> >
> > "T." <T@.discussions.microsoft.com> wrote in message
> > news:929A4958-2E6C-4C76-8F8F-5EAB6E1EB735@.microsoft.com...
> > > What does the following error message mean encountered whilst attempting
> > to
> > > restore a SQL Server 2000 database?
> > >
> > > 'The backed-up database has on-disk structure version 539. The server
> > > supports version 515 and cannot restore or upgrade this database.'
> >
> >
>
>