Problém
[oracle@server ~]$ sqlplus user@orcl
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jan 25 16:17:57 2016
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Enter password:
Chyba v pristupu k PRODUCT_USER_PROFILE
Varovani: Profil uzivatelu produktu neni zaveden!
Mozna je treba spustit PUPBLD.SQL jako SYSTEM
ERROR:
ORA-18008: nelze najit schema OUTLN
Chyba v pristupu k baliku DBMS_APPLICATION_INFO
SP2-0575: Pouzity rys Oracle SQL neni obsazen v SQL92 uroven Entry.
Pripojeno k:
Oracle Database 10g Release 10.2.0.4.0 - Production
Řešení I
SQL> conn / as sysdba
Spojeno.
SQL> set serveroutput on
SQL>
SQL> DECLARE
2 user_exists EXCEPTION;
3 outln_user number;
4 outln_tables number;
5 extra_outln_tables number;
6 DDL_CURSOR integer;
7 BEGIN
8 select count(*) into outln_user from user$ where name='OUTLN';
9
10 select count(*) into outln_tables from obj$ where name in
11 ('OL$', 'OL$HINTS') and owner#=
12 (select user# from user$ where name='OUTLN');
13
14 select count(*) into extra_outln_tables from obj$ where name not in
15 ('OL$', 'OL$HINTS') and type#=2 and owner#=
16 (select user# from user$ where name='OUTLN');
17
18 DDL_CURSOR := dbms_sql.open_cursor;
19 IF outln_user = 0 THEN
20 dbms_sql.parse(DDL_CURSOR, 'create user outln identified by outln',
21 dbms_sql.native);
22 dbms_sql.parse(DDL_CURSOR,
23 'grant connect, resource, execute any procedure to outln',
24 dbms_sql.native);
25 dbms_sql.parse(DDL_CURSOR, 'create table outln.ol$ ( '||
26 'ol_name varchar2(30), ' ||
27 'sql_text long, ' ||
28 'textlen number, ' ||
29 'signature raw(16), ' ||
30 'hash_value number, ' ||
31 'category varchar2(30), ' ||
32 'version varchar2(64), ' ||
33 'creator varchar2(30), ' ||
34 'timestamp date, ' ||
35 'flags number, ' ||
36 'hintcount number)', dbms_sql.native);
37 dbms_sql.parse(DDL_CURSOR, 'create table outln.ol$hints ( '||
38 'ol_name varchar2(30), '||
39 'hint# number, '||
40 'category varchar2(30), '||
41 'hint_type number, '||
42 'hint_text varchar2(512), '||
43 'stage# number, '||
44 'node# number, '||
45 'table_name varchar2(30), '||
46 'table_tin number,'||
47 'table_pos number)', dbms_sql.native);
48 dbms_sql.parse(DDL_CURSOR, 'create unique index outln.ol$name '||
49 'on outln.ol$(ol_name)', dbms_sql.native);
50 dbms_sql.parse(DDL_CURSOR, 'create unique index outln.ol$signature '||
51 ' on outln.ol$(signature,category)', dbms_sql.native);
52 dbms_sql.parse(DDL_CURSOR, 'create unique index outln.ol$hnt_num '||
53 ' on outln.ol$hints(ol_name, hint#)', dbms_sql.native);
54 dbms_output.put_line('OUTLN CREATION SUCCESSFUL');
55 ELSE
56 IF outln_tables!=2 or extra_outln_tables!=0 THEN
57 dbms_output.put_line('ERROR - OUTLN USER ALREADY EXISTS');
58 RAISE user_exists;
59 ELSE
60 dbms_output.put_line('OUTLN CREATION SUCCESSFUL');
61 END IF;
62 END IF;
63
64 EXCEPTION
65 WHEN user_exists THEN
66 RAISE;
67
68 END;
69 /
OUTLN CREATION SUCCESSFUL
Procedura PL/SQL uspesne dokoncena.
Řešení II
SQL> conn system/oracle
Spojeno.
SQL> @?/sqlplus/admin/pupbld.sql
DROP SYNONYM PRODUCT_USER_PROFILE
*
ERROR na radku 1:
ORA-01434: rusene soukrome synonymum neexistuje
DATE_VALUE FROM PRODUCT_USER_PROFILE
*
ERROR na radku 3:
ORA-00980: preklad synonym jiz neni platny
DROP TABLE PRODUCT_USER_PROFILE
*
ERROR na radku 1:
ORA-00942: tabulka nebo pohled neexistuje
ALTER TABLE SQLPLUS_PRODUCT_PROFILE ADD (LONG_VALUE LONG)
*
ERROR na radku 1:
ORA-01430: pridavany sloupec jiz v tabulce existuje
CREATE TABLE SQLPLUS_PRODUCT_PROFILE
*
ERROR na radku 1:
ORA-00955: nazev je jiz uzivan existujicim objektem
DROP TABLE PRODUCT_PROFILE
*
ERROR na radku 1:
ORA-00942: tabulka nebo pohled neexistuje
DROP VIEW PRODUCT_PRIVS
*
ERROR na radku 1:
ORA-00942: tabulka nebo pohled neexistuje
Pohled vytvoren.
Udeleni prav bylo uspesne.
Synonymum zruseno.
Synonymum vytvoreno.
DROP SYNONYM PRODUCT_USER_PROFILE
*
ERROR na radku 1:
ORA-01434: rusene soukrome synonymum neexistuje
Synonymum vytvoreno.
Synonymum zruseno.
Synonymum vytvoreno.
Ověření
[oracle@server ~]$ sqlplus user@orcl
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jan 25 16:30:10 2016
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Enter password:
Pripojeno k:
Oracle Database 10g Release 10.2.0.4.0 - Production
MOS:
Error Accessing PRODUCT_USER_PROFILE when Trying to Connect from SQL*Plus. (Doc ID 316375.1)
Connecting via SQL*Plus gives an Error Accessing PRODUCT_USER_PROFILE (Doc ID 161062.1)
ORA-18008 Creating Procedure, Trigger, Package or Function (Doc ID 167421.1)
Komentáře