Hello,
I have pretty basic question regarding databases on my MS SQL server.
There are .MDF and .LDF files. From what I can tell (and I may well be VERY
wrong here), the MDF file is the REAL data. The LDF file are changes yet to
be merged into the live data.
1 - What are the LDF files?
2 - Why are they so big? Do they never flush?
3 - When do "transactions" become part of the "data"?
4 - If I want to make a Full backup of a database can I make a full database
backup or do I need to make a logfiles backup also to get a "full backup".
The database is not written so often to so a full backup each night is
enough.
Thanks in advance.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Magnus" <Magnus@.discussions.microsoft.com> wrote in message
news:C5C38AE4-1C1D-4B1F-BEB7-D22565A8FE8E@.microsoft.com...
> Hello,
> I have pretty basic question regarding databases on my MS SQL server.
> There are .MDF and .LDF files. From what I can tell (and I may well be
VERY
> wrong here), the MDF file is the REAL data. The LDF file are changes yet
to
> be merged into the live data.
> 1 - What are the LDF files?
The transaction log.
> 2 - Why are they so big? Do they never flush?
They grow until you either backup the log, or set the database to Simple
recovery mode
> 3 - When do "transactions" become part of the "data"?
Immediately when the transaction commits
> 4 - If I want to make a Full backup of a database can I make a full
database
> backup or do I need to make a logfiles backup also to get a "full backup".
> The database is not written so often to so a full backup each night is
> enough.
Set the database to Simple recovery mode, then backup the entire database
nightly... You will loose any transactions since the last full backup.
>
> Thanks in advance.
|||There is a section in BOL titled "Physical Database Architecture",
explaining the files and their usage. The section title "Backup/Restore
Architecture" will also be useful.
"Magnus" <Magnus@.discussions.microsoft.com> wrote in message
news:C5C38AE4-1C1D-4B1F-BEB7-D22565A8FE8E@.microsoft.com...
> Hello,
> I have pretty basic question regarding databases on my MS SQL server.
> There are .MDF and .LDF files. From what I can tell (and I may well be
VERY
> wrong here), the MDF file is the REAL data. The LDF file are changes yet
to
> be merged into the live data.
> 1 - What are the LDF files?
> 2 - Why are they so big? Do they never flush?
> 3 - When do "transactions" become part of the "data"?
> 4 - If I want to make a Full backup of a database can I make a full
database
> backup or do I need to make a logfiles backup also to get a "full backup".
> The database is not written so often to so a full backup each night is
> enough.
>
> Thanks in advance.
|||Some information scattered in these articles about why log files are
large...
http://www.aspfaq.com/2446
http://www.aspfaq.com/2471
http://www.aspfaq.com/
(Reverse address to reply.)
"Magnus" <Magnus@.discussions.microsoft.com> wrote in message
news:C5C38AE4-1C1D-4B1F-BEB7-D22565A8FE8E@.microsoft.com...
> Hello,
> I have pretty basic question regarding databases on my MS SQL server.
> There are .MDF and .LDF files. From what I can tell (and I may well be
VERY
> wrong here), the MDF file is the REAL data. The LDF file are changes yet
to
> be merged into the live data.
> 1 - What are the LDF files?
> 2 - Why are they so big? Do they never flush?
> 3 - When do "transactions" become part of the "data"?
> 4 - If I want to make a Full backup of a database can I make a full
database
> backup or do I need to make a logfiles backup also to get a "full backup".
> The database is not written so often to so a full backup each night is
> enough.
>
> Thanks in advance.
Showing posts with label mdf. Show all posts
Showing posts with label mdf. Show all posts
Monday, March 26, 2012
Question regarding .LDF and .MDF files and backup
Hello,
I have pretty basic question regarding databases on my MS SQL server.
There are .MDF and .LDF files. From what I can tell (and I may well be VERY
wrong here), the MDF file is the REAL data. The LDF file are changes yet to
be merged into the live data.
1 - What are the LDF files?
2 - Why are they so big? Do they never flush?
3 - When do "transactions" become part of the "data"?
4 - If I want to make a Full backup of a database can I make a full database
backup or do I need to make a logfiles backup also to get a "full backup".
The database is not written so often to so a full backup each night is
enough.
Thanks in advance.--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Magnus" <Magnus@.discussions.microsoft.com> wrote in message
news:C5C38AE4-1C1D-4B1F-BEB7-D22565A8FE8E@.microsoft.com...
> Hello,
> I have pretty basic question regarding databases on my MS SQL server.
> There are .MDF and .LDF files. From what I can tell (and I may well be
VERY
> wrong here), the MDF file is the REAL data. The LDF file are changes yet
to
> be merged into the live data.
> 1 - What are the LDF files?
The transaction log.
> 2 - Why are they so big? Do they never flush?
They grow until you either backup the log, or set the database to Simple
recovery mode
> 3 - When do "transactions" become part of the "data"?
Immediately when the transaction commits
> 4 - If I want to make a Full backup of a database can I make a full
database
> backup or do I need to make a logfiles backup also to get a "full backup".
> The database is not written so often to so a full backup each night is
> enough.
Set the database to Simple recovery mode, then backup the entire database
nightly... You will loose any transactions since the last full backup.
>
> Thanks in advance.|||There is a section in BOL titled "Physical Database Architecture",
explaining the files and their usage. The section title "Backup/Restore
Architecture" will also be useful.
"Magnus" <Magnus@.discussions.microsoft.com> wrote in message
news:C5C38AE4-1C1D-4B1F-BEB7-D22565A8FE8E@.microsoft.com...
> Hello,
> I have pretty basic question regarding databases on my MS SQL server.
> There are .MDF and .LDF files. From what I can tell (and I may well be
VERY
> wrong here), the MDF file is the REAL data. The LDF file are changes yet
to
> be merged into the live data.
> 1 - What are the LDF files?
> 2 - Why are they so big? Do they never flush?
> 3 - When do "transactions" become part of the "data"?
> 4 - If I want to make a Full backup of a database can I make a full
database
> backup or do I need to make a logfiles backup also to get a "full backup".
> The database is not written so often to so a full backup each night is
> enough.
>
> Thanks in advance.|||Some information scattered in these articles about why log files are
large...
http://www.aspfaq.com/2446
http://www.aspfaq.com/2471
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Magnus" <Magnus@.discussions.microsoft.com> wrote in message
news:C5C38AE4-1C1D-4B1F-BEB7-D22565A8FE8E@.microsoft.com...
> Hello,
> I have pretty basic question regarding databases on my MS SQL server.
> There are .MDF and .LDF files. From what I can tell (and I may well be
VERY
> wrong here), the MDF file is the REAL data. The LDF file are changes yet
to
> be merged into the live data.
> 1 - What are the LDF files?
> 2 - Why are they so big? Do they never flush?
> 3 - When do "transactions" become part of the "data"?
> 4 - If I want to make a Full backup of a database can I make a full
database
> backup or do I need to make a logfiles backup also to get a "full backup".
> The database is not written so often to so a full backup each night is
> enough.
>
> Thanks in advance.
I have pretty basic question regarding databases on my MS SQL server.
There are .MDF and .LDF files. From what I can tell (and I may well be VERY
wrong here), the MDF file is the REAL data. The LDF file are changes yet to
be merged into the live data.
1 - What are the LDF files?
2 - Why are they so big? Do they never flush?
3 - When do "transactions" become part of the "data"?
4 - If I want to make a Full backup of a database can I make a full database
backup or do I need to make a logfiles backup also to get a "full backup".
The database is not written so often to so a full backup each night is
enough.
Thanks in advance.--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Magnus" <Magnus@.discussions.microsoft.com> wrote in message
news:C5C38AE4-1C1D-4B1F-BEB7-D22565A8FE8E@.microsoft.com...
> Hello,
> I have pretty basic question regarding databases on my MS SQL server.
> There are .MDF and .LDF files. From what I can tell (and I may well be
VERY
> wrong here), the MDF file is the REAL data. The LDF file are changes yet
to
> be merged into the live data.
> 1 - What are the LDF files?
The transaction log.
> 2 - Why are they so big? Do they never flush?
They grow until you either backup the log, or set the database to Simple
recovery mode
> 3 - When do "transactions" become part of the "data"?
Immediately when the transaction commits
> 4 - If I want to make a Full backup of a database can I make a full
database
> backup or do I need to make a logfiles backup also to get a "full backup".
> The database is not written so often to so a full backup each night is
> enough.
Set the database to Simple recovery mode, then backup the entire database
nightly... You will loose any transactions since the last full backup.
>
> Thanks in advance.|||There is a section in BOL titled "Physical Database Architecture",
explaining the files and their usage. The section title "Backup/Restore
Architecture" will also be useful.
"Magnus" <Magnus@.discussions.microsoft.com> wrote in message
news:C5C38AE4-1C1D-4B1F-BEB7-D22565A8FE8E@.microsoft.com...
> Hello,
> I have pretty basic question regarding databases on my MS SQL server.
> There are .MDF and .LDF files. From what I can tell (and I may well be
VERY
> wrong here), the MDF file is the REAL data. The LDF file are changes yet
to
> be merged into the live data.
> 1 - What are the LDF files?
> 2 - Why are they so big? Do they never flush?
> 3 - When do "transactions" become part of the "data"?
> 4 - If I want to make a Full backup of a database can I make a full
database
> backup or do I need to make a logfiles backup also to get a "full backup".
> The database is not written so often to so a full backup each night is
> enough.
>
> Thanks in advance.|||Some information scattered in these articles about why log files are
large...
http://www.aspfaq.com/2446
http://www.aspfaq.com/2471
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Magnus" <Magnus@.discussions.microsoft.com> wrote in message
news:C5C38AE4-1C1D-4B1F-BEB7-D22565A8FE8E@.microsoft.com...
> Hello,
> I have pretty basic question regarding databases on my MS SQL server.
> There are .MDF and .LDF files. From what I can tell (and I may well be
VERY
> wrong here), the MDF file is the REAL data. The LDF file are changes yet
to
> be merged into the live data.
> 1 - What are the LDF files?
> 2 - Why are they so big? Do they never flush?
> 3 - When do "transactions" become part of the "data"?
> 4 - If I want to make a Full backup of a database can I make a full
database
> backup or do I need to make a logfiles backup also to get a "full backup".
> The database is not written so often to so a full backup each night is
> enough.
>
> Thanks in advance.
Friday, March 23, 2012
Question on Tempdb mdf & ldf files
Thanks in advance.
I have heard much about putting tempdb on separate raid 1 spindles but
should I go further and put the tempdb data and tempdb logs on separate
spindles? Will that buy me anything? This will be a very large db server, a
cluster, and will have multiple dbs. I have two large raid 10 arrays for
data and multiple raid 1 arrays for logs and can separate out tempdb further
so the data has its own raid 1 array and the tempdb logs can have its own
raid 1 array as well. This is all on an emc san, cx400.
Thanks,
John
hard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon
|||Hi John,
Take a look at this article.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/default...b;en-us;328551
The article discusses some of the enhancement made in SP 4 and ways to
enhance tempdb performance.
Yih-Yoon Lee
E-mail: yihyoon@.gmail.com
John - PDX wrote:
> Thanks in advance.
> I have heard much about putting tempdb on separate raid 1 spindles but
> should I go further and put the tempdb data and tempdb logs on separate
> spindles? Will that buy me anything? This will be a very large db server, a
> cluster, and will have multiple dbs. I have two large raid 10 arrays for
> data and multiple raid 1 arrays for logs and can separate out tempdb further
> so the data has its own raid 1 array and the tempdb logs can have its own
> raid 1 array as well. This is all on an emc san, cx400.
|||For a consolidated system, it is a good idea to seperate out at least the
TempDB data file(s). In our installation, we have also seperated out the
log files even though most of the activity resides in the data files.
Also, check out the following KB. You might want to consider planning this
now instead of waiting for it to happen to you.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/default...b;en-us;328551
This recommendation includes applying a hotfix, setting a trace flag, and
creating multiple fixed sized data files for tempdb.
Sincerely,
Anthony Thomas
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:%23wCVc%23uaFHA.2536@.TK2MSFTNGP10.phx.gbl...
hard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon
sql
I have heard much about putting tempdb on separate raid 1 spindles but
should I go further and put the tempdb data and tempdb logs on separate
spindles? Will that buy me anything? This will be a very large db server, a
cluster, and will have multiple dbs. I have two large raid 10 arrays for
data and multiple raid 1 arrays for logs and can separate out tempdb further
so the data has its own raid 1 array and the tempdb logs can have its own
raid 1 array as well. This is all on an emc san, cx400.
Thanks,
John
hard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon
|||Hi John,
Take a look at this article.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/default...b;en-us;328551
The article discusses some of the enhancement made in SP 4 and ways to
enhance tempdb performance.
Yih-Yoon Lee
E-mail: yihyoon@.gmail.com
John - PDX wrote:
> Thanks in advance.
> I have heard much about putting tempdb on separate raid 1 spindles but
> should I go further and put the tempdb data and tempdb logs on separate
> spindles? Will that buy me anything? This will be a very large db server, a
> cluster, and will have multiple dbs. I have two large raid 10 arrays for
> data and multiple raid 1 arrays for logs and can separate out tempdb further
> so the data has its own raid 1 array and the tempdb logs can have its own
> raid 1 array as well. This is all on an emc san, cx400.
|||For a consolidated system, it is a good idea to seperate out at least the
TempDB data file(s). In our installation, we have also seperated out the
log files even though most of the activity resides in the data files.
Also, check out the following KB. You might want to consider planning this
now instead of waiting for it to happen to you.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/default...b;en-us;328551
This recommendation includes applying a hotfix, setting a trace flag, and
creating multiple fixed sized data files for tempdb.
Sincerely,
Anthony Thomas
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:%23wCVc%23uaFHA.2536@.TK2MSFTNGP10.phx.gbl...
hard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon
sql
Question on Tempdb mdf & ldf files
Thanks in advance.
I have heard much about putting tempdb on separate raid 1 spindles but
should I go further and put the tempdb data and tempdb logs on separate
spindles? Will that buy me anything? This will be a very large db server, a
cluster, and will have multiple dbs. I have two large raid 10 arrays for
data and multiple raid 1 arrays for logs and can separate out tempdb further
so the data has its own raid 1 array and the tempdb logs can have its own
raid 1 array as well. This is all on an emc san, cx400.
--
Thanks,
Johnhard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon|||Hi John,
Take a look at this article.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/defaul...kb;en-us;328551
The article discusses some of the enhancement made in SP 4 and ways to
enhance tempdb performance.
Yih-Yoon Lee
E-mail: yihyoon@.gmail.com
John - PDX wrote:
> Thanks in advance.
> I have heard much about putting tempdb on separate raid 1 spindles but
> should I go further and put the tempdb data and tempdb logs on separate
> spindles? Will that buy me anything? This will be a very large db server,
a
> cluster, and will have multiple dbs. I have two large raid 10 arrays for
> data and multiple raid 1 arrays for logs and can separate out tempdb furth
er
> so the data has its own raid 1 array and the tempdb logs can have its own
> raid 1 array as well. This is all on an emc san, cx400.|||For a consolidated system, it is a good idea to seperate out at least the
TempDB data file(s). In our installation, we have also seperated out the
log files even though most of the activity resides in the data files.
Also, check out the following KB. You might want to consider planning this
now instead of waiting for it to happen to you.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/defaul...kb;en-us;328551
This recommendation includes applying a hotfix, setting a trace flag, and
creating multiple fixed sized data files for tempdb.
Sincerely,
Anthony Thomas
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:%23wCVc%23uaFHA.2536@.TK2MSFTNGP10.phx.gbl...
hard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon
I have heard much about putting tempdb on separate raid 1 spindles but
should I go further and put the tempdb data and tempdb logs on separate
spindles? Will that buy me anything? This will be a very large db server, a
cluster, and will have multiple dbs. I have two large raid 10 arrays for
data and multiple raid 1 arrays for logs and can separate out tempdb further
so the data has its own raid 1 array and the tempdb logs can have its own
raid 1 array as well. This is all on an emc san, cx400.
--
Thanks,
Johnhard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon|||Hi John,
Take a look at this article.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/defaul...kb;en-us;328551
The article discusses some of the enhancement made in SP 4 and ways to
enhance tempdb performance.
Yih-Yoon Lee
E-mail: yihyoon@.gmail.com
John - PDX wrote:
> Thanks in advance.
> I have heard much about putting tempdb on separate raid 1 spindles but
> should I go further and put the tempdb data and tempdb logs on separate
> spindles? Will that buy me anything? This will be a very large db server,
a
> cluster, and will have multiple dbs. I have two large raid 10 arrays for
> data and multiple raid 1 arrays for logs and can separate out tempdb furth
er
> so the data has its own raid 1 array and the tempdb logs can have its own
> raid 1 array as well. This is all on an emc san, cx400.|||For a consolidated system, it is a good idea to seperate out at least the
TempDB data file(s). In our installation, we have also seperated out the
log files even though most of the activity resides in the data files.
Also, check out the following KB. You might want to consider planning this
now instead of waiting for it to happen to you.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/defaul...kb;en-us;328551
This recommendation includes applying a hotfix, setting a trace flag, and
creating multiple fixed sized data files for tempdb.
Sincerely,
Anthony Thomas
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:%23wCVc%23uaFHA.2536@.TK2MSFTNGP10.phx.gbl...
hard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon
Question on Tempdb mdf & ldf files
Thanks in advance.
I have heard much about putting tempdb on separate raid 1 spindles but
should I go further and put the tempdb data and tempdb logs on separate
spindles? Will that buy me anything? This will be a very large db server, a
cluster, and will have multiple dbs. I have two large raid 10 arrays for
data and multiple raid 1 arrays for logs and can separate out tempdb further
so the data has its own raid 1 array and the tempdb logs can have its own
raid 1 array as well. This is all on an emc san, cx400.
--
Thanks,
Johnhard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon|||Hi John,
Take a look at this article.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
The article discusses some of the enhancement made in SP 4 and ways to
enhance tempdb performance.
Yih-Yoon Lee
E-mail: yihyoon@.gmail.com
John - PDX wrote:
> Thanks in advance.
> I have heard much about putting tempdb on separate raid 1 spindles but
> should I go further and put the tempdb data and tempdb logs on separate
> spindles? Will that buy me anything? This will be a very large db server, a
> cluster, and will have multiple dbs. I have two large raid 10 arrays for
> data and multiple raid 1 arrays for logs and can separate out tempdb further
> so the data has its own raid 1 array and the tempdb logs can have its own
> raid 1 array as well. This is all on an emc san, cx400.|||For a consolidated system, it is a good idea to seperate out at least the
TempDB data file(s). In our installation, we have also seperated out the
log files even though most of the activity resides in the data files.
Also, check out the following KB. You might want to consider planning this
now instead of waiting for it to happen to you.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
This recommendation includes applying a hotfix, setting a trace flag, and
creating multiple fixed sized data files for tempdb.
Sincerely,
Anthony Thomas
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:%23wCVc%23uaFHA.2536@.TK2MSFTNGP10.phx.gbl...
hard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon
I have heard much about putting tempdb on separate raid 1 spindles but
should I go further and put the tempdb data and tempdb logs on separate
spindles? Will that buy me anything? This will be a very large db server, a
cluster, and will have multiple dbs. I have two large raid 10 arrays for
data and multiple raid 1 arrays for logs and can separate out tempdb further
so the data has its own raid 1 array and the tempdb logs can have its own
raid 1 array as well. This is all on an emc san, cx400.
--
Thanks,
Johnhard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon|||Hi John,
Take a look at this article.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
The article discusses some of the enhancement made in SP 4 and ways to
enhance tempdb performance.
Yih-Yoon Lee
E-mail: yihyoon@.gmail.com
John - PDX wrote:
> Thanks in advance.
> I have heard much about putting tempdb on separate raid 1 spindles but
> should I go further and put the tempdb data and tempdb logs on separate
> spindles? Will that buy me anything? This will be a very large db server, a
> cluster, and will have multiple dbs. I have two large raid 10 arrays for
> data and multiple raid 1 arrays for logs and can separate out tempdb further
> so the data has its own raid 1 array and the tempdb logs can have its own
> raid 1 array as well. This is all on an emc san, cx400.|||For a consolidated system, it is a good idea to seperate out at least the
TempDB data file(s). In our installation, we have also seperated out the
log files even though most of the activity resides in the data files.
Also, check out the following KB. You might want to consider planning this
now instead of waiting for it to happen to you.
FIX: Concurrency enhancements for the tempdb database
http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
This recommendation includes applying a hotfix, setting a trace flag, and
creating multiple fixed sized data files for tempdb.
Sincerely,
Anthony Thomas
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:%23wCVc%23uaFHA.2536@.TK2MSFTNGP10.phx.gbl...
hard to say.
You'll likely have to test this with the SQL IO Stress tool or some other
test tool.
Greg Jackson
PDX, Oregon
Subscribe to:
Posts (Atom)