sql2000附加数据出错,求救高手?

sql2000附加数据出错,求救高手?,第1张

楼主按以下步骤处理:

楼主删除日志文件.ldf/或放在其它位置

只附加数据库文件,数据库会自生成新的日志文件.

简单问题时,以上可解决,不行时.只可有数据库修复

给你一段建立数据库的代码:我是用的Sqlserver 2005的;希望楼主用的上

exec xp_cmdshell 'mkdir D:\GoldSwallow' --建立文件夹

go

if exists(select * from sysdatabases where name='GoldSwallowDB')

drop database GoldSwallowDB

go

create database GoldSwallowDB

on

(

name='GoldSwallowDB_data',

filename='D:\GoldSwallow\GoldSwallowDB.mdf',

size=3mb,

filegrowth=15%

)

log on

(

name='GoldSwallowDB_log',

filename='D:\GoldSwallow\GoldSwallowDB.ldf',

size=3mb,

filegrowth=15%

)

go


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/10039264.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-04
下一篇 2023-05-04

发表评论

登录后才能评论

评论列表(0条)

保存