Oracle Auto Start Script

#!/bin/sh

#
# chkconfig: 2345 99 99

#
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/version/db_1
export ORACLE_HOME_LISTENER=$ORACLE_HOME
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
#export JAVA_HOME=$ORACLE_HOME/jdk
export PATH=$PATH:$ORACLE_HOME/bin:$JAVA_HOME/bin
export ORACLE_SID=orclcdb
#export ORACLE_TRACE=Y

export PATH=$JAVA_HOME/bin:$ORACLE_HOME/bin:$PATH

# See how we were called.
case “$1″ in
start)

su oracle -c “$ORACLE_HOME/bin/lsnrctl start"
su oracle -c “$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
# su oracle -c “echo alter pluggable database all open’;’|$ORACLE_HOME/bin/sqlplus / as sysdba"
;;
stop)
su oracle -c “$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
su oracle -c “$ORACLE_HOME/bin/lsnrctl stop"
;;
restart|reload)
su oracle -c “$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
su oracle -c “$ORACLE_HOME/bin/lsnrctl stop"
su oracle -c “$ORACLE_HOME/bin/lsnrctl start"
su oracle -c “$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
# su oracle -c “echo alter pluggable database all open’;’|$ORACLE_HOME/bin/sqlplus / as sysdba"
status)
$ORACLE_HOME/bin/lsnrctl status
;;
*)
echo $"Usage: $0 {start|stop|restart|reload}"
exit 1
esac

exit 0

 

***

Automatic DB Startup: The Linux Part (OEL 6 and 7)

***

Oracle Auto-Startup Script for Linux

How to Auto Start Oracle Database on Linux

http://www.bigdatalyn.com/2019/08/20/Oracle_Enable_AutoStart_Tips/

https://dba.stackexchange.com/questions/82260/oracle-database-12c-on-oracle-linux-7-autostart-enabling-connection-as-sysdba

https://hadafq8.wordpress.com/2016/03/05/rhel-7oel-7centos-7-configuring-automatic-startup-of-oracle-db-under-systemd/

How to Automate Startup/Shutdown of Oracle Database and Listener on Linux

 

Powercli add RDM to different nodes

http://www.dscentral.in/2016/04/11/map-shared-rdms-using-powercli/

https://kb.vmware.com/s/article/1005937

VMware PowerCLI – Adding RDM Disk’s

VMware PowerCLI script to get VM’s virtual and RDM disk information

https://www.v-front.de/2014/07/useful-powercli-scripts-for-storage.html

PowerCLI script to list VMFS,RDM and Free LUNs in a cluster

Searching for RDM Disks using PowerCLI

PowerCLI to get information about RDM connected to VM.

https://vmwareaddicted.blogspot.com/2017/05/raw-device-mapping-rdm-in-detail.html

https://virtuallyhyper.com/2012/06/powercli-script-identify-which-vm-using-rdm-lun-identified-naa-id-lun/

Finding Raw Device Mappings (RDMs) used in your VMware vSphere Environment

PowerCLI Functions – Get Raw Device Mappings and Set Perennial Reservations

http://www.enterprisedaddy.com/category/powershell/

https://www.google.com/search?client=firefox-b-d&q=Map+Shared+RDMs+using+PowerCLI

 

 

 

 

 

 

Oracle Golden Image

http://christian-gohmann.de/2017/10/27/create-golden-image-of-your-current-grid-infrastructure-12-2-installation/

https://gotodba.com/2019/10/01/using-oracle-gold-images/

http://www.ludovicocaldara.net/dba/gi-18c-gridsetup-goldimage/

https://www.markusdba.net/?p=294

https://www.bobbydurrettdba.com/2019/08/08/rolling-out-patched-19c-home-using-gold-image/

http://www.ludovicocaldara.net/dba/oh-mgmt-7/

https://www.markusdba.net/?p=294

 

Oracle alert – scripts

How to check Oracle Alert log by a crontab-ready script

Grepping Entries from Alert.log

https://connectbyoracle.wordpress.com/2015/08/28/awk-script-to-scan-alertlog-file/

https://coskan.wordpress.com/2010/12/06/alert-log-monitoring-script-via-adrci/

 

MONITORING ALERT LOG

https://dbaclass.com/article/shell-script-for-monitoring-alert-log/

https://odbablog.wordpress.com/2019/01/04/oracle-alertlog-monitoring-with-elasticsearch-and-kibana/

https://dba.stackexchange.com/questions/54512/monitoring-of-alert-log-file

 

jupyter notebook kernel issue

Jupyter Notebook問題描述

我的運行環境

系統:

 - Windows 10
 - ipykernel 5.0.0
 - ipython 7.0.1
 - jupyter 1.0.0
 - Python 3.6.7rc1
 - TensorFlow 1.9

[ √ ] 需要特別說明的是,我的win10下python安裝是直接安裝的,不是anaconda環境

問題描述

運行前提: python環境依賴安裝成功!
在Win10系統下,cmd終端運行

C:\Users\xxx> jupyter notebook

跳轉到瀏覽器,打開後綴爲.ipynb的文件,右上角總是顯示

kernel starting, please wait

或者,點擊kernel選項下的restart等選項,總是無法正常啓動


查詢的解決辦法

現列出查詢到的解決辦法,對我沒有用處,也許對你有所幫助,僅供參考!

方法1

  1. 首先使用jupyter kernelspec list查看安裝的內核和位置
  2. 進入安裝內核目錄打開kernel.jason文件,查看Python編譯器的路徑
  3. 如果不正確修改爲正確的安裝路徑,我修改後的路徑爲: 如果不正確修改爲正確的安裝路徑,我修改後的路徑爲:“D:\Program Files\Anaconda3\envs\tensorflow\python.exe”
  4. 重啓 jupyter notebook:jupyter notebook
  • 問題反饋
    我個人電腦已經正常運行jupyter notebook,現提供未經此方法修改的kernel.jason原文件!
{
  "argv": [
    "python",
    "-m",
    "ipykernel_launcher",
    "-f",
    "{connection_file}"
  ],
 "display_name": "Python 3",
 "language": "python"
}

按照此方法的修改方法,應該修改爲:

{
  "argv": [
    "D:\\Program Files\\Anaconda3\\envs\\tensorflow\\python.exe",
    "-m",
    "ipykernel_launcher",
    "-f",
    "{connection_file}"
  ],
 "display_name": "Python 3",
 "language": "python"
}

但是,我修改以後沒有任何作用,問題依然存在,而且最終正常運行以後查看kerner.jason文件也沒有做任何修改,所以推測是此博主在python安裝配置過程出現了問題,或者系統中安裝了多個python版本,因此需要在jupyter notebook中特別指定python路徑!

方法2

  1. 打開:anaconda prompt
  2. 卸載:conda uninstall jupyter notebook
  3. 安裝:conda uninstall jupyter notebook
  • 問題反饋
    由於我沒有利用anaconda安裝python環境,這裏不做評述。

方法3

ipython kernel install --user

github提供的完整方法是:

conda create -n py36 python=3.6   # step 1
source activate py36              # step 2
conda install notebook ipykernel  # step 3
ipython kernel install --user	  # step 4
  • 問題反饋
    這裏問題解決方法是針對kernel的安裝過程中出現了問題,同樣是針對anaconda安裝方法,另外下面是python2的步驟
conda create -n py27 python=2.7   # step 1
source activate py27              # step 2
conda install notebook ipykernel  # step 3
ipython kernel install --user	  # step 4

我的解決思路

作爲一個較少使用jupyter notebook的老哥(其實是懶的用,喜歡在項目下加個test.py直接擼代碼),鼓搗一會才發現,出現的問題都是會在win終端下顯示出來的!(我勒個去,傻笑一個)。
先列出來按照網上的方法安裝時出現的問題:
圖1 python -m ipykernel install --user
這個時候,已經出現問題所在了,最後一行:

ModuleNotFoundError: No module named 'prompt_toolkit.formatted_text'

我一開始並沒有注意到這行,如果你看到了這裏,你可以試着查看你的cmd終端顯示的什麼錯誤,而不是直接按照網上的說法複製粘貼執行代碼。
我的jupyter notebook總是運行顯示正在啓動或重啓kernel無效,正是由於這個問題導致的,解決方法這裏有說:
github上的prompt_toolkit錯誤解決方法
問題是沒有安裝prompt_toolkit,那麼安裝吧,在cmd下git安裝就好了:

pip install --upgrade prompt-toolkit==2.0.4

安裝完以後還是有問題,繼續安裝:

pip install Flask-WTF

安裝完這倆以後,運行jupyter notebook竟然直接好了,看來不是kernel問題,只是自己電腦環境依賴沒有安裝完整。

 

https://www.twblogs.net/a/5bb42a792b71770e645e4e42