Oracle Related Problems Handling
Installation Steps
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
Error Handling 2
ORA-00205: error in identifying control file, check alert log for more info
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
Linux Version Oracle Auto-start
Oracle Database Character Set Chinese Garbled Characters
Oracle Time Judgment
Do not use trim(column)>someDate
Directly column > someDate
Oracle Database Connection String
;expression SID format/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.
- 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.