Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Set rollback segment online
Try using dynamic PL/SQL. The following is an anonymous block that I tested
on one of my databases:
declare
t_cursor number; t_string varchar2(100); t_val number;
begin
t_string := 'alter rollback segment test online';
t_cursor := dbms_sql.open_cursor;
dbms_sql.parse(t_cursor,t_string,dbms_sql.v7);
t_val := dbms_sql.execute(t_cursor);
end;
Of course, you would want to add exception handling, etc., to a package, but yes, you can execute statements to change the status of rollback segments. You can also create and drop tables, indexes, and other objects. However, you must be careful not to invalidate your existing PL/SQL code by affecting the validity of objects upon which the package depends.
Experiment before you invest a great deal of effort in developing a sophisticated package.
Christopher Weiss
Compuware Corporation
Professional Services Division
Daiminger, Helmut <Helmut.Daiminger_at_gedas.de> wrote in message
news:53924C75CF23D3118C1300508B0A4B1B0396A5_at_mucsem01.gedas.de...
> Hi,
>
> can I set a rollback segment online within a PL/SQL package?
>
> begin
> ....
> alter rollback segment PUB_RS1 online;
> ...
> end;
>
> Thanks,
> Helmut
>
Received on Thu Jul 22 1999 - 11:50:46 CDT