你先在他哪里作一个备份文件,然后回来再用那个备份恢复不就行了
解决方案 »
- sql 2000中设计表时没有bool类型,怎么设置才有啊?
- 字符串拆分插入到sql表中
- 用 sqlserver访问远程access数据库
- 可以在触发器里面使用游标么
- 怎样连接用企业管理器用不同用户名密码登录同一个IP的数据库
- 100分能够分配给多少人呢?
- 怎么样把两个查询语句查到的东西合到一个表里来
- 在线等、给分:left(content,?) content 数据类型为text,请问?怎么设,我要取前100个字
- 那位知道怎么在代码里得到某个表占用多少字节??
- 请问各位有关PL/SQL的常用命令,望介绍一下。。
- 如何调用存储过程?
- 在SQL-SERVER中如何实现对备份了的文件组或日志文件进行还原。??
1. sp_attach_db
Examples
This example attaches two files from pubs to the current server.EXEC sp_attach_db @dbname = N'pubs',
@filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',
@filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log.ldf'
2. sp_attach_single_file_db
Examples
This example detaches pubs and then attaches one file from pubs to the current server.EXEC sp_detach_db @dbname = 'pubs'
EXEC sp_attach_single_file_db @dbname = 'pubs',
@physname = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf'