I'm trying to use ansible-oracle playbook (https://github.com/oravirt/ansible-oracle) to install a 19c database, however, seems it always create default 18c, i cannot find which file to edit or which param/option to feed into CLI command below,
ansible-playbook single-instance-db-on-fs.yml -e hostgroup=myhostgroup
who can give me some hint, thanks.
Thanks & Regards,
Martin.
Related
I have added following setting in my catalina.sh file
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="/root/logs".
But still the heap dump file is not created when tomcat is going down. I have this setup on centos 7 on AWS.
Please help me in solving this issue... Thanks in advance.
I would suggest try create it manually if it is not generating automatically by using a JDK bundled tool called jmap, although we recommend that you use the automatic method above for best result.
For Linux/Solaris-based Operating Systems:
Please execute the following command on Linux OS:
$JAVA_HOME/bin/jmap -dump:format=b,file=heap.bin <pid>
More Ref Follow the link below :
https://confluence.atlassian.com/doc/generating-a-heap-dump-219024032.html
the tomcat process is usually set up to run as the tomcat user, who most likely will not have any write access to your /root folder.
Please try to set it to somewhere like /tmp
A look at the core database modules in Ansible documentation shows no signs of a module for Oracle. What is the best way to handle SQL/PLSQL deployments via Ansible for Oracle databases?
Are we expected to use roles from Ansible Galaxy to handle this? Very few people seem to have downloaded roles listed on Galaxy for Oracle.
I have created a role to install apex 5 (where I first uninstall apex 4). I use modules like 'script' and 'shell'. I am not too happy about environment initialization but I am still learning. For any SQL/PLSQL task, sqlplus is the right tool. (perhaps SQLcl can do better..?)
- name: Determine apex version
become: yes
become_user: oracle
shell: source /etc/profile && sqlplus -S / as sysdba #"{{ temp_dir }}/apexver.sql"
register: apexver
args:
executable: /bin/bash
changed_when: "'APEX_040000' in apexver.stdout"
- name: oracle apex remove
become: yes
become_user: oracle
script: apex_remove.sh {{ item }}
with_items:
- 'XE'
ignore_errors: yes
register: result
when: "'APEX_040000' in apexver.stdout"
22:18 $ cat apex_remove.sh
#!/bin/sh
# set oracle environment
. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
ORACLE_SID=$1
sqlplus -s /nolog <<EOF
connect / as sysdba
#?/apex/apxremov.sql
exit
EOF
I'm not sure if this is related to your question, but I originally was looking for Ansible modules to Start/Stop and get the Status of an Oracle database. I couldn't find anything suitable so I wrote my own ansible modules. Modules give you the power to define a standard interface, with OK/Failed/Changed responses to tasks, while performing as much low-level activity/commands as you need (in this way they are much more flexible than the simple shell/command modules). I wrote the modules to be idempotent -- they won't attempt to start databases that are already started, and won't attempt to stop databases that are already stopped. And if a stop/stop function isn't successful, it returns Failed with stdout/stderr.
Along with Oracle databases, I've also written modules to provide interfaces for Business Objects and Weblogic services. The modules are significant up-front work, but once they are stable they can be used in a wide range of playbooks.
I haven't looked at Galaxy to see if there is anything else like this, and unfortunately due to the nature of my client/contract I'm not sure that I can share the modules that we have developed. I just thought I'd offer this as a possible avenue for you to explore.
I'm trying to install weblogic server on Centos 7 with following instruction of oracle about console mode. Everything will be fine till weblogic file 's extracting on my computer. I get this message about
display enviroment variable failed
I google it and found xming as solution. But is there any solution to install weblogic without xming.
You need to do a silent install as mentioned. You can find the documentation here.
Basically, you need two files:
A response file
Here, you will set some parameters like ORACLE_HOME, proxy information if needed and installation type, etc.
An oraInst.loc file
In this file, you need to do the following(from documentation):
Replace oui_inventory_directory with the full path to the directory where you want the installer to create the inventory directory. Then, replace oui_install_group with the name of the group whose members have write permissions to this directory.
After doing all of this, you can run the command as follows;
java -jar distribution_name.jar -silent -responseFile file [-options] [()*]
I uploaded my own oraInst.loc and response files here for demonstration. I strongly suggest you to read the documentation though. Good luck.
I have been using ansible 1.5.4 for 8 month. Yesterday I found that login_port of mysql_repilcation module is not supported in 1.5.4 version.
It is a bug in that version, but they supported in latest version (>= 1.8 I think). But I already have more than 50 ansible script running in 1.5.4
which has been used in production side
What is the best possible scenario:
If I move 1.5.4 to latest version , will it impact on any existing
ansible script
Is it possible to achieve the desire outout by shell command.
I am stuck in the middle of ocean. please help me to out of this
problem
If I move 1.5.4 to latest version , will it impact on any existing
ansible script
This highly depends on your playbook/roles, but I'm pretty sure it won't just work without changes. For example I read many times now that users have problems with sudo on role level:
- roles:
- role: whatever
sudo: yes
That was broken in 1.9.1. Officially it is fixed but I have read users have still problems. Generally sudo has been replaced with become. Even though the documentation claims sudo is still supported, it clearly isn't completely.
Another change I remember was related to ssh transport but you should only stumble about this issue if you reboot your host during play with Ansible.
I think the sudo/become change was the biggest one. If you want to avoid the hassle and do not necessarily need the very recent version you might just upgrade to a version before 1.9 and will have better chances of getting through without changes.
If you have the time though, I recommend you make your play compatible with the recent version. The Ansible 2.0 release is ahead and will introduce many new very useful features.
Is it possible to achieve the desire outout by shell command.
You mean to automatically convert your playbook/roles? No, not unless you find out exactly about the problems and write that script yourself. :)
I am stuck in the middle of ocean. please help me to out of this problem
Generally you should test every new version of Ansible on a testing/staging environment first. If you do not have testing hosts you can set up local VM's. There you can test and fix your play.
Since login_port of mysql_repilcation module is not supported in ansible 1.7 version. I found a way to achieve the result.
- name: "stop slaves of existing database server"
shell: >
mysql -uroot -p{{ mysql_exist_slave_database_password }} \
-P{{ default_port }} -h{{ default_host }} -e "stop slave" -s
- name: "Retrieve the Position and binary file number using slave
status"
shell: >
mysql -uroot -p{{ mysql_exist_slave_database_password }} \
-P{{ default_port }} -h{{ default_host }} -e "show slave
status\G" -s
register: output
- name: "start slaves of existing database server"
shell: >
mysql -uroot -p{{ mysql_exist_slave_database_password }} -P{{
default_port }} -h{{ default_host }} -e "start slave" -s
I have tried all suggested changes in other replies like creating a find .hiverc in /etc/hive/conf with set hive.cli.print.current.db=true; and set hive.cli.print.header=true;. It did not work.
I tried the same in /etc/hive/conf. That also did not work.
FYI I am using a cloudera training environment.
Thanks in advance!!
If you are using hive in remote mode (clidriver connecting to hiveserver), these options probably won't work.
You can try using cli in local mode, or beeline + hiverserver2.