Suspendida una base de datos

02/09/2004 - 13:28 por Zara | Informe spam
como puedo recuperar una base de datos que de repente aparece como
suspendida

Preguntas similare

Leer las respuestas

#1 Aitor
02/09/2004 - 13:56 | Informe spam
como puedo recuperar una base de datos que de repente


aparece como
suspendida


.



hola:
encima de la base de datos, botón derecho, All tasks,
Bring online.

Creo responde a tu pregunta.
Saludos.
Respuesta Responder a este mensaje
#2 Maxi
02/09/2004 - 15:28 | Informe spam
Hola, sacado de los libros on line ;-)

sp_resetstatus
Restablece el estado de una base de datos sospechosa.

Sintaxis
sp_resetstatus [ @DBName = ] 'database'

Argumentos
[@DBName =] 'database'

Es el nombre de la base de datos que se va a restablecer. El argumento
database es de tipo sysname y no tiene un valor predeterminado.

Valores del código de retorno
0 (correcto) o 1 (error)

Observaciones
sp_resetstatus desactiva el indicador de sospecha de una base de datos. Este
procedimiento actualiza las columnas de modo y estado de la base de datos
con nombre de sysdatabases. Se debe consultar el registro de errores de SQL
Server y resolver todos los problemas antes de ejecutar este procedimiento.
Detenga y reinicie SQL Server después de ejecutar sp_resetstatus.

Una base de datos puede ser sospechosa por varios motivos. Las posibles
causas son que el sistema operativo deniegue el acceso a un recurso de base
de datos, o bien que uno o varios de los archivos de la base de datos no
esté disponible o esté dañado.

Permisos
Sólo los miembros de la función fija del servidor sysadmin pueden ejecutar
sp_resetstatus.

Ejemplos
Este ejemplo restablece el estado de la base de datos PUBS.

EXEC sp_resetstatus 'PUBS'
Suerte

Salu2
Maxi
Buenos Aires - Argentina
Desarrollador Microsoft 3 Estrellas .NET
Nunca consideres el estudio como una obligación sino como
una oportunidad para penetrar en el bello y maravillosos
mundo del saber.
- Albert Einstein



"Zara" escribió en el mensaje
news:
como puedo recuperar una base de datos que de repente aparece como
suspendida







Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.748 / Virus Database: 500 - Release Date: 01/09/2004
Respuesta Responder a este mensaje
#3 Salvador Ramos
02/09/2004 - 16:23 | Informe spam
Hola:

A parte de seguir las indicaciones que te han dado los compañeros, también
puede visitar las FAQ's del grupo donde se trata este problema (entre otros)
y posibles soluciones detalladas. www.helpdna.net/bosqlfaq.htm

Un saludo
Salvador Ramos
Murcia - España
[Microsoft MVP SQL Server]
www.helpdna.net
¿Te interesa participar en las reuniones
del grupo de Usuarios de SQL-Server y .NET
Se harán en levante de España, (Alicante o Murcia)?

"Zara" escribió en el mensaje
news:
como puedo recuperar una base de datos que de repente aparece como
suspendida


Respuesta Responder a este mensaje
#4 Pao
03/09/2004 - 03:04 | Informe spam
HOla, te cuento, que en ocasiones a veces por más que
reseteas el estatus no te funciona y no cambia el mismo y
la base continua suspendida, sin no tienes backup's y
necesitas la información de esa base hasta el ultimo dato
que ahi estaba te recomiendo este procedimiento, que pone
a la base en un modo en el cual puedes ingresar y sacar
los datos ya sea con un bcp por cada tabla, es medio
tedioso pero efectivo, esto me sucedio una vez en
SQLServer 2000 y pudimos recuperar los datos.
INF: Bypass (Emergency) Mode and DUMP TRANSACTION WITH
NO_LOG [Q165918]

PSS ID Number: Q165918
Article last modified on 12-07-2001

:4.2x,6.0,6.5,7.0

The information in this article applies to:

- Microsoft SQL Server versions 7.0, 4.2x, 6.0, 6.5

SUMMARY

In infrequent situations, a database may be marked SUSPECT
due to recovery
failure at startup time. Normally, this prevents anybody
from accessing the
data. However, it is possible to manually set the status
of a SUSPECT database
to "bypass mode" (also called "emergency mode") and SELECT
or use the Bulk Copy
Program (BCP) to copy out the data. While you cannot do
any regular data
modifications in bypass mode, it is possible to run DUMP
TRANSACTION WITH
NO_LOG. Note that doing this operation in bypass mode is
unsupported and is a
potentially dangerous operation.

For similar reasons, if startup recovery is taking a long
time, you should not
abort it, set the database in bypass mode, and then do
DUMP TRANSACTION WITH
NO_LOG.

MORE INFORMATION

All actions taken by DUMP TRANSACTION are usually logged,
so it is recoverable
and abortable. However, log space is consumed by the DUMP
command itself. If the
transaction log is so full that insufficient space exists
to do a logged DUMP
TRANSACTION, the WITH NO_LOG option can truncate the
transaction log with no
logging.

DUMP TRANSACTION WITH NO_LOG is relatively safe under
normal conditions. The
server takes measures to ensure that recovery will succeed
even if the server
fails during this operation.

Under rare circumstances automatic recovery (also called
startup recovery) may
fail, marking a database SUSPECT. Recovery fails for a
specific reason. It is
very important to note the errorlog message that initially
caused recovery to
fail, because it may help to diagnose the cause.

"Recovery" is the process of making the database
consistent by redoing or undoing
all transactions that were either started after or
uncommitted at the time of
the last checkpoint. This process relies on the write-
ahead nature of the
transaction log (all modified pages are written to the log
before being written
to the database). Recovery consists of reading each log
record, comparing its
timestamp to the timestamp of the corresponding database
page, and either
undoing the change (in the case of an uncommitted
transaction) or redoing the
change (in the case of a committed transaction).

After noting the errorlog message that is causing recovery
to fail, try setting
the database status back to NORMAL, and restart SQL Server
to see if recovery
succeeds the second time. You can change the database
status by means of the
sp_resetstatus stored procedure. This is a supplemental
stored procedure you can
install from the Instsupl.sql script in the Mssql\Install
directory. For more
information, see "Resetting the Suspect Status" in the
online documentation.

If recovery still fails, note the error message and
contact your primary support
provider. You should also verify the availability of your
last good database
backup, because it may be needed. However much of the data
in your database is
often still available, albeit transactionally (and
physically) inconsistent. You
can access this data by setting the database status to
bypass, or emergency
mode. This is done by setting sysdatabases.status to -
32768 for a SQL 6.5
database and to 32768 for a SQL 7.0 database,after
turning "allow updates" on.
For example, use the following command for a SQL 6.5
database:

UPDATE SYSDATABASES SET STATUS=-32768 WHERE
NAME='DBNAME'

After doing this, you can enter the database and SELECT
the data or use BCP to
get it out. You may encounter errors while doing this, but
in most cases much of
the data can be retrieved.

Additional query words:

==Keywords : kbusage
Technology : kbSQLServSearch kbAudDeveloper
kbSQLServ600 kbSQLServ700 kbSQLServ650 kbSQLServ420
Version : :4.2x,6.0,6.5,7.0
Issue type : kbinfo
Copyright Microsoft Corporation 2001.




Hola:

A parte de seguir las indicaciones que te han dado los


compañeros, también
puede visitar las FAQ's del grupo donde se trata este


problema (entre otros)
y posibles soluciones detalladas.


www.helpdna.net/bosqlfaq.htm

Un saludo
Salvador Ramos
Murcia - España
[Microsoft MVP SQL Server]
www.helpdna.net
¿Te interesa participar en las reuniones
del grupo de Usuarios de SQL-Server y .NET
Se harán en levante de España, (Alicante o Murcia)?

"Zara" escribió en el mensaje
news:
como puedo recuperar una base de datos que de repente




aparece como
suspendida






.

email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida