Showing posts with label body. Show all posts
Showing posts with label body. Show all posts

Tuesday, March 27, 2012

Difference between NORECOVERY and NO_TRUNCATE

Hi
Can some body explain me the difference between NORECOVERY and NO_TRUNCATE
with options for BACKUP LOG statement.NO_TRUNCATE
Specifies that the log not be truncated and causes the Database Engine to
attempt the backup regardless of the state of the database. Consequently, a
backup taken with NO_TRUNCATE might have incomplete metadata. This option
allows backing up the log in situations where the database is damaged.
NORECOVERY
Backs up the tail of the log and leaves the database in the RESTORING state.
NORECOVERY is useful when failing over to a secondary database or when
saving the tail of the log before a RESTORE operation.
For more info about BACKUP command go to the following link:
http://msdn2.microsoft.com/en-us/library/ms186865.aspx
Ekrem ?nsoy
"Balaji" <Balaji@.discussions.microsoft.com> wrote in message
news:58439EBF-9080-484F-A5DD-B9856BD0913E@.microsoft.com...
> Hi
> Can some body explain me the difference between NORECOVERY and NO_TRUNCATE
> with options for BACKUP LOG statement.
>|||Hi Ekrem,
Can you please explain the difference with an example.
"Ekrem ?nsoy" wrote:

> NO_TRUNCATE
> Specifies that the log not be truncated and causes the Database Engine to
> attempt the backup regardless of the state of the database. Consequently,
a
> backup taken with NO_TRUNCATE might have incomplete metadata. This option
> allows backing up the log in situations where the database is damaged.
> NORECOVERY
> Backs up the tail of the log and leaves the database in the RESTORING stat
e.
> NORECOVERY is useful when failing over to a secondary database or when
> saving the tail of the log before a RESTORE operation.
> For more info about BACKUP command go to the following link:
> http://msdn2.microsoft.com/en-us/library/ms186865.aspx
> --
> Ekrem ?nsoy
>
> "Balaji" <Balaji@.discussions.microsoft.com> wrote in message
> news:58439EBF-9080-484F-A5DD-B9856BD0913E@.microsoft.com...
>|||There are three ways of Recovery State:
1-RECOVERY
2-NORECOVERY
3-STANDBY
If you restore your database in recovery, then your database will be online
and your users will be able to perform any operation against it.
If you restore your database in NORECOVERY then your users will not be able
to query your database.
If you restore your database in STANDBY then your users will be able to use
only SELECT against it.
Every recovery state has a purpose. You should read about this from BOL for
more information.
For example NORECOVERY and STANDBY states are being used in Log Shipping. If
you use NORECOVERY for your Log Shipping solution then your users will not
be able to query against the database on your secondary server. If you
restore your secondary database then your users will be able to query (only
SELECT) against it however your users will be disconnected each time for the
new transactions to be applied to the secondary database.
Example for no_truncate:
BACKUP LOG AdventureWorks TO DISK = N'C:\test\tiesto.bak' WITH NO_TRUNCATE
This hint is used for inaccessible database. Tibor has an article about
this, you can read it for more info:
http://www.karaszi.com/SQLServer/in...no_truncate.asp
Ekrem ?nsoy
"Balaji" <Balaji@.discussions.microsoft.com> wrote in message
news:AFC8BD66-6474-4837-A80A-B9D3FF0068E3@.microsoft.com...[vbcol=seagreen]
> Hi Ekrem,
> Can you please explain the difference with an example.
> "Ekrem ?nsoy" wrote:
>

Difference between NORECOVERY and NO_TRUNCATE

Hi
Can some body explain me the difference between NORECOVERY and NO_TRUNCATE
with options for BACKUP LOG statement.NO_TRUNCATE
Specifies that the log not be truncated and causes the Database Engine to
attempt the backup regardless of the state of the database. Consequently, a
backup taken with NO_TRUNCATE might have incomplete metadata. This option
allows backing up the log in situations where the database is damaged.
NORECOVERY
Backs up the tail of the log and leaves the database in the RESTORING state.
NORECOVERY is useful when failing over to a secondary database or when
saving the tail of the log before a RESTORE operation.
For more info about BACKUP command go to the following link:
http://msdn2.microsoft.com/en-us/library/ms186865.aspx
--
Ekrem Ã?nsoy
"Balaji" <Balaji@.discussions.microsoft.com> wrote in message
news:58439EBF-9080-484F-A5DD-B9856BD0913E@.microsoft.com...
> Hi
> Can some body explain me the difference between NORECOVERY and NO_TRUNCATE
> with options for BACKUP LOG statement.
>|||Hi Ekrem,
Can you please explain the difference with an example.
"Ekrem Ã?nsoy" wrote:
> NO_TRUNCATE
> Specifies that the log not be truncated and causes the Database Engine to
> attempt the backup regardless of the state of the database. Consequently, a
> backup taken with NO_TRUNCATE might have incomplete metadata. This option
> allows backing up the log in situations where the database is damaged.
> NORECOVERY
> Backs up the tail of the log and leaves the database in the RESTORING state.
> NORECOVERY is useful when failing over to a secondary database or when
> saving the tail of the log before a RESTORE operation.
> For more info about BACKUP command go to the following link:
> http://msdn2.microsoft.com/en-us/library/ms186865.aspx
> --
> Ekrem Ã?nsoy
>
> "Balaji" <Balaji@.discussions.microsoft.com> wrote in message
> news:58439EBF-9080-484F-A5DD-B9856BD0913E@.microsoft.com...
> > Hi
> >
> > Can some body explain me the difference between NORECOVERY and NO_TRUNCATE
> > with options for BACKUP LOG statement.
> >
> >
>|||There are three ways of Recovery State:
1-RECOVERY
2-NORECOVERY
3-STANDBY
If you restore your database in recovery, then your database will be online
and your users will be able to perform any operation against it.
If you restore your database in NORECOVERY then your users will not be able
to query your database.
If you restore your database in STANDBY then your users will be able to use
only SELECT against it.
Every recovery state has a purpose. You should read about this from BOL for
more information.
For example NORECOVERY and STANDBY states are being used in Log Shipping. If
you use NORECOVERY for your Log Shipping solution then your users will not
be able to query against the database on your secondary server. If you
restore your secondary database then your users will be able to query (only
SELECT) against it however your users will be disconnected each time for the
new transactions to be applied to the secondary database.
Example for no_truncate:
BACKUP LOG AdventureWorks TO DISK = N'C:\test\tiesto.bak' WITH NO_TRUNCATE
This hint is used for inaccessible database. Tibor has an article about
this, you can read it for more info:
http://www.karaszi.com/SQLServer/info_restore_no_truncate.asp
--
Ekrem Ã?nsoy
"Balaji" <Balaji@.discussions.microsoft.com> wrote in message
news:AFC8BD66-6474-4837-A80A-B9D3FF0068E3@.microsoft.com...
> Hi Ekrem,
> Can you please explain the difference with an example.
> "Ekrem Ã?nsoy" wrote:
>> NO_TRUNCATE
>> Specifies that the log not be truncated and causes the Database Engine to
>> attempt the backup regardless of the state of the database. Consequently,
>> a
>> backup taken with NO_TRUNCATE might have incomplete metadata. This option
>> allows backing up the log in situations where the database is damaged.
>> NORECOVERY
>> Backs up the tail of the log and leaves the database in the RESTORING
>> state.
>> NORECOVERY is useful when failing over to a secondary database or when
>> saving the tail of the log before a RESTORE operation.
>> For more info about BACKUP command go to the following link:
>> http://msdn2.microsoft.com/en-us/library/ms186865.aspx
>> --
>> Ekrem Ã?nsoy
>>
>> "Balaji" <Balaji@.discussions.microsoft.com> wrote in message
>> news:58439EBF-9080-484F-A5DD-B9856BD0913E@.microsoft.com...
>> > Hi
>> >
>> > Can some body explain me the difference between NORECOVERY and
>> > NO_TRUNCATE
>> > with options for BACKUP LOG statement.
>> >
>> >sql

Difference between NORECOVERY and NO_TRUNCATE

Hi
Can some body explain me the difference between NORECOVERY and NO_TRUNCATE
with options for BACKUP LOG statement.
NO_TRUNCATE
Specifies that the log not be truncated and causes the Database Engine to
attempt the backup regardless of the state of the database. Consequently, a
backup taken with NO_TRUNCATE might have incomplete metadata. This option
allows backing up the log in situations where the database is damaged.
NORECOVERY
Backs up the tail of the log and leaves the database in the RESTORING state.
NORECOVERY is useful when failing over to a secondary database or when
saving the tail of the log before a RESTORE operation.
For more info about BACKUP command go to the following link:
http://msdn2.microsoft.com/en-us/library/ms186865.aspx
Ekrem ?nsoy
"Balaji" <Balaji@.discussions.microsoft.com> wrote in message
news:58439EBF-9080-484F-A5DD-B9856BD0913E@.microsoft.com...
> Hi
> Can some body explain me the difference between NORECOVERY and NO_TRUNCATE
> with options for BACKUP LOG statement.
>
|||Hi Ekrem,
Can you please explain the difference with an example.
"Ekrem ?nsoy" wrote:

> NO_TRUNCATE
> Specifies that the log not be truncated and causes the Database Engine to
> attempt the backup regardless of the state of the database. Consequently, a
> backup taken with NO_TRUNCATE might have incomplete metadata. This option
> allows backing up the log in situations where the database is damaged.
> NORECOVERY
> Backs up the tail of the log and leaves the database in the RESTORING state.
> NORECOVERY is useful when failing over to a secondary database or when
> saving the tail of the log before a RESTORE operation.
> For more info about BACKUP command go to the following link:
> http://msdn2.microsoft.com/en-us/library/ms186865.aspx
> --
> Ekrem ?nsoy
>
> "Balaji" <Balaji@.discussions.microsoft.com> wrote in message
> news:58439EBF-9080-484F-A5DD-B9856BD0913E@.microsoft.com...
>
|||There are three ways of Recovery State:
1-RECOVERY
2-NORECOVERY
3-STANDBY
If you restore your database in recovery, then your database will be online
and your users will be able to perform any operation against it.
If you restore your database in NORECOVERY then your users will not be able
to query your database.
If you restore your database in STANDBY then your users will be able to use
only SELECT against it.
Every recovery state has a purpose. You should read about this from BOL for
more information.
For example NORECOVERY and STANDBY states are being used in Log Shipping. If
you use NORECOVERY for your Log Shipping solution then your users will not
be able to query against the database on your secondary server. If you
restore your secondary database then your users will be able to query (only
SELECT) against it however your users will be disconnected each time for the
new transactions to be applied to the secondary database.
Example for no_truncate:
BACKUP LOG AdventureWorks TO DISK = N'C:\test\tiesto.bak' WITH NO_TRUNCATE
This hint is used for inaccessible database. Tibor has an article about
this, you can read it for more info:
http://www.karaszi.com/SQLServer/info_restore_no_truncate.asp
Ekrem ?nsoy
"Balaji" <Balaji@.discussions.microsoft.com> wrote in message
news:AFC8BD66-6474-4837-A80A-B9D3FF0068E3@.microsoft.com...[vbcol=seagreen]
> Hi Ekrem,
> Can you please explain the difference with an example.
> "Ekrem ?nsoy" wrote:

Thursday, March 22, 2012

Difference

Can any body tell me about the different between query and Ad hoc query...
when we use this term ad hoc queries.
Thanks
Noor
Query is a more general term that refers to the act of selecting data
and could be saved (a view) or a select statement sent from a client
app. An ad hoc query usually refers to a query that is constructed in
client code by stitching together input from the user. The
concatenated SELECT statement (query) is then sent to the server to be
executed.
--Mary
On Fri, 25 Jun 2004 09:40:23 +0500, "Noor" <noor@.ngsol.com> wrote:

>Can any body tell me about the different between query and Ad hoc query...
>when we use this term ad hoc queries.
>Thanks
>Noor
>