Re: Help: Copy tables and indexes to another user
Posted in 1996
Dirk Schmidtpott wrote:
>
> Hello !
> I have a problem with copying tables and indexes to another user.
>
> I use a database, that is created WITH LOG MODE ANSI. In this case
> username.tablename is the unique identifier for a table and
> username.indexname for an index. With dbexport I get a SQL script, which
> contains all CREATE statements for a certain user.
>
> In the next step I change the username of every table and index to the new
> username in this script. If I run this modified script all works fine for the
> tables. They are all created for the new user. But I have problems with the
> indexes. I get the message "-350 Index (xxx) already exists on column". The
> name of the index (xxx) within this error message is not preceeded by a
> username.
>
> Does this indicate, that it is not recognized ? If so, why ? I can't see
> where the problem is. I tried it with V5.0 under Unix and with V7.1 under NT.
> Synonyms and comparable solutions won't help me. I have to do a copy.
I presume you are copying a table to the same database. I'm not that clued
up on ANSI databases, they privide too many cons and no pros. However, I
think you are going to have to re-name the indexes on the copy, because
index names are unique across the entire database.
Cheers,
--
Mark.
+-------------------------------------------------------------------------+
|Mark D. Stock - The West Solutions Group http://www.west.co.za |
| |
|mailto:marks@west.co.za +------------------------------------------------+
|Tel: +27 11 803 2151 |If it doesn't work... force it! |
|Fax: +27 11 803 2189 |If it breaks... it needed replacing anyway! |
|Cell: +27 83 250 2325 |Well, that's how I code anyway! |
+------------------------+------------------------------------------------+