Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
A user running dbimport on a production database wanted to interrupt the update statistics phase (data, constraints and procedures already loaded), rename the database, then finish the statistics afterwards. Art Kagel confirmed it's safe: kill the dbimport, use onmode -z on the session if needed, wait for rollback, rename the database, then take the UPDATE STATISTICS commands from the dbexport schema file and rerun the one that was interrupted plus the remainder. Paul Watson suggested instead splitting the import SQL file in advance: run dbimport with the update stats commented out, then run a separate script containing the rename plus the update stats.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Hello forum people!
Sorry for the stupid question, but surely you can cut an import of a database
when it is updating the statistics?. What happens is that it is a base that is
in production and do not want any surprises.
Thanks for all
↪ replying to GUSTAVO ECHENIQUE
KARL OLIVER — — source: IIUG Forums & Mailing Lists
you cant import database while updating statistics. If you are importing the
datbase it implies thet datbase is not ready for use.I am understnding you
question ?
Normally an import would lock db till import complete I would have thought
??? Not certain what you are asking. Do you want to stop a dbimport from
running update statistics after loading the data? Or something else?
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Mon, Feb 27, 2012 at 7:36 PM, GUSTAVO ECHENIQUE <
gustavo.echenique@cemdo.com.ar> wrote:
> Hello forum people!
>
> Sorry for the stupid question, but surely you can cut an import of a
> database
> when it is updating the statistics?. What happens is that it is a base
> that is
> in production and do not want any surprises.
>
> Thanks for all
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--047d7b1633f1bac05804b9fbc524
OK, so you want to stop the update statistics runs, rename the database,
then restart the update stats from the point where it left off.
Yes, you can do that. Kill the dbimport, onmode -z the session if it
doesn't die immediately. Wait until the session goes away (it may take a
few minutes for the update stats to roll back). Then you can rename the
database, mouse the update statistics commands out of the schema file that
dbexport wrote, rerun whichever one was running at the time you killed it,
then run the rest.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Mon, Feb 27, 2012 at 8:31 PM, GUSTAVO ECHENIQUE <
gustavo.echenique@cemdo.com.ar> wrote:
> my idea is to cut the statistics update, rename the base, and then continue
> from where I cut.
> Can it be done safely?
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--e89a8ff1c8f8c052c004b9fd3b89
Paul Watson — — source: IIUG Forums & Mailing Lists
Copy the SQL import file and delete/comment out the update stats, in the
copy delete everything apart from the update stats and put the rename
database at the top
dbimport <dbname> etc
dbaccess sysmaster copyfile.sql
Cheers
Paul
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
GUSTAVO ECHENIQUE
Sent: Monday, February 27, 2012 7:31 PM
To: ids@iiug.org
Subject: Re: Stupid question [26387]
my idea is to cut the statistics update, rename the base, and then continue
from where I cut.
Can it be done safely?
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.