zoukankan      html  css  js  c++  java
  • 【生产问题】LDF丢失

    参考 : https://www.cnblogs.com/gered/p/9450622.html

    CREATE DATABASE db_logs ON  PRIMARY 
    ( NAME = N'db_logs_Data', FILENAME = N'D:dandantangdata1db_logs_Data1.mdf' , SIZE = 3072KB , FILEGROWTH = 10% )
     LOG ON 
    ( NAME = N'db_logs_log', FILENAME = N'E:dandantangdblogdb_logs_log1.ldf' , SIZE = 1024KB , FILEGROWTH = 10%)
    GO
    alter database db_logs set offline
    --覆盖替换 重命名替换
    alter database db_logs set online use db_logs alter database db_logs set emergency go --置数据库为单用户模式 alter database db_logs set single_user with rollback immediate go use master go --重建数据库日志文件 alter database db_logs Rebuild Log on (name=DataSource_Data_log,filename='E:dandantangdblogdb_logs_log.ldf') go --最后设置数据库为多用户模式。 alter database db_logs set multi_user

    所有DB,都可能需要的操作

    记住,运行之前一定要修改自增,不然会暴涨

    alter database db_del modify file
    ( NAME = N'db_del_Data',FILEGROWTH = 113072KB )



    alter
    database CQXX5000 set emergency alter database cqxx5000 set single_user with rollback immediate dbcc checkdb('cqxx5000',REPAIR_ALLOW_DATA_LOSS) alter database CQXX5000 set multi_user ALTER DATABASE CQXX5000 SET online
  • 相关阅读:
    Network (poj1144)
    C. Hongcow Builds A Nation
    ZYB loves Xor I(hud5269)
    D. Chloe and pleasant prizes
    Game(hdu5218)
    约瑟夫环的递推方法
    Misaki's Kiss again(hdu5175)
    Exploration(hdu5222)
    B. Arpa's weak amphitheater and Mehrdad's valuable Hoses
    C. Arpa's loud Owf and Mehrdad's evil plan
  • 原文地址:https://www.cnblogs.com/gered/p/10476162.html
Copyright © 2011-2022 走看看