Oracle相关问题处理
安装步骤
报错处理一
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
报错处理二
ORA-00205: error in identifying control file, check alert log for more info
具体操作步骤:
- 使用命令dbca创建数据库jc中,去/usr/oracle/app中执行如下命令:即可拿到control_files路径。
find . -name control0*
- 在SQL>窗口中执行如下命令,看control_files的路径如查找到的是否一致
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;
Oralce数据库配置文件
linux 版 ORACLE自启
Oracle数据库 字符集中文乱码
Oracle 时间判断
不要使用trim(column)>someDate
直接 column > someDate
oracle数据库连接串
;
表达式 SID格式/
表达式 ServiceName格式
修复Oracle密码过期问题
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;
Mybtis主键自增处理
oracle
@Bean
public IKeyGenerator keyGenerator() {
return new H2KeyGenerator();
}
@KeySequence(value="xxx_sequence)
@TableId(type=IdType.INPUT)
prive Long primaryKey;
mysql
@TableId(type=IdType.AUTO)
// 在Mapper上面写
@Insert(xxx)
@Options(useGeneratedKeys=true, keyProperty="id")
int insertOne(XxxPo po)