Friday, March 23, 2012
Power went out -- how to check consistency, etc.?
figures) and thus the server simply lost all power. Now what?
How do I check for consistency?
Will checking consistency take the database down (like some dbcc things)?
What else should I do/check?DBCC CHECKDB and DBCC CHEKCATALOG are what you want to run. By default they
are online operations. But I would want to know if there is damage or
corruption before I even let someone back in if possible.
--
Andrew J. Kelly SQL MVP
"HK" <replywithingroup@.notreal.com> wrote in message
news:7YFLf.472$xS5.132@.tornado.socal.rr.com...
> The power went out to a live SQL Server. UPS was being serviced (that
> figures) and thus the server simply lost all power. Now what?
> How do I check for consistency?
> Will checking consistency take the database down (like some dbcc things)?
> What else should I do/check?
>|||Traffic came back on its own when the system restarted. So too late to run
the check first. By "online", do you mean they will NOT interrupt live
transactions when I run them? (BOL doesn't really say). Also, which
repair option do you think I should use if it finds something?
REPAIR_ALLOW_DATA_LOSS or REPAIR_REBUILD
(assume I want good repairs and not fast ones)
Thanks
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%233R4L%23WOGHA.1216@.TK2MSFTNGP14.phx.gbl...
> DBCC CHECKDB and DBCC CHEKCATALOG are what you want to run. By default
they
> are online operations. But I would want to know if there is damage or
> corruption before I even let someone back in if possible.
> --
> Andrew J. Kelly SQL MVP
>
> "HK" <replywithingroup@.notreal.com> wrote in message
> news:7YFLf.472$xS5.132@.tornado.socal.rr.com...
> > The power went out to a live SQL Server. UPS was being serviced (that
> > figures) and thus the server simply lost all power. Now what?
> >
> > How do I check for consistency?
> > Will checking consistency take the database down (like some dbcc
things)?
> > What else should I do/check?
> >
> >
>|||Repair_Rebuild is pretty safe and any errors fixed by that should be fine.
If it doesn't fix some you may have to run with the allow data loss. But
obviously that has the potential to loose data and you won't know which is
lost. So if it comes down to that it is always recommended to restore from
your last known good backups.
--
Andrew J. Kelly SQL MVP
"HK" <replywithingroup@.notreal.com> wrote in message
news:eXILf.83$8l2.0@.tornado.socal.rr.com...
> Traffic came back on its own when the system restarted. So too late to
> run
> the check first. By "online", do you mean they will NOT interrupt live
> transactions when I run them? (BOL doesn't really say). Also, which
> repair option do you think I should use if it finds something?
> REPAIR_ALLOW_DATA_LOSS or REPAIR_REBUILD
> (assume I want good repairs and not fast ones)
> Thanks
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:%233R4L%23WOGHA.1216@.TK2MSFTNGP14.phx.gbl...
>> DBCC CHECKDB and DBCC CHEKCATALOG are what you want to run. By default
> they
>> are online operations. But I would want to know if there is damage or
>> corruption before I even let someone back in if possible.
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "HK" <replywithingroup@.notreal.com> wrote in message
>> news:7YFLf.472$xS5.132@.tornado.socal.rr.com...
>> > The power went out to a live SQL Server. UPS was being serviced (that
>> > figures) and thus the server simply lost all power. Now what?
>> >
>> > How do I check for consistency?
>> > Will checking consistency take the database down (like some dbcc
> things)?
>> > What else should I do/check?
>> >
>> >
>>
>sql
Power went out -- how to check consistency, etc.?
figures) and thus the server simply lost all power. Now what?
How do I check for consistency?
Will checking consistency take the database down (like some dbcc things)?
What else should I do/check?
DBCC CHECKDB and DBCC CHEKCATALOG are what you want to run. By default they
are online operations. But I would want to know if there is damage or
corruption before I even let someone back in if possible.
Andrew J. Kelly SQL MVP
"HK" <replywithingroup@.notreal.com> wrote in message
news:7YFLf.472$xS5.132@.tornado.socal.rr.com...
> The power went out to a live SQL Server. UPS was being serviced (that
> figures) and thus the server simply lost all power. Now what?
> How do I check for consistency?
> Will checking consistency take the database down (like some dbcc things)?
> What else should I do/check?
>
|||Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:425005
Traffic came back on its own when the system restarted. So too late to run
the check first. By "online", do you mean they will NOT interrupt live
transactions when I run them? (BOL doesn't really say). Also, which
repair option do you think I should use if it finds something?
REPAIR_ALLOW_DATA_LOSS or REPAIR_REBUILD
(assume I want good repairs and not fast ones)
Thanks
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%233R4L%23WOGHA.1216@.TK2MSFTNGP14.phx.gbl...
> DBCC CHECKDB and DBCC CHEKCATALOG are what you want to run. By default
they[vbcol=seagreen]
> are online operations. But I would want to know if there is damage or
> corruption before I even let someone back in if possible.
> --
> Andrew J. Kelly SQL MVP
>
> "HK" <replywithingroup@.notreal.com> wrote in message
> news:7YFLf.472$xS5.132@.tornado.socal.rr.com...
things)?
>
|||Repair_Rebuild is pretty safe and any errors fixed by that should be fine.
If it doesn't fix some you may have to run with the allow data loss. But
obviously that has the potential to loose data and you won't know which is
lost. So if it comes down to that it is always recommended to restore from
your last known good backups.
Andrew J. Kelly SQL MVP
"HK" <replywithingroup@.notreal.com> wrote in message
news:eXILf.83$8l2.0@.tornado.socal.rr.com...
> Traffic came back on its own when the system restarted. So too late to
> run
> the check first. By "online", do you mean they will NOT interrupt live
> transactions when I run them? (BOL doesn't really say). Also, which
> repair option do you think I should use if it finds something?
> REPAIR_ALLOW_DATA_LOSS or REPAIR_REBUILD
> (assume I want good repairs and not fast ones)
> Thanks
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:%233R4L%23WOGHA.1216@.TK2MSFTNGP14.phx.gbl...
> they
> things)?
>
Power went out -- how to check consistency, etc.?
figures) and thus the server simply lost all power. Now what?
How do I check for consistency?
Will checking consistency take the database down (like some dbcc things)?
What else should I do/check?DBCC CHECKDB and DBCC CHEKCATALOG are what you want to run. By default they
are online operations. But I would want to know if there is damage or
corruption before I even let someone back in if possible.
Andrew J. Kelly SQL MVP
"HK" <replywithingroup@.notreal.com> wrote in message
news:7YFLf.472$xS5.132@.tornado.socal.rr.com...
> The power went out to a live SQL Server. UPS was being serviced (that
> figures) and thus the server simply lost all power. Now what?
> How do I check for consistency?
> Will checking consistency take the database down (like some dbcc things)?
> What else should I do/check?
>|||Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:425005
Traffic came back on its own when the system restarted. So too late to run
the check first. By "online", do you mean they will NOT interrupt live
transactions when I run them? (BOL doesn't really say). Also, which
repair option do you think I should use if it finds something?
REPAIR_ALLOW_DATA_LOSS or REPAIR_REBUILD
(assume I want good repairs and not fast ones)
Thanks
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%233R4L%23WOGHA.1216@.TK2MSFTNGP14.phx.gbl...
> DBCC CHECKDB and DBCC CHEKCATALOG are what you want to run. By default
they
> are online operations. But I would want to know if there is damage or
> corruption before I even let someone back in if possible.
> --
> Andrew J. Kelly SQL MVP
>
> "HK" <replywithingroup@.notreal.com> wrote in message
> news:7YFLf.472$xS5.132@.tornado.socal.rr.com...
things)?[vbcol=seagreen]
>|||Repair_Rebuild is pretty safe and any errors fixed by that should be fine.
If it doesn't fix some you may have to run with the allow data loss. But
obviously that has the potential to loose data and you won't know which is
lost. So if it comes down to that it is always recommended to restore from
your last known good backups.
Andrew J. Kelly SQL MVP
"HK" <replywithingroup@.notreal.com> wrote in message
news:eXILf.83$8l2.0@.tornado.socal.rr.com...
> Traffic came back on its own when the system restarted. So too late to
> run
> the check first. By "online", do you mean they will NOT interrupt live
> transactions when I run them? (BOL doesn't really say). Also, which
> repair option do you think I should use if it finds something?
> REPAIR_ALLOW_DATA_LOSS or REPAIR_REBUILD
> (assume I want good repairs and not fast ones)
> Thanks
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:%233R4L%23WOGHA.1216@.TK2MSFTNGP14.phx.gbl...
> they
> things)?
>
Tuesday, March 20, 2012
Post processing data flow destinations
What I am trying to do is move data from a staging table into a live environment and then update the staging table AFTER the row has move (and not errored). There does not seem to be a reliable method for doing this.
Any assistance would be appreciated.
Brett Robson wrote:
What I am trying to do is move data from a staging table into a live environment and then update the staging table AFTER the row has move (and not errored). There does not seem to be a reliable method for doing this.
Any assistance would be appreciated.
What specifically isn't reliable? It sounds to me like you need a data-flow to move the data and an Execute SQL Task to issue the UPDATE. That should work OK.
-Jamie
|||Jamie,
I don't think your quite following what I am trying to do. I want to update the SOURCE table after the rows have moved. I don't want to update the ones which error. How does the Execute SQL Task get the appropriate row ids? They certainly won't be passed from the data-flow.
Regards,
BRETT ROBSON
|||
Brett Robson wrote:
Jamie,
I don't think your quite following what I am trying to do. I want to update the SOURCE table after the rows have moved. I don't want to update the ones which error. How does the Execute SQL Task get the appropriate row ids? They certainly won't be passed from the data-flow.
Regards,
BRETT ROBSON
Oh OK. I gotcha.
You're right, Execute SQL Task is not an option. You can execute your UPDATE from the data-flow though using an OLE DB Command component.
This will work fine - the only problem with it is that it issues an UPDATE for every row - and ths isn't very performant. Another option is to push all the successful rows into another table and update the source table from this new table. This update can be issued from the Execute SQL Task and will be much more performant because you're only doing it once.
-Jamie
|||Thanks Jamie - either of those two should work.