powered by simpleCommunicator - 2.0.59     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / Attach database error
5 сообщений из 5, страница 1 из 1
Attach database error
    #32020283
Fingy
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Подскажите, пожалуйста, кто вкурсе...
MS SQL 2000, упал сервак... выгрузку базы сделать не успел(забыл ( , но есть my.mdf my.ldf файлы... пытаюсь приатачить, выдает ошибку 9004, error while processing the log for database my...
что делать? влияют ли настройки секьюрити на атач? хотя помоему sa и admin пароли поставил те же....

Заранее спасибо!
...
Рейтинг: 0 / 0
Attach database error
    #32020285
Garry
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Попробуй удалить .ldf
...
Рейтинг: 0 / 0
Attach database error
    #32020287
Fingy
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
не помогло, пишет, что не может воссоздать лог для определенной записи.... базе ек? восстановить можно?
...
Рейтинг: 0 / 0
Attach database error
    #32020289
Как я понял, sp_attach_single_file_db тоже не помог.
Тогда есть такое решение, найденное в английской конфе:

==================================================================
If you only have mdf file (no tran log file) and you want to retore
database. Follow the steps below.

Suppose your .mdf file which you want to restore is in directory
d:\test.
for example d:\test\old.mdf

Open Sql Enterprise Manager

1. Create a new database, name it 'dbMagic'.
2. In the data files tab, change file name to 'newData.mdf', change the file
directory to 'd:\test. Note down the data file name
3. In the Transaction Log tab, change file name to 'newLog.mdf', change the
file
directory to 'd:\test'. Note down the transaction log file name
4. Click ok
5. Stop the Sql Server
6. Browse to the directory 'd:\test'.
7. Delete the file 'newData.mdf'
8. Delete the file 'newLog.log'.
9. Rename the 'old.mdf' to 'newData.mdf'
10. Start the sql server service and refresh the server.
11. The staus of 'dbMagic' will change to 'Suspect'.
12. Execute the following query and make sure that you see a listing
for dbMagic in the records returned by the query.

'Select * from sysdatabases'

13. if you see a record for dbMagic in the records returned follow the
steps listed below and if you dont, mail me at vikas_tyagi@hotmail.com
14. In Query Analyzer execute the following Commands.

EXEC sp_detach_db @dbname = 'dbMagic'

EXEC sp_attach_single_file_db @dbname = 'dbMagic',
@physname = 'd:\newData.mdf'

14. Go to the Enterprise Manager, right click on Database and Refresh
it.
15. You will see dbMagic in normal mode.
16. Rejoice.



Let me know if it helps...
Vikas Tyagi
vikas_tyagi@hotmail.com
...
Рейтинг: 0 / 0
Attach database error
    #32020295
Fingy
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Как я понял, sp_attach_single_file_db тоже не помог.
да, выдает ту же ошибку...

а после выполнения предложенного вами решения, получил следующее
Server: Msg 3456, Level 21, State 1, Line 1
Could not redo log record (313:177:3),
for transaction ID (0:0), on page (1:11,
database 'dbMagic' (7). Page: LSN = (163:249:7), type = 1.
Log: OpCode = 4, context 12, PrevPageLSN: (313:61:3).

Connection Broken

после чего из Enterprise manager база испарилась
...
Рейтинг: 0 / 0
5 сообщений из 5, страница 1 из 1
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / Attach database error
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]