Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / Restore database / 5 сообщений из 5, страница 1 из 1
13.03.2002, 17:47
    #32025139
Andry
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Restore database
Ув. знатоки подскажите пож.
restore database параметр STANDBY = undo_file_name для чего нужен. Можно ли при помощи этого файла откатить базу при восстановлении назад.
Т.е. восстанавливаю я transaction log и вдруг понимаю, что последний лог восстанавливать не нужно было.
...
Рейтинг: 0 / 0
13.03.2002, 20:26
    #32025144
Александр Гладченко
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Restore database
Если последний лог восстанавливать не нужно было, придётся заново всё восстанавливать, до этого бэкапа лога Откатов тут не предусмотрено...
...
Рейтинг: 0 / 0
14.03.2002, 05:58
    #32025155
Andry
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Restore database
Объясните пож. назначение undo_file_name в restore database.
...
Рейтинг: 0 / 0
14.03.2002, 06:52
    #32025161
LazyWriter
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Restore database
Вот, небольшое
пояснение на эту тему из Inside SQL SERVER 2000.

Restoring with standby

In normal recovery operations, you have the choice of either running recovery to roll back incomplete transactions or not running recovery. If you run recovery, no further log backups can be restored and the database is fully usable. If you don't run recovery, the database is inconsistent and SQL Server won't let you use it at all. You have to choose one or the other because of the way log backups are made.

For example, in SQL Server 2000, log backups do not overlap—each log backup starts where the previous one ended. Consider a transaction that makes hundreds of updates to a single table. If you back up the log in the middle of the updating and again after the updating is finished, the first log backup will have the beginning of the transaction and some of the updates and the second log backup will have the remainder of the updates and the commit. Suppose you then need to restore these log backups after restoring the full database. If, after restoring the first log backup, you run recovery, the first part of the transaction is rolled back. If you then try to restore the second log backup, it will start in the middle of a transaction and SQL Server won't know what the beginning of the transaction did. You certainly can't recover transactions from this point because their operations might depend on this update that you've lost part of. So, SQL Server will not allow any more restoring to be done. The alternative is to not run recovery to roll back the first part of the transaction, but instead to leave the transaction incomplete. SQL Server will know that the database is inconsistent and will not allow any users into the database until you finally run recovery on it.

What if you want to combine the two approaches? It would be nice to be able to restore one log backup and look at the data before restoring more log backups, particularly if you're trying to do a point-in-time recovery, but you won't know what the right point is. SQL Server provides an option called STANDBY that allows you to recover the database and still restore more log backups. If you restore a log backup and specify WITH STANDBY = '<some filename>', SQL Server will roll back incomplete transactions but keep track of the rolled-back work in the specified file, which is known as a standby file. The next restore operation will first read the contents of the standby file and redo the operations that were rolled back, and then it will restore the next log. If that restore also specifies WITH STANDBY, incomplete transactions will again be rolled back but a record of those rolled back transactions will be saved. Keep in mind that you can't modify any data if you've restored WITH STANDBY (SQL Server will generate an error message if you try), but you can read the data and continue to restore more logs. The final log must be restored WITH RECOVERY (and no standby file will be kept) to make the database fully usable.
...
Рейтинг: 0 / 0
14.03.2002, 08:23
    #32025180
Александр Гладченко
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Restore database
Файл отмены относится к понятию Резервный сервер ( http://www.sql.ru/subscribe/70028/06.shtml#8 )и используется для организации его работы. Фактически - это аналог журнала транзакций...
...
Рейтинг: 0 / 0
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / Restore database / 5 сообщений из 5, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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