How to recover a SQL Server Database

原创 2004年07月13日 22:00:00
作者:snowhite2000    时间:01-10-24 02:26


your message box is full again.


use master database:

1. use:

exec sp_db_detach 'database name', 'true'

2. copy datafiles and log file to dist. drive

3. use

EXEC sp_attach_db @dbname = N'database name',
@filename1 = N'new path.mdf',
@filename2 = N'new path.ldf'

send me a message, if you have problems.

作者:chao_ping    时间:01-10-24 02:44

and if i have reinstalled the sql server,
and the new installed master database does not contain the information about my another database, and i only have the old datafiles and logfiles,
how to add this database into the sqlserver?

Your method just moves datafile allocation, and what i want to do is:
after a clean installation, let the new sqlserver mount the old databasees.

just like in oracle, i removes oracle software, reinstall it,
and use oracle to mount the old database.

作者:snowhite2000    时间:01-10-24 02:47

use step 3 only, use master databasde.

作者:chao_ping    时间:01-10-24 03:08

Seems faily easy,
Made it.
Thanks so much.
In fact such easy a job, i donot know it, faint.
Thanks again.

作者:chao_ping    时间:01-10-24 03:08

I really go to sleep now ,bye!
Now 3:09 am now,

作者:snowhite2000    时间:01-10-24 03:10

have a nice dream!

作者:chao_ping    时间:01-10-24 03:11


作者:yanwang    时间:01-10-24 22:40


I saw a message from you that asked me to check mailbox. I tried, but I can not login to it. Maybe I typed wrong username and password. Sorry about it. I guess it's about sql server, it looks that you solved the problem.

关于recover managed standby database finish force

主库是rac,备库是单实例,根据o的官档上说到在failover切换时,会使用alter database recover managed standby database finish force;...
  • halou90
  • halou90
  • 2015年10月28日 11:41
  • 1629

【Oracle】探究recover database until scn

在ogg数据初始化中,对于使用rman进行数据初始化和导入导出、数据泵进行数据初始化,最终启动replicat进程时使用的是不同的两个参数。 对于rman进行初始化的,我们使用的语句是: star...
  • badly9
  • badly9
  • 2016年07月05日 11:41
  • 2235

解决microsoft sql server error:15138的方法

When you drop a user in Microsoft SQL Server, an error occurs: 1. Drop failed for User fastnet(就是要删除...
  • gray13
  • gray13
  • 2009年08月18日 12:30
  • 7061

restore database和recover database的区别

restore 只是用备份来还原,recover是用archivelog或者online log     举例说明:     假设我时间点A,做了个备份,时间点B数据库挂了         re...
  • yang987913
  • yang987913
  • 2013年01月17日 15:52
  • 353


388.Flashback Database relies on which technologies to recover to a point in time? A. Flashback D...
  • rlhua
  • rlhua
  • 2013年09月23日 23:49
  • 4130

Oracle数据库的不完全恢复:Recover Database Until

什么叫“不完全”恢复呢?不是很理解。Recover Database有3种基本命令形式:Recover Database Until TimeRecover Database Until Change...
  • first10010
  • first10010
  • 2009年10月20日 14:52
  • 5367


QUESTION NO: 258 How many database instances are used during a database-duplication process?A. One ...
  • xuejiayue1105
  • xuejiayue1105
  • 2015年10月09日 14:20
  • 871

如果有人问你关系数据库的工作原理,叫他看这篇文章How does a relational database work

When it comes to relational databases, I can’t help thinking that something is missing. They’re used...
  • GarfieldEr007
  • GarfieldEr007
  • 2016年05月11日 17:29
  • 1378

Oracle DG故障诊断一则:alter database recover to logical standby new_logical_dbname卡住

我们在基于物理standby的基础上搭建逻辑备库过程过程中,在执行:alter database recover to logical standby READDB;卡住不动,并且alert也没有报错...
  • linwaterbin
  • linwaterbin
  • 2014年04月21日 21:35
  • 5997

How to drop a SQL Server database?

今天做数据库实验遇到一个问题—建立的数据库删除不了!问题错误提示如下: Cannot drop database " DatabaseName " because it is currently...
  • IncStrive
  • IncStrive
  • 2012年04月24日 18:55
  • 1824
您举报文章:How to recover a SQL Server Database