Home > database >  ORACLE execute regularly cleaned the CDC in JOB change set of stored procedures
ORACLE execute regularly cleaned the CDC in JOB change set of stored procedures

Time:09-24

I want to create such a stored procedure
SQL> The create or replace procedure BMSXY_SP_CDCXY as
2 the begin
3 DBMS_CDC_PUBLISH. PURGE_CHANGE_SET
4 (' CDC_SET_BMSXY ', 'sysdate - 3'
5);
6 the end;
7/
Warning: Procedure created with compilation errors
Why not, changesets exist

CodePudding user response:

Your top one, bosses to solve it

CodePudding user response:

 
- show the errors it and see what error

SQL>
SQL> The create or replace procedure BMSXY_SP_CDCXY as
2 the begin
3 DBMS_CDC_PUBLISH. PURGE_CHANGE_SET
4
5 (' CDC_SET_BMSXY ', 'sysdate - 3'
6);
7 the end;
8/
Warning: Procedure created with compilation errors

SQL> Show the errors;
Errors for PROCEDURE XSNWSH_USER. BMSXY_SP_CDCXY:
The LINE/COL ERROR
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
L PLS - 00201: must declare identifier 'DBMS_CDC_PUBLISH'
3/2 PL/SQL Statement ignored

SQL>

CodePudding user response:

 SQL> The create or replace procedure BMSXY_SP_CDCXY as 
2 the begin
3 DBMS_CDC_PUBLISH. PURGE_CHANGE_SET
4 (' CDC_SET_BMSXY ', 'sysdate - 3'
5);
6 the end;
7/

Warning: Procedure created with compilation errors

SQL> Show the errors;
Errors for PROCEDURE BMSXY_CDC_CONF. BMSXY_SP_CDCXY:

The LINE/COL ERROR
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
3/1 PLS - 00201: the identifier 'DBMS_CDC_PUBLISH' must be declared
PL/SQL: 3/1 Statement ignored

such

CodePudding user response:

@ the net of selling fruit need to declare? This not the program

CodePudding user response:

reference 4 floor qq_41070571 response:
@ sell fruit net need to declare? This not the application


This is a package of the system, and see the prompt, there should be no permissions, you used to your current system (or sys) an authorized user do

SQL> Grant execute on BMSXY_CDC_CONF to the current user name;

CodePudding user response:

 SQL> The create or replace procedure BMSXY_SP_CDCXY as 
2 the begin
3 DBMS_CDC_PUBLISH. PURGE_CHANGE_SET
4 (' CDC_SET_BMSXY ', 'sysdate - 3'
5);
6 the end;
7/

Warning: Procedure created with compilation errors

SQL> Show the errors;
Errors for PROCEDURE CDC_PUBLISHER. BMSXY_SP_CDCXY:

The LINE/COL ERROR
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
3/1 PLS - 00306: wrong number or types of the arguments in the call to 'PURGE_CHANGE_SET'
PL/SQL: 3/1 Statement ignored

Another was to create the change set of users, the following error how to return a responsibility?? To solve the ~ ~ ~ ~

CodePudding user response:

reference 5 floor wmxcn2000 reply:
Quote: refer to 4th floor qq_41070571 response:

@ the net of selling fruit need to declare? This not the application


This is a package of the system, and see the prompt, there should be no permissions, you used to your current system (or sys) an authorized user do

SQL> Grant execute on BMSXY_CDC_CONF to the current user name;


reference 5 floor wmxcn2000 reply:
Quote: refer to 4th floor qq_41070571 response:

@ the net of selling fruit need to declare? This not the application


This is a package of the system, and see the prompt, there should be no permissions, you used to your current system (or sys) an authorized user do

SQL> Grant execute on BMSXY_CDC_CONF to the current user name;

Frontal BMSXY_CDC_CONF this is my current user who performs the operation, is the DBA

CodePudding user response:

Have DBA privileges are an error?

CodePudding user response:

The dba may also not line, require explicit authorization,

CodePudding user response:

references 9 f wmxcn2000 response:
dbas may not, require explicit authorization,

DBMS_CDC_PUBLISH said do you want to authorize this? The other operations are, however, can be like DBMS_CDC_PUBLISH. ALTER_CHANGE_SET (); Before I had authorized the itself
SQL> Grant execute ON dbms_cdc_publish cdc_publisher),

CodePudding user response:

refer to the eighth floor baidu_36457652 response:
have DBA privileges are an error?

Is indeed a permissions issue? The statement itself no problem?

CodePudding user response:

Solve the,,, 10 g this bag has only one parameter, change sets, no purge_date the parameters,,, the pit!

CodePudding user response:

Solve the good, indeed this pit can let a person busy half a day,
  • Related