Wednesday, March 28, 2012
Recovery Model
choose whether to do a reorganise or rebuild (online or offline) for a
selected index.. ..I've set that when it does a rebuild to set the recovery
model to bulk logged.. ..I set the recovery model just before the rebuild and
revert just after, I've since been thinking if it needs to 100 rebuilds it
will switch the recovery model 100 times for the duration of each rebuild..
...would this be bad practice?
Ben
What is your current recover model? Is it FULL? Do you perform BACKUP LOG
operation?
Have you noticed a big difference in terms of performance if you run it on
FULL or BULK LOGGED recover model?
"Ben UK" <BenUK@.discussions.microsoft.com> wrote in message
news:5E7989D2-89AD-4AD1-9753-FB8BCE8BFD5F@.microsoft.com...
> I've created an index defrag script, based on a set of criteria it will
> choose whether to do a reorganise or rebuild (online or offline) for a
> selected index.. ..I've set that when it does a rebuild to set the
> recovery
> model to bulk logged.. ..I set the recovery model just before the rebuild
> and
> revert just after, I've since been thinking if it needs to 100 rebuilds it
> will switch the recovery model 100 times for the duration of each
> rebuild..
> ..would this be bad practice?
|||Current recovery model is Full, yes we do back up the logs.. ..this is to be
used on multiple servers with multiple databases so the frequency of log
backups can very greatly, the indexes this would be rebuilding are
potentially very large so I'm trying to avoid hammering the log in between
the log backups...
"Uri Dimant" wrote:
> Ben
> What is your current recover model? Is it FULL? Do you perform BACKUP LOG
> operation?
> Have you noticed a big difference in terms of performance if you run it on
> FULL or BULK LOGGED recover model?
>
>
> "Ben UK" <BenUK@.discussions.microsoft.com> wrote in message
> news:5E7989D2-89AD-4AD1-9753-FB8BCE8BFD5F@.microsoft.com...
>
>
|||Ben
Well , if you have enuogh free space , I don't think you need to switch
between FULL and BULL LOGGED as well as i have not seem such performance
issues.
However , can you rebuild your indexes at night for example where workload
is low.
"Ben UK" <BenUK@.discussions.microsoft.com> wrote in message
news:5AF71BFA-7B0A-4692-B227-AB66F44442AE@.microsoft.com...[vbcol=seagreen]
> Current recovery model is Full, yes we do back up the logs.. ..this is to
> be
> used on multiple servers with multiple databases so the frequency of log
> backups can very greatly, the indexes this would be rebuilding are
> potentially very large so I'm trying to avoid hammering the log in between
> the log backups...
> "Uri Dimant" wrote:
|||Ben UK wrote:
> I've created an index defrag script, based on a set of criteria it will
> choose whether to do a reorganise or rebuild (online or offline) for a
> selected index.. ..I've set that when it does a rebuild to set the recovery
> model to bulk logged.. ..I set the recovery model just before the rebuild and
> revert just after, I've since been thinking if it needs to 100 rebuilds it
> will switch the recovery model 100 times for the duration of each rebuild..
> ..would this be bad practice?
I wouldn't say it's "bad practice". I would, however, be concerned
about the possibility of some bulk operation being performed while you
have the recovery model switched. In other words, if you're automating
this switch between Full and Bulk-Logged, how will you control or
prevent some other process from doing something non-logged? A scheduled
maintenance window seems like a much "safer" way of managing reindexes.
Just my 2-cents.
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||That makes sense, thanks for the input Tracy
"Tracy McKibben" wrote:
> Ben UK wrote:
> I wouldn't say it's "bad practice". I would, however, be concerned
> about the possibility of some bulk operation being performed while you
> have the recovery model switched. In other words, if you're automating
> this switch between Full and Bulk-Logged, how will you control or
> prevent some other process from doing something non-logged? A scheduled
> maintenance window seems like a much "safer" way of managing reindexes.
> Just my 2-cents.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
Recovery Model
choose whether to do a reorganise or rebuild (online or offline) for a
selected index.. ..I've set that when it does a rebuild to set the recovery
model to bulk logged.. ..I set the recovery model just before the rebuild an
d
revert just after, I've since been thinking if it needs to 100 rebuilds it
will switch the recovery model 100 times for the duration of each rebuild..
..would this be bad practice?Ben
What is your current recover model? Is it FULL? Do you perform BACKUP LOG
operation?
Have you noticed a big difference in terms of performance if you run it on
FULL or BULK LOGGED recover model?
"Ben UK" <BenUK@.discussions.microsoft.com> wrote in message
news:5E7989D2-89AD-4AD1-9753-FB8BCE8BFD5F@.microsoft.com...
> I've created an index defrag script, based on a set of criteria it will
> choose whether to do a reorganise or rebuild (online or offline) for a
> selected index.. ..I've set that when it does a rebuild to set the
> recovery
> model to bulk logged.. ..I set the recovery model just before the rebuild
> and
> revert just after, I've since been thinking if it needs to 100 rebuilds it
> will switch the recovery model 100 times for the duration of each
> rebuild..
> ..would this be bad practice?|||Current recovery model is Full, yes we do back up the logs.. ..this is to be
used on multiple servers with multiple databases so the frequency of log
backups can very greatly, the indexes this would be rebuilding are
potentially very large so I'm trying to avoid hammering the log in between
the log backups...
"Uri Dimant" wrote:
> Ben
> What is your current recover model? Is it FULL? Do you perform BACKUP LOG
> operation?
> Have you noticed a big difference in terms of performance if you run it o
n
> FULL or BULK LOGGED recover model?
>
>
> "Ben UK" <BenUK@.discussions.microsoft.com> wrote in message
> news:5E7989D2-89AD-4AD1-9753-FB8BCE8BFD5F@.microsoft.com...
>
>|||Ben
Well , if you have enuogh free space , I don't think you need to switch
between FULL and BULL LOGGED as well as i have not seem such performance
issues.
However , can you rebuild your indexes at night for example where workload
is low.
"Ben UK" <BenUK@.discussions.microsoft.com> wrote in message
news:5AF71BFA-7B0A-4692-B227-AB66F44442AE@.microsoft.com...[vbcol=seagreen]
> Current recovery model is Full, yes we do back up the logs.. ..this is to
> be
> used on multiple servers with multiple databases so the frequency of log
> backups can very greatly, the indexes this would be rebuilding are
> potentially very large so I'm trying to avoid hammering the log in between
> the log backups...
> "Uri Dimant" wrote:
>|||Ben UK wrote:
> I've created an index defrag script, based on a set of criteria it will
> choose whether to do a reorganise or rebuild (online or offline) for a
> selected index.. ..I've set that when it does a rebuild to set the recover
y
> model to bulk logged.. ..I set the recovery model just before the rebuild
and
> revert just after, I've since been thinking if it needs to 100 rebuilds it
> will switch the recovery model 100 times for the duration of each rebuild.
.
> ..would this be bad practice?
I wouldn't say it's "bad practice". I would, however, be concerned
about the possibility of some bulk operation being performed while you
have the recovery model switched. In other words, if you're automating
this switch between Full and Bulk-Logged, how will you control or
prevent some other process from doing something non-logged? A scheduled
maintenance window seems like a much "safer" way of managing reindexes.
Just my 2-cents.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||That makes sense, thanks for the input Tracy
"Tracy McKibben" wrote:
> Ben UK wrote:
> I wouldn't say it's "bad practice". I would, however, be concerned
> about the possibility of some bulk operation being performed while you
> have the recovery model switched. In other words, if you're automating
> this switch between Full and Bulk-Logged, how will you control or
> prevent some other process from doing something non-logged? A scheduled
> maintenance window seems like a much "safer" way of managing reindexes.
> Just my 2-cents.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
Friday, March 9, 2012
Recover data with updated transaction Log only
The data is very important, please help.
Regards,
Thomas
If you are using the FULL recovery model, you can backup your transaction
log, restore the database (perhaps with a different name or server) and
apply the log up to the point of the problem. You can then extract the lost
data.
Your only other option is to use a utility like Log Explorer
www.lumigent.com to recover data from the log, if it is available.
Hope this helps.
Dan Guzman
SQL Server MVP
"Thomas Tsang" <thomast@.hkc.net> wrote in message
news:O1hYtVylEHA.2492@.TK2MSFTNGP15.phx.gbl...
I am newbie in MS SQL Server, today I wrongly run a script to clear all data
of a table, and the backup is one month ago. Can I just use the existing
transaction log to rollback what I have done today? If yes, how to do so.
The data is very important, please help.
Regards,
Thomas
|||I can retored the data that is one month ago, but what I need is the current
data.
I have readingthe doc about Log Explorer, but how can I check if the data is
still available in the log and can be recovered by the Log Explorer?
Regards,
Thomas
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> bl
news:%23DZrzhylEHA.3476@.tk2msftngp13.phx.gbl g...
> If you are using the FULL recovery model, you can backup your transaction
> log, restore the database (perhaps with a different name or server) and
> apply the log up to the point of the problem. You can then extract the
lost
> data.
> Your only other option is to use a utility like Log Explorer
> www.lumigent.com to recover data from the log, if it is available.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Thomas Tsang" <thomast@.hkc.net> wrote in message
> news:O1hYtVylEHA.2492@.TK2MSFTNGP15.phx.gbl...
> I am newbie in MS SQL Server, today I wrongly run a script to clear all
data
> of a table, and the backup is one month ago. Can I just use the existing
> transaction log to rollback what I have done today? If yes, how to do so.
> The data is very important, please help.
> Regards,
> Thomas
>
|||You'll need to run the utility to see if it is still available.
Hope this helps.
Dan Guzman
SQL Server MVP
"Thomas Tsang" <thomast@.hkc.net> wrote in message
news:uXa0GsylEHA.1656@.TK2MSFTNGP09.phx.gbl...
>I can retored the data that is one month ago, but what I need is the
>current
> data.
> I have readingthe doc about Log Explorer, but how can I check if the data
> is
> still available in the log and can be recovered by the Log Explorer?
> Regards,
> Thomas
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> bl
> news:%23DZrzhylEHA.3476@.tk2msftngp13.phx.gbl g...
> lost
> data
>
|||i know, but the trial version of Log Explorer is restricted to access my
database and the log...
Any ideas?
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> bl
news:ukfRFyylEHA.3544@.TK2MSFTNGP15.phx.gbl g...[vbcol=seagreen]
> You'll need to run the utility to see if it is still available.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Thomas Tsang" <thomast@.hkc.net> wrote in message
> news:uXa0GsylEHA.1656@.TK2MSFTNGP09.phx.gbl...
data[vbcol=seagreen]
transaction[vbcol=seagreen]
existing
>
|||You can get an idea of whats in the log using the undocumented fn_dblog
system function:
SELECT * FROM ::fn_dblog(null, null)
Hope this helps.
Dan Guzman
SQL Server MVP
"Thomas Tsang" <thomast@.hkc.net> wrote in message
news:%23hnAi6ylEHA.1244@.TK2MSFTNGP15.phx.gbl...
>i know, but the trial version of Log Explorer is restricted to access my
> database and the log...
> Any ideas?
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> bl
> news:ukfRFyylEHA.3544@.TK2MSFTNGP15.phx.gbl g...
> data
> transaction
> existing
>
|||Thx for your information, and the attached is the return data. I find that
the value of the column Checkpoint Begin in first record is match with the
time i start execute the wrong query, does it mean that the data can be get
back using Log Explorer?
Regards,
Thomas
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> bl
news:%23MiraJzlEHA.1672@.TK2MSFTNGP14.phx.gbl g...[vbcol=seagreen]
> You can get an idea of whats in the log using the undocumented fn_dblog
> system function:
> SELECT * FROM ::fn_dblog(null, null)
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Thomas Tsang" <thomast@.hkc.net> wrote in message
> news:%23hnAi6ylEHA.1244@.TK2MSFTNGP15.phx.gbl...
do
>
|||Attached file missing in previous mail...
"Thomas Tsang" <thomast@.hkc.net> bl
news:emIuHXzlEHA.2492@.TK2MSFTNGP15.phx.gbl g...
> Thx for your information, and the attached is the return data. I find
that
> the value of the column Checkpoint Begin in first record is match with the
> time i start execute the wrong query, does it mean that the data can be
get[vbcol=seagreen]
> back using Log Explorer?
> Regards,
> Thomas
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> bl
> news:%23MiraJzlEHA.1672@.TK2MSFTNGP14.phx.gbl g...
my[vbcol=seagreen]
the[vbcol=seagreen]
Explorer?[vbcol=seagreen]
server)[vbcol=seagreen]
extract[vbcol=seagreen]
clear[vbcol=seagreen]
to
> do
>
begin 666 result.txt
M0W5R<F5N="!,4TX@.(" @.(" @.(" @.("!/<&5R871I;VX@.(" @.(" @.(" @.(" @.
M(" @.($-O;G1E>'0@.(" @.(" @.(" @.(" @.(" @.(" @.5')A;G-A8W1I;VX@.240@.
M5&%G($)I=',@.3&]G(%)E8V]R9"!,96YG=&@.@.4')E=FEO=7,@.3%-.(" @.(" @.
M(" @.("!&;&%G($)I=',@.3V)J96-T($YA;64@.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M("!);F1E>"!.86UE(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.4&%G92!)1" @.(" @.("!3;&]T($E$(%!R979I;W5S(%!A9V4@.
M3%-.(" @.(" @.3V9F<V5T(&EN(%)O=R!.=6T@.16QE;65N=',@.16QE;65N="!%
M;&5M96YT($QE;F=T:"!/9F9S970@.4F]W($1A=&$@.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.($-H96-K<&]I;G0@.0F5G:6X@.(" @.(" @.($-(2U!4($)E9VEN
M($1"(%9E<G-I;VX@.36%X(%A$15-)1" @.(" @.3G5M(%1R86YS86-T:6]N<R!4
M<F%N<V%C=&EO;B!#='(@.5')A;G-A8W1I;VX@.240@.:6X@.0TA+4%0@.5')A;G-A
M8W1I;VX@.4W1A='5S($-(2U!4($)E9VEN($Q33B @.(" @.(" @.5')A;G-A8W1I
M;VX@.4W1A=&4@.(" @.5')A;G-A8W1I;VX@.5'EP92!,87-T($Q33B @.(" @.(" @.
M(" @.(" @.(%)E8V]R9"!#;W5N="!">71E<R!5<V5D("!">71E<R!297-E<G9E
M9"!#:&5C:W!O:6YT($5N9" @.(" @.(" @.("!#2$M05"!%;F0@.1$(@.5F5R<VEO
M;B!-:6YI;75M($Q33B @.(" @.(" @.(" @.($1I<G1Y(%!A9V5S($]L9&5S="!2
M97!L:6-A=&5D($)E9VEN($Q33B!.97AT(%)E<&QI8V%T960@.16YD($Q33 B!,
M87-T($1I<W1R:6)U=&5D($)A8VMU<"!%;F0@.3%-.($QA<W0@.1&ES=')I8G5T
M960@.16YD($Q33B!397)V97(@.54E$("!5240@.(" @.(" @.("!34$E$(" @.(" @.
M("!"96=I;FQO9R!3=&%T=7,@.0F5G:6X@.5&EM92 @.(" @.(" @.(" @.(" @.5')A
M;G-A8W1I;VX@.3F%M92 @.(" @.16YD(%1I;64@.(" @.(" @.(" @.(" @.(" @.5')A
M;G-A8W1I;VX@.0F5G:6X@.(" @.("!297!L:6-A=&5D(%)E8V]R9',@.3VQD97-T
M($%C=&EV92!,4TX@.(" @.("!397)V97(@.3F%M92 @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.("!$871A8F%S92!.86UE(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.("!-87)K($YA;64@.(" @.(" @.(" @.(" @.(" @.(" @.(" @.("!-87-T97(@.
M6$1%4TE$("!-87-T97(@.1$))1"!0<F5P;&]G($)E9VEN($Q33B @.(" @.(%!R
M97!A<F4@.5&EM92 @.(" @.(" @.(" @.(%!R979I;W5S(%-A=F5P;VEN=" @.(" @.
M4V%V97!O:6YT($YA;64@.(" @.(" @.4F]W8FET<R!&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CHP
M,# Q($Q/4%]"14=)3E]#2U!4(" @.(" @.(" @.(" @.3$-87TY53$P@.(" @.(" @.
M(" @.(" @.(" @.(" P,# P.C P,# P,# P(" P># P,# @.(" Y-B @.(" @.(" @.
M(" @.(" @.(" P,# P,3,T.3HP,# P,C4X-CHP,# R(#!X,# P," @.("!.54Q,
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.
M(" @.($Y53$P@.(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.
M(" @.($Y53$P@.(" @.(" @.("!.54Q,(" @.($Y53$P@.(" @.(" @.(" @.($Y53$P@.
M("!.54Q,(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.,C P-"\P.2\Q
M," Q,CHU-3HU-#HV,#<@.-3,Y(" @.(" @.(" @.(" @.(" @.(" @.(" P,# P.C S
M-C=A-3DU("!.54Q,(" @.(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.("!.54Q,
M(" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.3E5,3" @.
M(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.
M(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.
M($Y53$P@.(" @.(" @.($Y53$P@.(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.
M(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.
M(" @.(" @.3E5,3" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M($Y53$P@.(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.
M(" @.($Y53$P@.(" @.(" @.($Y53$P@.(" @.(" @.($Y53$P@.(" @.(" @.(" @.("!.
M54Q,(" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.("!.
M54Q,(" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.(" @.
M($Y53$P@.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.(" @.($Y5
M3$P@.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.($Y53$P@.(" @.(" @.
M($Y53$P@.(" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.
M(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.
M("!.54Q,(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.("!.54Q,(" @.
M(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.(" @.
M(" @.3E5,3" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.
M(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.($Y5
M3$P@.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.3E5,
M3" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.3E5,3" @.(" @.($Y53$P@.
M(" @.("!.54Q,(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.3E5,3" @.(" @.(" @.
M3E5,3" @.(" @.(" @.3E5,3" @.(" @.(" @.3E5,3 T*,# P,#$S-&$Z,# P,#$R
M-F,Z,# P,2!,3U!?14Y$7T-+4%0@.(" @.(" @.(" @.(" @.($Q#6%].54Q,(" @.
M(" @.(" @.(" @.(" @.(" @.,# P,#HP,# P,# P," @.,'@.P,# P(" @.,3,V(" @.
M(" @.(" @.(" @.(" @.,# P,#$S-&$Z,# P,#$R-F(Z,# P,2 P># P,# @.(" @.
M3E5,3" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.
M(" @.(" @.("!.54Q,(" @.($Y53$P@.(" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.
M(" @.(" @.("!.54Q,(" @.(" @.(" @.3E5,3" @.("!.54Q,(" @.(" @.(" @.("!.
M54Q,(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.
M(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.(" @.(" @.3E5,
M3" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.
M3E5,3" @.(" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.($Y5
M3$P@.(" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.3E5,
M3" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.
M(" @.("!.54Q,(" @.(" @.("!.54Q,(" @.(" @.(" @.(" R,# T+S Y+S$P(#$R
M.C4V.C P.C(P," U,SD@.(" @.(" @.(" @.(" @.(" @.(" P,# P,3,T83HP,# P
M,3(V8CHP,# Q(#DR-2 @.(" @.(" @.(# P,# P,# P.C P,# P,# P.C P,# @.
M(" @.(" P,# P,# P,#HP,# P,# P,#HP,# P(" P,# P,# P,#HP,# P,# P
M,#HP,# P(" @.(" @.(" @.(# P,# P,# P.C P,# P,# P.C P,# @.("!.54Q,
M(" @.(" @.("!.54Q,(" @.(" @.("!.54Q,(" @.(" @.("!.54Q,(" @.(" @.(" @.
M(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.
M(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.
M(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.
M("!.54Q,(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.(" @.(" @.("!.54Q,(" @.
M(" @.("!.54Q,(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.
M(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.
M(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.3E5,
M3" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.("!.54Q,(" @.
M(" @.(" @.($Y53$P@.(" @.(" @.("!.54Q,(" @.(" @.(" @.(" @.($Y53$P@.(" @.
M(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.(" @.
M("!.54Q,(" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.
M($Y53$P@.(" @.(" @.($Y53$P@.(" @.(" @.(" @.($Y53$P@.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.(" @.
M(" @.(" @.(" @.(" @.(" @.(" @.(" @.($Y53$P@.(" @.(" @.($Y53$P@.(" @.("!.
M54Q,(" @.(" @.3E5,3" @.(" @.(" @.(" @.3E5,3" @.(" @.(" @.($Y53$P@.(" @.
M(" @.($Y53$P@.(" @.(" @.($Y53$P@.(" @.(" @.($Y53$P-"@.T**#(@.<F]W*',I
,(&%F9F5C=&5D*0T*
`
end
|||It looks like your database is in the SIMPLE recovery model and the log was
truncated. Some of the data might still be in the log but there's no
guarantee. I don't know of a way to find out without running the utility.
Hope this helps.
Dan Guzman
SQL Server MVP
"Thomas Tsang" <thomast@.hkc.net> wrote in message
news:OUE$UbzlEHA.3428@.TK2MSFTNGP14.phx.gbl...
> Attached file missing in previous mail...
> "Thomas Tsang" <thomast@.hkc.net> bl
> news:emIuHXzlEHA.2492@.TK2MSFTNGP15.phx.gbl g...
> that
> get
> my
> the
> Explorer?
> server)
> extract
> clear
> to
>
>
|||Agree with Dan. You can try attaching the online log and look for the
records in recycled area. It may still be there depending the db activities.
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:u$spsqzlEHA.2380@.TK2MSFTNGP14.phx.gbl...
> It looks like your database is in the SIMPLE recovery model and the log
was[vbcol=seagreen]
> truncated. Some of the data might still be in the log but there's no
> guarantee. I don't know of a way to find out without running the utility.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Thomas Tsang" <thomast@.hkc.net> wrote in message
> news:OUE$UbzlEHA.3428@.TK2MSFTNGP14.phx.gbl...
fn_dblog[vbcol=seagreen]
access[vbcol=seagreen]
the[vbcol=seagreen]
how
>
Wednesday, March 7, 2012
Recordset Modification and Copy
I have written a custom DTS task in an ActiveX Script. My script creates three recordsets from three existing tables in an SQL Server 2k DB by copying all the data in these tables.
My script then modifies the data in these recordsets including dropping several records, creates a new table and inserts the modified data into the new table.
Unfortunately, I need to keep my original data unmodified...and currently my code changes my original data when it modifies the record sets.
Does anyone have a method for modifying a recordset without modifying the source data? I am writing my ActiveX Script through the VB scripting language.
From what I have read on the internet some people suggest creating a new recordset, copying the data from the original recordset to the new recordset, and then modify and insert the new recordset. This is supposed to keep my source data unchanged. Unfortunately, I have not been successful with this method mainly because I am having trouble creating a new recordset and copying my original recordset data into this new object.
Thank you in advance for any help or input you might have!!!
-TRocheI assume you are using ADO? Disconnect your recordset by setting your ActiveConnection property to nothing.|||I don't think this will work. You see I have to manipulate the data through several DO Until loops. The constraint on my DO loop is
"DO UNTIL rs.EOF"
Before I set the recordset ActiveConnection to nothing It tells me I have to first close the recordset. Unfortunately, I can not run the syntax of the above loop if the recrordset is closed, and if I open the recordset with a new connection it again changes my source data.
Does anyone have any additional insight?
Thanks!
-TRoche|||create a function READ UNCOMMITTED transaction isolation level (you can do it with nolock optimizer hint) and do your DO UNTIL against the rs that points to it.|||Wow...I am just a beginner at this stuff...I will look into it, but do you have a sample code for this by chance?
thanks,
TRoche|||create function dbo.fn_select_star_from_your_table (
@.parm1 <data type>,
@.parm2 <data type>,
@.parm3 <data type> ) returns table
as return (
select * from your_table (nolock)
where field1 = @.parm1
and field2 = @.parm2
and @.field3 = parm3)
go|||Hmmmmm....ok to start I am writing a custom DTS Task, using an ActiveX Script in the DTS Designer, coding in VBScript
Well I am having a few problems with the previous comments. First off I can't get the code to drop the function ms_sql_dba advised. Here is my DROP code for a function called FUNSTUFF:
dim Dropx
set Dropx = CreateObject("ADODB.Command")
Dropx = "Drop Function [dbo].[FUNSTUFF]"
connection.execute Dropx
I am only trying to drop the function because if I run the code multiple times it errors saying the the object "FunStuff" already exists in the database...and I looked...and it does...dang Does anyone see something wrong with the above DROP code?
Also, ms_sql_dba, I am not sure I understand what your function does. Here is how I thought to use your advice.
Write a function called ADVICE as follows:
dim ADVICE
set ADVICE = CreateObject("ADODB.Command")
ADVICE = "CREATE FUNCTION dbo.FUNSTUFF (@.time float, @.Position float ) RETURNS Table AS RETURN (select * from GPSy (nolock) where ty = time and GPS_y = Position)"
then:
Open.recordset ADVICE, Connection, adOpenKeyset
Then write my do loop:
DO UNTIL recordset.EOF
blah, blah, blah
Loop
Unfortunately, I run into all kinds of errors like saying the operation can not be performed if the recordset is closed. But if I write an open command like:
open.recordset.connection
I get the error that the function FUNSTUFF alreadyexists in the database.
Hmmmmmmmm...
Does anyone have any advice? Do I have to write the Function code before every loop or a drop code after every loop...or...hmmm...I am just confused about how the function works.
A million thanks to anyone who has any input!!
-TRoche
Recordset error 800a0bb9
16 sqlUser = "SELECT instructorId, schoolId, salutation, firstName, lastName, phone, email " & _
17 "FROM tblInstructors " & _
18 "WHERE (((userName)='"&Request.Form("userName")&"') AND ((password)='"&Request.Form("password")&"'))"
19
20 Set rsUser = Server.CreateObject("ADODB.RecordSet")
21 rsUser.Open sqlUser, oConn
This code runs fine as long as I key in a valid username and password. If I key in a bad username and password combo the db returns the following to my browser:
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/loginProc.asp, line 21
I tested by writing the finished sql to my browser and pasting it into the Enterprise manager and it runs as expected, I get a record with valid credentials and no record otherwise (but no error).
I'm using SQL Server v7, can anyone shed any light on this? thanks
connect string:
"Provider=sqloledb;" & _
"Data Source=(local);" & _
"Initial Catalog=GradeTrax;" & _
"User ID=sa;" & _
"Password=pword"the db returns the following to my browser:
Ok maybe its not the db returning this message but ADO. Still does anyone have any experience with this?|||What's the line immediately following 21 (empty lines excluded)?
If you're attempting to pull a value from a recordset that is empty, you'll generate an error. Always make sure you're recordset actually contains records:
If NOT rsUser.BOF AND NOT rsUser.EOF Then
'User is valid
Else
'User is invalid
End If|||The next line I'm checking the status of EOF, however the line that is kicking the error is 21, so line 22 is never being processed.|||You don't need all the parens.. try:
"WHERE userName = '" & Request.Form("userName") & "' AND password = '" & Request.Form("password") & "'"
As a note, this will make both the userName and password fields case sensitive. If you want to make just the userName case insensitive, use the keyword LIKE in place of the "=".|||Thanks Seppuku,
This is really becoming very irritating. I've tried what you said and have in fact tried numerous variations, also using the Microsoft KB Article 235892 as guide and still can't get this to work. I've done response.write(sql) and pasted results here:
SELECT instructorId, schoolId, salutation, firstName, lastName, phone, email FROM tblInstructors WHERE userName LIKE 'dude' AND password LIKE 'badpassword'
again I'm convinced that this is not an SQL thing but a ADO thing, and what makes me mad is that it works as long as the db returns at least one record and fails if no records match criteria.
Any other info would be great.|||to all you coding comrads. I appologize for starting this thread. I stink as a programmer, I want to pump gas for a living or mow lawn or flip burgers or something.
I had a piece of code further down that did a redirect if login failed that looped back on the same page instead of redirecting to the login page. My error message came when the page was loaded the second time with the form collection null. I hate it when computers do what you tell them to and not what you want them to.|||PEBCAK - Problem Exists Between Chair and Keyboard.|||I hate it when computers do what you tell them to and not what you want them to.Me too, but the darned things keep right on doing it no matter how often I beat them!
-PatP|||PEBCAK - Problem Exists Between Chair and Keyboard.I like that! We call them id10t errors.
-PatP|||Some great jargon came from early editions of WIRED magazine... PEBCAK was one of those.. unfortunately, they've fizzled out...
Saturday, February 25, 2012
Records not updating in Script Component
Basically, there is a field in my script that checks to see if a string field is length of 1. If it is, it updates the field with some value. The strange behavior is that it picks up some of the rows but not others.
If Row.FieldValue.Length = 1 Then
Row.FieldValue= "Some Value"
End If
I've tried variations such as:
If left(Row.FieldValue.,1) = "-" Then
Row.FieldValue= "Some Value"
End If
But I get the same results. Any Ideas?Does [Field] need to be trimmed? Might some data contain trailing white spaces?|||
No, I've tried every combination of Trim, left, equals etc...that I can think of. The funny thing is that it picks up some of the fields and misses others.
Very puzzling. I was hoping to hear of some rare condition on this board that sounds similar to this, but I have yet to hear of any similar situations.
The code that I am talking about is incredibly simple, as shown in my previous post.
|||What happens when [Field] is null?|||You could fire some debug iformation to help you. Something like this maybe:
Me.ComponentMetadata.FireInformation(,,Row.FieldValue.ToString() + " - " + Row.FieldValue.Length.ToString(), ....
-Jamie
|||
Thanks, that did it. I am relatively new to SSIS, never really delved into the debug information before.
that is very helpful.
|||KML67 wrote:
Thanks, that did it. I am relatively new to SSIS, never really delved into the debug information before.
that is very helpful.
Great! But what solved your issue?|||
Basically, matching the string by length, equal, explicit match was working fine all along.
There was some logic that followed this string test that was providing the error. The error was very subtle, so it did not always produce the same value for the same input (depending on multiple variables), but at quick glance (watching the data flow into and out of the component with dataviewers) it looked as like there was an inconsistency in the component itself.
Jamie's post was very helpful, I am new to SSIS and wasn't familiar with the fireInformation method. That allowed me to solve it in a second.
Thanks for the tips, this board is a great asset.