cancel
Showing results for 
Search instead for 
Did you mean: 

how to change ownership of tables , views and other objects in sybase iq.

0 Kudos

Hello,

Could you please let me know how to  change ownership  of tables , views and other objects in sybase iq?

I guess the sybase command  alter table  <owner.tablename>  modify owner  <newowner> does not work  in sybase iq ?

Regards,

Arun

Accepted Solutions (1)

Accepted Solutions (1)

markmumy
Advisor
Advisor

Hello Arun,

You can use this

     ALTER TABLE table_name ALTER OWNER TO new_owner

Since views take just a second to create, I think the best path for those is to drop and recreate.

Mark

0 Kudos

Hello  Mark,

Many thanks for your reply .I am  new to  Sybase IQ world.

Could you  please let me know  whether we need to  manually  grant   roles and priviliges  while moving owner ship  of the objects  or does the alter owner implicitly takes care of it and transfers the roles and privilges accordingly.

Regards,

Arun

markmumy
Advisor
Advisor
0 Kudos

Permissions would carry over based on the limited tests that I have run.  No need to reapply permissions.

Mark

Former Member
0 Kudos

Hi Mark,

Can you use ALTER TABLE table_name ALTER OWNER TO new_owner in Sybase IQ 15.4?

If not, what is the command for 15.4?

Thanks in advance,

Mariano

markmumy
Advisor
Advisor
0 Kudos

I am fairly certain that this was introduced in IQ 16.  In IQ 15 there is no way to do this other than by creating a new object with the proper owner.

Mark

Former Member
0 Kudos

Oh, I see. What a pitty! What we want to do is to change the owner to 3,000 tables!!!

Is it possible to use an alias for the owner?. I mean when I want to query a table named "owner1.table1" I am really querying the table named "t1g.table1" (a sort of SYNONYM used in Oracle).

BTW, thanks for your prompt responses!

Mariano

markmumy
Advisor
Advisor
0 Kudos

I Would mask this with a view. Make the view as the new owner and do nothing more than a select *.

0 Kudos

And can we, for example, change owner of procedure?

Answers (1)

Answers (1)

markmumy
Advisor
Advisor
0 Kudos

Unfortunately, SAP IQ does not support changing the owner of a procedure. You would have to drop and recreate the procedure.


Mark