Subject | Re: problem using backup |
---|---|
Author | Fikret Hasovic |
Post date | 2004-01-30T15:10:01Z |
Hi Helen.
Thank you.
Best regards
Fikret Hasovic
TAMP R&D Team
> I am suspicious that you changed the data type by altering thesystem
> tables. Using ALTER TABLE XY ALTER COLUMN ATIMESTAMP TYPE DATEshould have
> thrown an exception, because you can't change the type if the newtype
> would cause data to be lost.I am using IBExpert as tool.
>
> You certain don't need to make a new DB. The first thing to trywill be to
> convert the timestamps into date format, using an UPDATE statement:any
>
> update atable
> set atimestamp = cast(atimestamp as date)
> where atimestamp is not null;
>
> If it won't let you do that, then try a double-cast to get rid of
> significant sub-dialect 1
> day data:
> ...
> set atimestamp = cast (cast (atimestamp as date) as timestamp);
> ...
> (Of course, this is going to get you into a stew if you're using
> so I hope that's not where you're at - assume dialect 3)have to
>
> Now, if you can't get that to backup and restore, you *still* don't
> create a new DB, but it's a much longer job and you'd need to do itin a
> script to avoid going crazy.tempcol =
>
> Alter table atable add tempcol DATE, commit, update atable set
> cast(atimestamp as date), commit, alter atable drop atimestamp,commit,
> alter atable add asubstitute DATE, commit, update atable setasubstitute =
> tempcol, commit, alter table drop tempcol, commit.want
> (sorry that's gabbled)
>
> I'm curious how you managed to get the timestamps if you didn't
> them. The datapump should have given you the ability to cast theyou ARE
> timestamps to date and store them how you needed them...erm, unless
> in dialect 1, and DID ask for DATE - 'cause the DATE type indialect 1 is a
> timestamp.I am using dialect 3, and I will try everything you sugested.
>
Thank you.
Best regards
Fikret Hasovic
TAMP R&D Team