adderall online



Sql server veritabanı kullanan herkesin başına muhakkak gelen bir olaydır, log dosyalarının bozulması . Bu gibi bir durumda log dosyamız olmadan mdf dosyamızı başka bir veritabanına attach etmek sorun olur. Bunun için aşşağıdaki yöntemleri izleyebiliriz.

1.Mdf dosyamızla aynı isimde bir veritabanı yaratıyorız.
2.Sql serverımızı durdurup oluşan mdf dosyasının yerine kendi mdf dosyamızı koyuyoruz.
3.Sql serverımızı başlatıyoruz.
4. Aşşağıdaki scriptleri çalıştırıyoruz

USE [master]
GO
ALTER DATABASE [DATABASEADI] SET EMERGENCY
GO
ALTER DATABASE [DATABASEADI] SET SINGLE_USER
GO
DBCC CHECKDB ([DATABASEADI], REPAIR_ALLOW_DATA_LOSS)
GO
ALTER DATABASE [DATABASEADI] SET MULTI_USER
GO
ALTER DATABASE [DATABASEADI] SET ONLINE
GO

Sql komutlarını çalıştırdıktan sonra aşşağıdaki gibi hata mesajları alacaksınız.

Msg 5173, Level 16, State 1, Line 1
One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from a backup.
Log file ‘c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS2008\MSSQL\DATA\MyDatabase_log.ldf’ does not match the primary file. It may be from a different database or the log may have been rebuilt previously.
Warning: The log for database ‘MyDatabase’ has been rebuilt. Transactional consistency has been lost. The RESTORE chain was broken, and the server no longer has context on the previous log files, so you will need to know what they were. You should run DBCC CHECKDB to validate physical consistency. The database has been put in dbo-only mode. When you are ready to make the database available for use, you will need to reset database options and delete any extra log files.
DBCC results for ‘MyDatabase’.
Service Broker Msg 9675, State 1: Message Types analyzed: 14.
Service Broker Msg 9676, State 1: Service Contracts analyzed: 6.
Service Broker Msg 9667, State 1: Services analyzed: 3.
Service Broker Msg 9668, State 1: Service Queues analyzed: 3.
Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.

… Long list of GBCC messages …

CHECKDB found 0 allocation errors and 0 consistency errors in database ‘MyDatabase’.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
———————–

Bu hata mesajlarına rağmen veritabanımız şuanda kullanıma hazırdır. Kolay gelsin :-)
Şuradan alıntıdır.

(2) Yorum var    Tumu   

Comments

cem on 28 Temmuz, 2009 at 10:07 #

Mükemmeldi.Denedim oldu.


Mehmet Elbuz on 28 Temmuz, 2009 at 10:35 #

Olduğuna sevindim . Kolay gelsin.


Yorum gonder
Isim:
Email:
Website:
Yorum:
  • Anket

    Windows 7 yi beğendiniz mi ?

    View Results

    Loading ... Loading ...
  • Bookmark and Share
  • Giriş

  • Son Yazılar

  • Etiket Bulutu

    abidin özmen Active directory kurulumu ahmet koç atatürk döneminde torpil Canon see him Dhcp kurulumu domuz gribi hakkında domuz gribinden korunma yolları domuz gribi nedir domuz gribi olduğumuz nasıl anlaşılır Facebook video facebook video indirmek Grace h1n1 virüsü hayat hayattan ibi nasıl anlaşılır idata interrail italya vize Kod renklendirme ldf olmadan veritabanı eklemek Nazım hikmet no ldf file Popup pencere radium girls radyum radyum kızları saklı yordamlar sansuresansur schengen Schengen vizesi sinan çetin reklam sql insert hatası sql server sql server 2005 sql server 2008 Startupscript stored procedure String or binary data would be truncated The statement has been terminated vize için gereken evraklar vize için gereken işlemler wordpress eklentileri yasaklar


  • Programlama