max_statement_mem work fault in Greenplum 4.2 - greenplum

how could this happened?,the set 8GB didnt work?

That appears to be a bug with an old version of Greenplum that is no longer supported.
gpdb=# create user jon;
NOTICE: resource queue required -- using default resource queue "pg_default"
CREATE ROLE
gpdb=# alter user jon set max_statement_mem='8GB';
ALTER ROLE
gpdb=# alter user jon password 'changeme';
ALTER ROLE
gpdb=# \q
bigmac:~ gpadmin$ psql -U jon -h bigmac
Password for user jon:
psql (8.2.15)
Type "help" for help.
gpdb=> show max_statement_mem;
max_statement_mem
-------------------
8GB
(1 row)
gpdb=> \q
Now, logging in as gpadmin, I get the default again of 4GB.
bigmac:~ gpadmin$ psql
psql (8.2.15)
Type "help" for help.
gpdb=# show max_statement_mem;
max_statement_mem
-------------------
4GB
(1 row)
And here is my version information.
gpdb=# select version();
version
-----------------------------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 8.2.15 (Greenplum Database 4.3.7.1 build 1) on i386-apple-darwin11.4.2, compiled by GCC gcc (GCC) 4.4.2 compiled on Jan 21 2016 15:09:31
(1 row)
gpdb=#

Related

Oracle FLEXCUBE installer: WORK_AREA/TRACE_AREA directory is not available in Database

At the installation process of Oracle Flexcube 14.5 / 14.6 by Oracle FLEXCUBE Universal Installer i`ve got the same error: "WORK_AREA/TRACE_AREA directory is not available in Database".
When i execute:
SELECT * FROM all_directories;
This Directories are present:
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS WORK_AREA /scratch/work_area/DEV/CTPW
SYS TRACE_AREA /scratch/work_area/DEV/FC122MAT/DEBUG
This Directories are also present at Database Server and writable for Oracle Database.
Platform: RHEL 8, Oracle Database 19.3 Enterprise.
Any ideas what is wrong?
Please check the parameter in CSTB_PARAM using the below query.
SELECT * FROM all_directories where directory_name in (select param_val
from CSTB_PARAM where param_name in ('WORK_AREA','TRACE_AREA'));
If there is no rows for the above select then you need to create directories with the below value
select param_val
from CSTB_PARAM where param_name in ('WORK_AREA','TRACE_AREA');

"ORA-22814: attribute or element value is larger than specified in type" error in export to 11.2 format

System Patch Level:
28790651;OJVM RELEASE UPDATE: 12.2.0.1.190115 (28790651)
28870605;OCW JAN 2019 RELEASE UPDATE 12.2.0.1.190115 (28870605)
28822515;Database Jan 2019 Release Update : 12.2.0.1.190115 (28822515)
expdp system#pdb1 TABLES=tbl VERSION=11.2 DIRECTORY=dmp DUMPFILE=test.dmp LOGFILE=test.log
Oracle triggers the following error.
ORA-39126: Worker unexpected fatal error in
KUPW$WORKER.FETCH_XML_OBJECTS [ORA-22814: attribute or element value
is larger than specified in type
For detailed information, I have changed errorstack level before export.
alter system set events='22814 trace name errorstack level 3';
and I get the following error in logfile.
ORA-22814: attribute or element value is larger than specified in type
----- Current SQL Statement for this session (sql_id=duvyz0kwp8zxp) -----
SELECT /+all_rows/ SYS_XMLGEN(VALUE(KU$), XMLFORMAT.createFormat2('T_STAT_T', '7')), 0 ,KU$.BASE_OBJ.NAME ,KU$.BASE_OBJ.OWNER_NAME ,KU$.BASE_OBJ.TYPE_NAME ,'TABLE_STATISTICS' FROM SYS.KU$_11_2_TAB_STATS_VIEW KU$ WHERE NOT BITAND(KU$.BASE_OBJ.FLAGS,128)!=0 AND KU$.OBJ_NUM IN (SELECT * FROM TABLE(DBMS_METADATA.FETCH_OBJNUMS)) AND NOT EXISTS (SELECT 1 FROM SYS.KU$NOEXP_TAB A WHERE A.OBJ_TYPE='TABLE' AND A.NAME=KU$.BASE_OBJ.NAME AND A.SCHEMA=KU$.BASE_OBJ.OWNER_NAME) AND NOT EXISTS (SELECT 1 FROM SYS.KU$NOEXP_TAB A WHERE A.OBJ_TYPE='SCHEMA' AND A.NAME=KU$.BASE_OBJ.OWNER_NAME)
Oracle Support document ID 1055332.1 (Full Data Pump Export Fails with ORA-39125 ORA-22814) suggests that you should recreate data pump objects by following certain steps. Which steps? They are described in there; have a look.

Reading the same Oracle external table multiple times with the different underlying file content raises the error KUP-05011: Size of file has changed

I try to read the same Oracle external table multiple times with the different underlying file content.
I use the java app with the code fragment like:
int sptepn = 1;
for (File file: files) {
log_step(stepn++);
copy_file_to_oracle_directory(file); // copy myfileN.txt to myfile.txt
call_oracle_sp_read_file();
}
In the pl/sql procedure I use code fragment like:
procedure read_file() is
cursor ext_cu is
select * from ext_table;
begin
for ext_rec in ext_cu loop
-- do something with ext_rec.*
end loop;
end read_file;
On the one group of db-servers this pl/sql procedure works properly. But on the other group of db-servers the call of this pl/sql procedure on the step 2 (of the java procedure) raises the error:
29913-ORA-29913: error in executing ODCIEXTTABLEFETCH callout: ORA-29400: data cartridge error: KUP-05011: Size of file myfile.txt in directory /mydir has changed from 12345 to 67890.
Where the myfile1.txt has the size 12345 and the myfile2.txt has the size 67890.
What is the problem?
The affected server has the version:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
PL/SQL Release 12.2.0.1.0 - Production
"CORE 12.2.0.1.0 Production"
TNS for IBM/AIX RISC System/6000: Version 12.2.0.1.0 - Production
NLSRTL Version 12.2.0.1.0 - Production
How about telling Oracle that you've changed the file? Instead of copy myfileN.txt to myfile.txt I'd try to keep the number in the filenames and alter the external table:
ALTER TABLE ext_table LOCATION ("MYDIR":'myfile1.txt');
read_file();
ALTER TABLE ext_table LOCATION ("MYDIR":'myfile2.txt');
read_file();
...

My question is about exportdump with a query on oracle 9i

I am getting the following error and i need help.
hcp7 (spar)/tmp $ exp system/puppy parfile=rr.prm
Export: Release 9.2.0.8.0 - Production on Thu Oct 31 13:27:11 2019
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
Current user changed to AHS
. . exporting table HB_CONTROL_OUT_DATA
EXP-00056: ORACLE error 933 encountered
ORA-00933: SQL command not properly ended
Export terminated successfully with warnings.
hcp7 (spar)/tmp $
hcp7 (spar)/tmp $ vi rr.prm
"rr.prm" 6 lines, 258 characters
file=raj.dmp
log=raj.log
STATISTICS=none
compress=y
tables=AHS.HB_CONTROL_OUT_DATA
query="[select * from hb_control_out_data where exists (select '1' from hb_control_out where hbod_tran_num = hbo_tran_num and ADD_MO
NTHS(HBO_TO_MIS_DATE,24) >SYSDATE)]"
You need to escape your quotes in the query. See the documentation at https://docs.oracle.com/cd/B10501_01/server.920/a96652/ch01.htm#1005843.
BTW, version 9i belongs in a software museum. It was released 17 years ago and the final patch set was released over 12 years ago.
The error message is
EXP-00056: ORACLE error 933 encountered
ORA-00933: SQL command not properly ended
What SQL are you executing? Well, your parameter file includes a QUERY parameter. It may be a trick of the cut'n'paste into the StackOverflow question box but this looks odd:
ADD_MO NTHS(HBO_TO_MIS_DATE,24)
^
If that space or newline is not an artefact remove and re-run the export.

How to check Oracle patches are installed?

How do I check that all services and patches are installed in Oracle?
I have an Oracle 10.2.0.2.0 db version and want to install patches. Also I want to get a list with all services and patches.
Here is an article on how to check and or install new patches :
To find the OPatch tool setup your database enviroment variables and then issue this comand:
cd $ORACLE_HOME/OPatch
> pwd
/oracle/app/product/10.2.0/db_1/OPatch
To list all the patches applies to your database use the lsinventory option:
[oracle#DCG023 8828328]$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u00/product/11.2.0/dbhome_1
Central Inventory : /u00/oraInventory
from : /u00/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.1.0
Log file location : /u00/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2013-11-13_13-55-22PM_1.log
Lsinventory Output file location : /u00/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2013-11-13_13-55-22PM.txt
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.1.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 8405205 : applied on Mon Aug 19 15:18:04 BRT 2013
Unique Patch ID: 11805160
Created on 23 Sep 2009, 02:41:32 hrs PST8PDT
Bugs fixed:
8405205
OPatch succeeded.
To list the patches using sql :
select * from registry$history;
I understand the original post is for Oracle 10 but this is for reference by anyone else who finds it via Google.
Under Oracle 12c, I found that that my registry$history is empty.
This works instead:
select * from registry$sqlpatch;
Maybe you need "sys." before:
select * from sys.registry$history;

Resources