MINI
C:
/
app
/
Administrator
/
product
/
11.2.0
/
dbhome_1
/
sysman
/
admin
/
scripts
/
db
/
config
/
Upload File:
files >> C:/app/Administrator/product/11.2.0/dbhome_1/sysman/admin/scripts/db/config/dbmon.sql
--------------------------------------------- -- This script is to grant privileges dbsnmp. --------------------------------------------- set serveroutput on; set echo on; ----------------------------- -- Make sure DBSNMP exist ----------------------------- prompt ... Make sure DBSNMP user exist ... prompt ... DECLARE v varchar2(300); version VARCHAR2(20); compat VARCHAR2(20); BEGIN v := 'create user DBSNMP identified by &&dbm_password'; execute immediate v; v := 'grant CONNECT to DBSNMP'; execute immediate v; EXCEPTION WHEN others THEN dbms_output.put_line('User DBSNMP exists'); END; / ----------------------------- -- Grant privileges to DBSNMP ----------------------------- prompt ... Grant privileges to DBSNMP user ... prompt whenever sqlerror continue /* System privileges */ grant create table to DBSNMP; grant create procedure to DBSNMP; grant create sequence to DBSNMP; grant create type to DBSNMP; grant unlimited tablespace to DBSNMP; disconnect
Copyright ©2021 || Defacer Indonesia