cancel
Showing results for 
Search instead for 
Did you mean: 

Alter table alter owner to... help

Former Member
0 Kudos

Hi, I am trying to change the ownership of some tables in IQ. I am trying: alter table oldowner.table alter owner to newowner preserve permissions preserve foreign keys

I am receiving the following error:

Could not execute statement

Syntax error near 'to' on line 1

SQLCODE=-131, ODBC 3 state="42000"

Line 2, column 1

Any help would be appreciated

Accepted Solutions (0)

Answers (1)

Answers (1)

saroj_bagai
Contributor
0 Kudos

Works correctly

[demo0830]$ dbisql -c 'dsn=vicky_iqdemo0830' -nogui

(DBA)> create user  user1 identified by sql
Execution time: 0.077 seconds

(DBA)> create table user1.t1 (a int)
Execution time: 0.173 seconds

(DBA)> exit

[demo0830]$ dbisql -c 'dsn=vicky_iqdemo0830' -nogui

(DBA)>  alter table user1.t1 alter owner to DBA
Execution time: 0.789 seconds

(DBA)> select @@version
@@version                                                                      
--------------------------------------------------------------------------------------------------------------------------------
SAP IQ/16.0.0.809/150327/P/sp08.30/Enterprise Linux64 - x86_64 - 2.6.18-194.el5/64bit/2015-03-27 16:04:28

(1 rows)

Execution time: 0.016 seconds

Former Member
0 Kudos

Ah I think I found the problem, this is a 15.2 server. Is it possible to change a table owner in 15.2?

saroj_bagai
Contributor
0 Kudos


No, not in 15.2. Only IQ 16 and above