Skip to main content

Oracle Related Problems Handling

Installation Steps

Installation steps address

Error Handling 1

ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/data/oracle/product/11.2.0/db_1/dbs/initorcl.ora

Solution

Error Handling 2

ORA-00205: error in identifying control file, check alert log for more info

Solution

Specific operation steps:

  • Use command dbca to create database jc, go to /usr/oracle/app execute following command: can get control_files path. find . -name control0*
  • Execute following command in SQL> window, check if control_files path is consistent with found one
show parameter control_files
alter system set control_files='/usr/oracle/app/oradata/jc/control01.ctl' scope=spfile;
alter system set control_files='/usr/oracle/app/flash_recovery_area/jc/control02.ctl' scope=spfile;

Oracle Database Configuration Files

.bash_profile initjc.ora

Linux Version Oracle Auto-start

See blog

Oracle Database Character Set Chinese Garbled Characters

See blog

Oracle Time Judgment

Do not use trim(column)>someDate

Directly column > someDate

Oracle Database Connection String

  1. ; expression SID format
  2. / expression ServiceName format

Fix Oracle Password Expiration Problem

Select * FROM dba_profiles s Where s.profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME'; 

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;


alter user jc identified by 123456;
alter user syste identified by 123456;

Mybatis Primary Key Auto-increment Handling

oracle

@Bean
public IKeyGenerator keyGenerator() {
return new H2KeyGenerator();
}

@KeySequence(value="xxx_sequence)
@TableId(type=IdType.INPUT)
prive Long primaryKey;

mysql

@TableId(type=IdType.AUTO)
// Write on Mapper
@Insert(xxx)
@Options(useGeneratedKeys=true, keyProperty="id")
int insertOne(XxxPo po)
Agreement
The code part of this work is licensed under Apache License 2.0 . You may freely modify and redistribute the code, and use it for commercial purposes, provided that you comply with the license. However, you are required to:
  • Attribution: Retain the original author's signature and code source information in the original and derivative code.
  • Preserve License: Retain the Apache 2.0 license file in the original and derivative code.
The documentation part of this work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License . You may freely share, including copying and distributing this work in any medium or format, and freely adapt, remix, transform, and build upon the material. However, you are required to:
  • Attribution: Give appropriate credit, provide a link to the license, and indicate if changes were made.
  • NonCommercial: You may not use the material for commercial purposes. For commercial use, please contact the author.
  • ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.