avatar
发包子,每周一题# Database - 数据库
z*y
1
I have database (oracle or sql server), at point A the full backup job
started, at point B the full backup job ended.
question:
So when you restored the database, right after the restored process was done
, is the database in Point B or in Point A
Pickup oracle or SQL Server as an example to explain in detail.
Another question regarding SQL Server:
I have backup of a database db1, before restoring the backup file is only
15GB. After restored the database is 100GB. There are several possible
reas
avatar
j*n
2
Based on SQLSRV 2k5 BOL:
A full database backup backs up the whole database. This includes part of
the transaction log so that the full database backup can be recovered. Full
database backups represent the database at the time the backup finished.
Therefore, I believe it is Point B.

done

【在 z***y 的大作中提到】
: I have database (oracle or sql server), at point A the full backup job
: started, at point B the full backup job ended.
: question:
: So when you restored the database, right after the restored process was done
: , is the database in Point B or in Point A
: Pickup oracle or SQL Server as an example to explain in detail.
: Another question regarding SQL Server:
: I have backup of a database db1, before restoring the backup file is only
: 15GB. After restored the database is 100GB. There are several possible
: reas

avatar
z*y
3
The answer was correct.
I am waiting for someone to detail the process in Oracle when full backup
happened. Here's the one for SQL Server:
When full back process started, a checkpoint will be issued to flush out all
data from buffer to disk. Then SQL Server will mark the LSN, let's call it
lsn1. This is important to minimize time spent when restore.
Then data files will be read (in 64k instead of page by page). During this
process sql server will still take new transactions. During this process

【在 j*****n 的大作中提到】
: Based on SQLSRV 2k5 BOL:
: A full database backup backs up the whole database. This includes part of
: the transaction log so that the full database backup can be recovered. Full
: database backups represent the database at the time the backup finished.
: Therefore, I believe it is Point B.
:
: done

avatar
z*y
4
Anyone want to answer the second question?
50 bozi.

done

【在 z***y 的大作中提到】
: I have database (oracle or sql server), at point A the full backup job
: started, at point B the full backup job ended.
: question:
: So when you restored the database, right after the restored process was done
: , is the database in Point B or in Point A
: Pickup oracle or SQL Server as an example to explain in detail.
: Another question regarding SQL Server:
: I have backup of a database db1, before restoring the backup file is only
: 15GB. After restored the database is 100GB. There are several possible
: reas

avatar
gy
5
2nd Q:
Reason 1: compressed backup file (at least in SQL2008是这样的, or 3rd-party
tools).
Reason 2: ....(还在想)

【在 z***y 的大作中提到】
: Anyone want to answer the second question?
: 50 bozi.
:
: done

avatar
j*n
6
Your 2nd question is really hard (at least for me); I'd like to take my best
guess based on my knowledge... correct me!
1. SQL Server restores data to its original disk allocation;
2. Transaction log were not truncated after full backup.
my 2 cents.

【在 z***y 的大作中提到】
: Anyone want to answer the second question?
: 50 bozi.
:
: done

avatar
z*y
7
jackrun 的第一个理由还是对的.
when backup, only pages having data will be included into backup. But when
restored it will claim the same usage percentage as of before backup.
The second reason, when backup there are many transactions happened between
LSNx and POINT B.
GY 's comment was new to me.. and it is valid answer. Thanks a lot!
I sent Jackrun and GY $100 weiming bi each.
avatar
w*e
8
en, GY的说法确实比较新.
但是, zenny, 你说的第二点, 有点疑问哈, 因为backup file应该是包含了POINT B的,
也就是说包含了"many transactions happened between LSNx and POINT B". 你再用
这个来解释好象不对呀.

between

【在 z***y 的大作中提到】
: jackrun 的第一个理由还是对的.
: when backup, only pages having data will be included into backup. But when
: restored it will claim the same usage percentage as of before backup.
: The second reason, when backup there are many transactions happened between
: LSNx and POINT B.
: GY 's comment was new to me.. and it is valid answer. Thanks a lot!
: I sent Jackrun and GY $100 weiming bi each.

avatar
gy
9
Jackrun的第一条就是我当时想的第二条理由, 就是一直没组织好语句....(汗!)

between

【在 z***y 的大作中提到】
: jackrun 的第一个理由还是对的.
: when backup, only pages having data will be included into backup. But when
: restored it will claim the same usage percentage as of before backup.
: The second reason, when backup there are many transactions happened between
: LSNx and POINT B.
: GY 's comment was new to me.. and it is valid answer. Thanks a lot!
: I sent Jackrun and GY $100 weiming bi each.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。