Continuous problems setting up oracle - oracle

I am currently embroiled in a battle of wills regarding the installation and setup of oracle 10.2.0.
I am following this guide. Having received errors at every step of the way I've finally got to the very end of the guide only to receive this error message after running catproc.sql:
PL/SQL procedure successfully completed.
Package body created.
No errors.
Package body created.
BEGIN
*
ERROR at line 1:
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
ORA-06512: at "SYS.DBMS_STATS", line 13210
ORA-06512: at "SYS.DBMS_STATS", line 13517
ORA-06512: at "SYS.DBMS_STATS", line 15859
ORA-06512: at "SYS.DBMS_STATS", line 15901
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_REGISTRY", line 560
ORA-06512: at "SYS.DBMS_REGISTRY", line 612
ORA-06512: at line 4
SQL>
To get this far I had to modify my init.ora file with the following settings:
control_files = (C:\oracle\product\10.2.0\oradata\ora10\control01.ora,
C:\oracle\product\10.2.0\oradata\ora10\control02.ora,
C:\oracle\product\10.2.0\oradata\ora10\control03.ora)
undo_management = auto
db_name = ora10
db_block_size = 8192
db_cache_size=67108864
large_pool_size=1048576
shared_pool_size=117440512
My 'create database' command is the same as listed at 1 but with my datafiles in C and not D.
And please remember I am not a DBA and these values are simply plucked from various problems others have had around the 'net.

I recommend you create the database with the Oracle Database Creation Assistant due to your lack of knowledge on Oracle database creation. It's good enough for most cases.
The problem in the link you provide is that ALL the settings are vey low. Sooner or later you'll see other problems regarding UNDO segment because of the little datafiles.
Anyway, the sentence says:
default temporary tablespace temp
tempfile 'c:\oracle\databases\ora10\temp.dbf'
size 10M;
It's saying that the TEMPFILE tablespace is 10MB with no extend. You can try to add the autoextend on to become:
default temporary tablespace temp
tempfile 'c:\oracle\databases\ora10\temp.dbf'
size 10M autoextend on;
Or because you have already created the tablespace you can execute:
alter tablespace temp
add tempfile 'c:\oracle\databases\ora10\temp02'.dbf' SIZE 10M AUTOEXTEND ON
With this sentence you are saying: add another tempfile to the TEMP tablespace with size 10M (very little!) and make it bigger as needed.
From your link, also be careful with:
The character set WE8ISO8859P1, I recommend you to use UTF8.
The logfiles sizes can do the database very very slow they have to be bigger.
The parameter db_cache_size is only 67MB, very very little. The others too.
Anyway, the best way to start is using the Oracle Database Creation Assistant.

Related

Why do I get ORA-20000 when I run dbms_stats.gather_table_stats on a table in SSB Schema?

I wanted to generate some CPU load on my ADB-S database. I tried to collect the optimizer statistics on a table from the sample schema SSB, but I got this error, even if I am connected as ADMIN user:
exec dbms_stats.gather_table_stats('SSB','CUSTOMER');
BEGIN dbms_stats.gather_table_stats('SSB','CUSTOMER'); END;
Error report -
ORA-20000: Unable to analyze TABLE "SSB"."CUSTOMER", insufficient privileges or does not exist
ORA-06512: at "SYS.DBMS_STATS", line 40921
ORA-06512: at "SYS.DBMS_STATS", line 40193
ORA-06512: at "SYS.DBMS_STATS", line 40352
ORA-06512: at "SYS.DBMS_STATS", line 40902
ORA-06512: at line 1
20000. 00000 - "%s"
*Cause: The stored procedure 'raise_application_error'
was called which causes this error to be generated.
*Action: Correct the problem as described in the error message or contact
the application administrator or DBA for more information.
Not being able to change anything on SSB (or any sample schema for that matter) is intentional. Those are purely read-only schemas and the stats on them are controlled by Oracle.
Oracle documentation mentions that sample schemas are read-only:
https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/autonomous-sample-data.html#GUID-4BB2B49B-0C20-4E38-BCC7-A61D3F45390B

Error while giving grant to USER from SYS in ORACLE

I am connected to SYSDBA. I want to give access to user 'OFFC' to read and write on directory E:\oracle\extract.So,what I tried is:
CREATE OR REPLACE DIRECTORY EXTRACT_DIR AS 'E:\oracle\extract';
GRANT READ, WRITE ON DIRECTORY EXTRACT_DIR TO OFFC;
GRANT EXECUTE ON UTL_FILE TO OFFC;
What i got as error is:
Directory created.
GRANT READ, WRITE ON DIRECTORY EXTRACT_DIR TO OFFC
Error at line 2
ORA-00604: error occurred at recursive SQL level 1
ORA-12899: value too large for column "OT"."SCHEMA_AUDIT"."OBJECT_CREATED" (actual: 16, maximum: 15)
ORA-06512: at line 2
Why is this error coming when I tried to gave the access?
You must have have created the schema level trigger which keeps log of the newly created object in OT.SCHEMA_AUDIT.
In this table column OBJECT_CREATED stores the schema.object_name and data type of the column is somewhat VARCHAR2(15) or similar.
In your case, you are creating the object OFFC.EXTRACT_DIR (length:16) which is causing the issue.
Either disable the trigger or increase the Length of the OBJECT_CREATED column to around (257)
Cheers!!

Access bfile from other oracle database

I have two Oracle databases using Oracle Standard Edition Two 12.1, DB1 and DB2.
DB1 contains the following table a FILE_TABLE:
ColumnName DataType
File_Id Number
File_Ref Bfile
I am storing Bfile into File_Ref of a FILE_TABLE table.
I want to access the Bfile from FILE_TABLE table and show it in DB2.
I have tried it using the database link. Using database link, I tried to do so:
SELECT FILE_REF FROM FILE_TABLE#dblink;
but it's giving an error: ORA-22992: cannot use LOB locators selected from remote tables
I also tried the DBMS_FILE_TRANSFER but when I researched on it, I got to know that we can only transfer System data files but not Bfile.
Is it true?
This is the syntax I used to transfer file:
DBMS_FILE_TRANSFER.put_file(
source_directory_object => 'db1_dir',
source_file_name => 'db1test.html',
destination_directory_object => 'db2_dir',
destination_file_name => 'db2test.html');
destination_database => 'db1_to_db2',
END;
/
But I was getting an error:
ORA-19505: failed to identify file "/db1_dir/db1test.html"
ORA-27046: file size is not a multiple of logical block size
Additional information: 1
ORA-02063: preceding 3 lines from db1_to_db2
ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 37
ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 132
ORA-06512: at line 2
00000 - "failed to identify file \"%s\""
*Cause: call to identify the file returned an error
*Action: check additional messages, and check if the file exists
Is there any way to do it using database link? Are there any other solutions to move a Bfile from one Database to other?
The ora-27046 is generally a sign that during the file transfer the file has been changed. This can be caused by firewalls. Have you verified with that the file is the same.
In addition when you get ora-27046 its not the only error, you get an error stack of several errors. It would be good to post the complete error stack. Also you don't mention which oracle release you are using.

Identifier SDO_RDF.CREATE_RDF_NETWORK must be declared ORACLE 12c JENA

I am working with semantic (RDF/OWL) data and want to store it in Oracle 12c. I have installed all necessary softwares.
I have created a pluggable database PROJOWL and trying to create a table within that to store the RDF data.
The steps I follow are from HERE (go to 1.11)
Step 1: CREATE TABLESPACE rdf_users
DATAFILE 'rdf_users.dat' SIZE 128M REUSE
AUTOEXTEND ON NEXT 64M MAXSIZE UNLIMITED
SEGMENT SPACE MANAGEMENT AUTO;
Step 2: EXECUTE SEM_APIS.CREATE_SEM_NETWORK('rdf_users');
This is where I get the error
SQL> EXECUTE SDO_RDF.CREATE_RDF_NETWORK('rdf_users');
BEGIN SDO_RDF.CREATE_RDF_NETWORK('rdf_users'); END;
*
Error on line 1:
ORA-06550: line 1, column 7:
PLS-00201: Identifier SDO_RDF.CREATE_RDF_NETWORK must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Not sure what to do to resolve this. I am new and trying to run the example in the documentation is the only way for me to get me understand write code for my data. Help would be appreciated.

Getting Error-ORA-00604, while creating new procedure in oracle sql developer

I am getting error while creating procedure and package. Please anyone help me.
My procedure code-
CREATE OR REPLACE PROCEDURE IPROC(CID IN NUMBER, CNAME IN VARCHAR2, CON IN NUMBER, A_NO IN NUMBER, BAL IN NUMBER, TTYPE VARCHAR2)
AS
BEGIN
INSERT INTO CUSTOMER_TBL VALUES(CID,CNAME,CON,A_NO,BAL,TTYPE);
END;
Error-
Error report -
ORA-00604: error occurred at recursive SQL level 1
ORA-01653: unable to extend table SYS.PLSCOPE_ACTION$ by 128 in tablespace SYSAUX
00604. 00000 - "error occurred at recursive SQL level %s"
*Cause: An error occurred while processing a recursive SQL statement
(a statement applying to internal dictionary tables).
*Action: If the situation described in the next error on the stack
can be corrected, do so; otherwise contact Oracle Support.
If you're experiencing this error only in Sql Developer, try to change, Tools > Preferences > Database > PL/SQL Compiler, the option PLSCope to None.
PLSCOPE_SETTINGS controls the compile time collection, cross reference, and storage of PL/SQL source code identifier data.
NONE: Disables collection of identifier data.
ALL: Enables the collection of all source code identifier data. This is the default in SqlDeveloper.
SqlDeveloper default for PLScope is All, and maybe is causing this error.
You have no space left in tablespace SYSAUX
Either you also have no space left or your HDD or max limits of SYSAUX are reached.
Also look at script mentioned in https://dba.stackexchange.com/questions/33645/sysaux-tablespace-is-98, maybe it will help you.
If you have acces to the dba_data_files table , This query will show you how much space you have and how much you have utilized.
If it is full add another file to the tablespace or ask dba to add another file to it.
SQL> select file_name, sum(bytes)/1024/1024/1024 "current_gb",sum(maxbytes)/1024/1024/1024 "total_gb" from dba_data_files where tablespace_name='SYSAUX' group by file_name;
FILE_NAME current_gb total_gb
------------------------------------------------------------ ---------- ----------
C:\AKS\AKDB\ORADATA\RESEARCH\SYSAUX01.DBF .546875 31.9999847
To add datafile
Alter tablespace SYSAUX ADD DATAFILE 'C:\AKS\AKDB\ORADATA\RESEARCH\SYSAUX02.DBF' size 100m autoextend of maxsize 2g;

Resources