热情软件屋

 

用exec sp_attach_single_file_db,提示passed to log scan in database 'income' is invalid.


编号:QA003915
建立日期: 2001年2月25日 最后修改日期:2001年2月25日
所属类别:

qt113:
    操作系统:sqlsever
    编程工具:pb
    问题:我用SQLSEVE7.0建了数据库income,我嫌日志文件太大,我把income_log.ldf给删了。想用命令exec sp_attach_single_file_db
    生成个空的日志文件用命令后提示我passed to log scan in database 'income' is invalid.
    Connection Broken
    我的命令是
    exec sp_attach_single_file_db @dbname='income',
    @physname='J:\mssql7\data\income_data_mdf'
    这下完了!!!!
    水平: 刚入门

回答:

    Used sp_attach_single_file_db only on databases that were previously detached from the server using an explicit sp_detach_db operation.
    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:\mssql7\data\pubs.mdf'

此问题由张夷达回答。

 
把这个问题推荐给朋友
   
   
您的意见类别
您的名字
您的电子邮件
您的建议(请尽可能详细)
 
 

版权所有 1997-2008 热情软件屋
如果您有任何建议和意见, 请给我发个电子邮件 askpro@china-askpro.com
Web Designed by ZebraStudio