Install PyQT on Windows and Build OCI Plugin for Oracle Database

D:\port\sip-4.16.2>python configure.py -p win32-g++
This is SIP 4.16.2 for Python 3.4.1 on win32.
The SIP code generator will be installed in D:\port\Python341-32.
The sip module will be installed in D:\port\Python341-32\Lib\site-packages.
The sip.h header file will be installed in D:\port\Python341-32\include.
The default directory to install .sip files in is D:\port\Python341-32\sip.
Creating siplib\sip.h...
Creating siplib\siplib.c...
Creating siplib\siplib.sbf...
Creating sipconfig.py...
Creating top level Makefile...
Creating sip code generator Makefile...
Creating sip module Makefile...

D:\port\sip-4.16.2>mingw32-make
mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/sipgen'
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o main.o main.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o transform.o trans
form.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o gencode.o gencode
.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o extracts.o extrac
ts.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o export.o export.c

gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o heap.o heap.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o parser.o parser.c

gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o lexer.o lexer.c
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -Wl,-subsystem,console -Wl,-s -o sip.exe main.o transform.o gen
code.o extracts.o export.o heap.o parser.o lexer.o
mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/sipgen'
mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/siplib'
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341-
32\include -o siplib.o siplib.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341-
32\include -o apiversions.o apiversions.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341-
32\include -o descriptors.o descriptors.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341-
32\include -o qtlib.o qtlib.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341-
32\include -o threads.o threads.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341-
32\include -o objmap.o objmap.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341-
32\include -o voidptr.o voidptr.c
gcc -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341-
32\include -o array.o array.c
g++ -c -O2 -w -DNDEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -ID:\port\Python341-
32\include -o bool.o bool.cpp
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -shared -Wl,-subsystem,console -Wl,-s -o sip.pyd siplib.o apive
rsions.o descriptors.o qtlib.o threads.o objmap.o voidptr.o array.o bool.o -LD:\
port\Python341-32\libs -lpython34
mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/siplib'

D:\port\sip-4.16.2>mingw32-make install
mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/sipgen'
copy /y sip.exe D:\port\Python341-32\sip.exe
        1 file(s) copied.
mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/sipgen'
mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/siplib'
copy /y sip.pyd D:\port\Python341-32\Lib\site-packages\sip.pyd
The process cannot access the file because it is being used by another process.
        0 file(s) copied.
Makefile:39: recipe for target 'install' failed
mingw32-make[1]: *** [install] Error 1
mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/siplib'
Makefile:7: recipe for target 'install' failed
mingw32-make: *** [install] Error 2

D:\port\sip-4.16.2>mingw32-make install
mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/sipgen'
copy /y sip.exe D:\port\Python341-32\sip.exe
        1 file(s) copied.
mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/sipgen'
mingw32-make[1]: Entering directory 'D:/port/sip-4.16.2/siplib'
copy /y sip.pyd D:\port\Python341-32\Lib\site-packages\sip.pyd
        1 file(s) copied.
strip D:\port\Python341-32\Lib\site-packages\sip.pyd
copy /y D:\port\sip-4.16.2\siplib\sip.h D:\port\Python341-32\include\sip.h
        1 file(s) copied.
mingw32-make[1]: Leaving directory 'D:/port/sip-4.16.2/siplib'
copy /y sipconfig.py D:\port\Python341-32\Lib\site-packages\sipconfig.py
        1 file(s) copied.
copy /y D:\port\sip-4.16.2\sipdistutils.py D:\port\Python341-32\Lib\site-package
s\sipdistutils.py
        1 file(s) copied.

		
D:\port\PyQt-5.3.1>python configure.py --target-py-version=3.4 --spec=win32-g
++
D:\port\PyQt-5.3.1>python configure.py --target-py-version=3.4 --spec=win32-g++
Querying qmake about your Qt installation...
Determining the details of your Qt installation...
This is the GPL version of PyQt 5.3.1 (licensed under the GNU General Public
License) for Python 3.4.1 on win32.

Type 'L' to view the license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.

Do you accept the terms of the license? yes
Found the license file pyqt-gpl.sip.
Checking to see if the QtGui module should be built...
Checking to see if the QtHelp module should be built...
Checking to see if the QtMultimedia module should be built...
Checking to see if the QtMultimediaWidgets module should be built...
Checking to see if the QtNetwork module should be built...
Checking to see if the QtOpenGL module should be built...
Checking to see if the QtPrintSupport module should be built...
Checking to see if the QtQml module should be built...
Checking to see if the QtQuick module should be built...
Checking to see if the QtSql module should be built...
Checking to see if the QtSvg module should be built...
Checking to see if the QtTest module should be built...
Checking to see if the QtWebKit module should be built...
Checking to see if the QtWebKitWidgets module should be built...
Checking to see if the QtWidgets module should be built...
Checking to see if the QtXmlPatterns module should be built...
Checking to see if the QtDesigner module should be built...
Checking to see if the QAxContainer module should be built...
Checking to see if the QtDBus module should be built...
Checking to see if the dbus support module should be built...
DBus v1 does not seem to be installed.
Checking to see if the _QOpenGLFunctions_2_0 module should be built...
Checking to see if the QtSensors module should be built...
Checking to see if the QtSerialPort module should be built...
Checking to see if the QtX11Extras module should be built...
Checking to see if the QtBluetooth module should be built...
Checking to see if the QtMacExtras module should be built...
Checking to see if the QtPositioning module should be built...
Checking to see if the QtWinExtras module should be built...
Checking to see if the QtQuickWidgets module should be built...
Checking to see if the QtWebSockets module should be built...
Qt v5.3.1 (Open Source) is being used.
The qmake executable is D:\port\Qt5.3.1\5.3\mingw482_32\bin\qmake.exe.
Qt is built as a shared library.
SIP 4.16.2 is being used.
The sip executable is D:\port\Python341-32\sip.exe.
These PyQt5 modules will be built: QtCore, QtGui, QtHelp, QtMultimedia,
QtMultimediaWidgets, QtNetwork, QtOpenGL, QtPrintSupport, QtQml, QtQuick,
QtSql, QtSvg, QtTest, QtWebKit, QtWebKitWidgets, QtWidgets, QtXmlPatterns,
QtDesigner, QAxContainer, _QOpenGLFunctions_2_0, QtSensors, QtSerialPort,
QtBluetooth, QtPositioning, QtWinExtras, QtQuickWidgets, QtWebSockets.
The PyQt5 Python package will be installed in
D:\port\Python341-32\Lib\site-packages.
PyQt5 is being built with generated docstrings.
The Designer plugin will be installed in
D:/port/Qt5.3.1/5.3/mingw482_32/plugins/designer.
The qmlscene plugin will be installed in
D:/port/Qt5.3.1/5.3/mingw482_32/plugins/PyQt5.
The PyQt5 .sip files will be installed in D:\port\Python341-32\sip\PyQt5.
pyuic5, pyrcc5 and pylupdate5 will be installed in D:\port\Python341-32.
The interpreter used by pyuic5 is D:\port\Python341-32\python.exe.
Generating the C++ source for the QtCore module...
Generating the .pro file for the QtCore module...
Generating the Makefile for the QtCore module...
Generating the C++ source for the QtGui module...
Generating the .pro file for the QtGui module...
Generating the Makefile for the QtGui module...
Generating the C++ source for the QtHelp module...
Generating the .pro file for the QtHelp module...
Generating the Makefile for the QtHelp module...
Generating the C++ source for the QtMultimedia module...
Generating the .pro file for the QtMultimedia module...
Generating the Makefile for the QtMultimedia module...
Generating the C++ source for the QtMultimediaWidgets module...
Generating the .pro file for the QtMultimediaWidgets module...
Generating the Makefile for the QtMultimediaWidgets module...
Generating the C++ source for the QtNetwork module...
Generating the .pro file for the QtNetwork module...
Generating the Makefile for the QtNetwork module...
Generating the C++ source for the QtOpenGL module...
Generating the .pro file for the QtOpenGL module...
Generating the Makefile for the QtOpenGL module...
Generating the C++ source for the QtPrintSupport module...
Generating the .pro file for the QtPrintSupport module...
Generating the Makefile for the QtPrintSupport module...
Generating the C++ source for the QtQml module...
Generating the .pro file for the QtQml module...
Generating the Makefile for the QtQml module...
Generating the C++ source for the QtQuick module...
Generating the .pro file for the QtQuick module...
Generating the Makefile for the QtQuick module...
Generating the C++ source for the QtSql module...
Generating the .pro file for the QtSql module...
Generating the Makefile for the QtSql module...
Generating the C++ source for the QtSvg module...
Generating the .pro file for the QtSvg module...
Generating the Makefile for the QtSvg module...
Generating the C++ source for the QtTest module...
Generating the .pro file for the QtTest module...
Generating the Makefile for the QtTest module...
Generating the C++ source for the QtWebKit module...
Generating the .pro file for the QtWebKit module...
Generating the Makefile for the QtWebKit module...
Generating the C++ source for the QtWebKitWidgets module...
Generating the .pro file for the QtWebKitWidgets module...
Generating the Makefile for the QtWebKitWidgets module...
Generating the C++ source for the QtWidgets module...
Generating the .pro file for the QtWidgets module...
Generating the Makefile for the QtWidgets module...
Generating the C++ source for the QtXmlPatterns module...
Generating the .pro file for the QtXmlPatterns module...
Generating the Makefile for the QtXmlPatterns module...
Generating the C++ source for the QtDesigner module...
Generating the .pro file for the QtDesigner module...
Generating the Makefile for the QtDesigner module...
Generating the C++ source for the QAxContainer module...
Generating the .pro file for the QAxContainer module...
Generating the Makefile for the QAxContainer module...
Generating the C++ source for the _QOpenGLFunctions_2_0 module...
Generating the .pro file for the _QOpenGLFunctions_2_0 module...
Generating the Makefile for the _QOpenGLFunctions_2_0 module...
Generating the C++ source for the QtSensors module...
Generating the .pro file for the QtSensors module...
Generating the Makefile for the QtSensors module...
Generating the C++ source for the QtSerialPort module...
Generating the .pro file for the QtSerialPort module...
Generating the Makefile for the QtSerialPort module...
Generating the C++ source for the QtBluetooth module...
Generating the .pro file for the QtBluetooth module...
Generating the Makefile for the QtBluetooth module...
Generating the C++ source for the QtPositioning module...
Generating the .pro file for the QtPositioning module...
Generating the Makefile for the QtPositioning module...
Generating the C++ source for the QtWinExtras module...
Generating the .pro file for the QtWinExtras module...
Generating the Makefile for the QtWinExtras module...
Generating the C++ source for the QtQuickWidgets module...
Generating the .pro file for the QtQuickWidgets module...
Generating the Makefile for the QtQuickWidgets module...
Generating the C++ source for the QtWebSockets module...
Generating the .pro file for the QtWebSockets module...
Generating the Makefile for the QtWebSockets module...
Embedding sip flags...
Generating the C++ source for the Qt module...
Generating the .pro file for the Qt module...
Generating the Makefile for the Qt module...
Generating the .pro file for pylupdate5...
Generating the Makefile for pylupdate5...
Generating the .pro file for pyrcc5...
Generating the Makefile for pyrcc5...
Generating the pyuic5.bat wrapper...
Generating the Qt Designer plugin .pro file...
Generating the Qt Designer plugin Makefile...
Generating the qmlscene plugin .pro file...
Generating the qmlscene plugin Makefile...
Re-writing
D:\port\PyQt-5.3.1\examples\quick\tutorials\extending\chapter6-plugins\Charts\qm
ldir...
Generating the top-level .pro file...
Generating the top-level Makefile...

D:\port\PyQt-5.3.1>mingw32-make (10:05-11:05)
cd QtCore\ && ( if not exist Makefile D:\port\Qt5.3.1\5.3\mingw482_32\bin\qmake.
exe D:\port\PyQt-5.3.1\QtCore\QtCore.pro -o Makefile ) && mingw32-make -f Makefi
le
mingw32-make[1]: Entering directory 'D:/port/PyQt-5.3.1/QtCore'
mingw32-make -f Makefile.Release
mingw32-make[2]: Entering directory 'D:/port/PyQt-5.3.1/QtCore'
g++ -c -pipe -fno-keep-inline-dllexport -mstackrealign -fno-exceptions -O2 -Wall
 -Wextra -frtti -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_
CORE_LIB -I. -I"." -I"..\..\Python341-32\Include" -I"..\qpy\QtCore" -I"..\..\Qt5
.3.1\5.3\mingw482_32\include" -I"..\..\Qt5.3.1\5.3\mingw482_32\include\QtCore" -
I"release" -I"..\..\Qt5.3.1\5.3\mingw482_32\mkspecs\win32-g++" -o release\sipQtC
orecmodule.o sipQtCorecmodule.cpp
g++ -c -pipe -fno-keep-inline-dllexport -mstackrealign -fno-exceptions -O2 -Wall
 -Wextra -frtti -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_
CORE_LIB -I. -I"." -I"..\..\Python341-32\Include" -I"..\qpy\QtCore" -I"..\..\Qt5
.3.1\5.3\mingw482_32\include" -I"..\..\Qt5.3.1\5.3\mingw482_32\include\QtCore" -
I"release" -I"..\..\Qt5.3.1\5.3\mingw482_32\mkspecs\win32-g++" -o release\sipQtC
oreQAbstractAnimation.o sipQtCoreQAbstractAnimation.cpp
.
.
.
D:\port\Qt5.3.1\5.3\mingw482_32\bin\moc.exe -DUNICODE -DQT_NO_DEBUG -DQT_PLUGIN
-DQT_QML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -D__GNUC__ -DWIN32 -ID:
/port/Qt5.3.1/5.3/mingw482_32/mkspecs/win32-g++ -ID:/port/PyQt-5.3.1/qmlscene -I
D:/port/Python341-32/Include -ID:/port/Python341-32/Include -ID:/port/PyQt-5.3.1
/qmlscene -ID:/port/Qt5.3.1/5.3/mingw482_32/include -ID:/port/Qt5.3.1/5.3/mingw4
82_32/include/QtQml -ID:/port/Qt5.3.1/5.3/mingw482_32/include/QtNetwork -ID:/por
t/Qt5.3.1/5.3/mingw482_32/include/QtGui -ID:/port/Qt5.3.1/5.3/mingw482_32/includ
e/QtCore pluginloader.h -o release\moc_pluginloader.cpp
g++ -c -pipe -fno-keep-inline-dllexport -mstackrealign -O2 -Wall -Wextra -frtti
-fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QML_LIB -DQT_NET
WORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I"..\..\Python341-32\Include" -I"..\..\
Python341-32\Include" -I"." -I"..\..\Qt5.3.1\5.3\mingw482_32\include" -I"..\..\Q
t5.3.1\5.3\mingw482_32\include\QtQml" -I"..\..\Qt5.3.1\5.3\mingw482_32\include\Q
tNetwork" -I"..\..\Qt5.3.1\5.3\mingw482_32\include\QtGui" -I"..\..\Qt5.3.1\5.3\m
ingw482_32\include\QtCore" -I"release" -I"..\..\Qt5.3.1\5.3\mingw482_32\mkspecs\
win32-g++" -o release\moc_pluginloader.o release\moc_pluginloader.cpp
g++ -Wl,-s -shared -mthreads -Wl,--out-implib,release\libpyqt5qmlplugin.a -o rel
ease\pyqt5qmlplugin.dll release/pluginloader.o release/moc_pluginloader.o  -lglu
32 -lopengl32 -lgdi32 -luser32 -LD:\port\Python341-32\libs -lpython34 -LD:/port/
Qt5.3.1/5.3/mingw482_32/lib -lQt5Qml -lQt5Network -lQt5Gui -lQt5Core
mingw32-make[2]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene'
mingw32-make[1]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene'

D:\port\PyQt-5.3.1>mingw32-make install
cd QtCore\ && ( if not exist Makefile D:\port\Qt5.3.1\5.3\mingw482_32\bin\qmake.
exe D:\port\PyQt-5.3.1\QtCore\QtCore.pro -o Makefile ) && mingw32-make -f Makefi
le install
mingw32-make[1]: Entering directory 'D:/port/PyQt-5.3.1/QtCore'
mingw32-make -f Makefile.Release install
mingw32-make[2]: Entering directory 'D:/port/PyQt-5.3.1/QtCore'
copy /y D:\port\PyQt-5.3.1\QtCore\QtCore.pyd D:\port\Python341-32\Lib\site-packa
ges\PyQt5
        1 file(s) copied.
copy /y D:\port\PyQt-5.3.1\sip\QtCore\qabstractanimation.sip D:\port\Python341-3
2\sip\PyQt5\QtCore
        1 file(s) copied.
copy /y D:\port\PyQt-5.3.1\sip\QtCore\qabstracteventdispatcher.sip D:\port\Pytho
n341-32\sip\PyQt5\QtCore
        1 file(s) copied.
copy /y D:\port\PyQt-5.3.1\sip\QtCore\qabstractitemmodel.sip D:\port\Python341-3
2\sip\PyQt5\QtCore
        1 file(s) copied.
copy /y D:\port\PyQt-5.3.1\sip\QtCore\qabstractnativeeventfilter.sip D:\port\Pyt
hon341-32\sip\PyQt5\QtCore
.
.
.
cd qmlscene\ && ( if not exist Makefile D:\port\Qt5.3.1\5.3\mingw482_32\bin\qmak
e.exe D:\port\PyQt-5.3.1\qmlscene\qmlscene.pro -o Makefile ) && mingw32-make -f
Makefile install
mingw32-make[1]: Entering directory 'D:/port/PyQt-5.3.1/qmlscene'
mingw32-make -f Makefile.Release install
mingw32-make[2]: Entering directory 'D:/port/PyQt-5.3.1/qmlscene'
copy /y "release\pyqt5qmlplugin.dll" "D:\port\Qt5.3.1\5.3\mingw482_32\plugins\Py
Qt5\pyqt5qmlplugin.dll"
        1 file(s) copied.
mingw32-make[2]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene'
mingw32-make[1]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene'
copy /y D:\port\PyQt-5.3.1\__init__.py D:\port\Python341-32\Lib\site-packages\Py
Qt5
        1 file(s) copied.
xcopy /s /q /y /i D:\port\PyQt-5.3.1\pyuic\uic D:\port\Python341-32\Lib\site-pac
kages\PyQt5\uic
36 File(s) copied
copy /y D:\port\PyQt-5.3.1\pyuic5.bat D:\port\Python341-32
        1 file(s) copied.
strip D:\port\Python341-32\pyuic5.bat
strip:D:\port\Python341-32\pyuic5.bat: File format not recognized
Makefile:1980: recipe for target 'install_pyuic5' failed
mingw32-make: [install_pyuic5] Error 1 (ignored)

==>edit file D:\port\PyQt-5.3.1\Makefile
==>find “install_pyuic5”
==>remove line “-strip D:$(INSTALL_ROOT)\port\Python341-32\pyuic5.bat”
==>run again

.
.
.
mingw32-make[2]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene'
mingw32-make[1]: Leaving directory 'D:/port/PyQt-5.3.1/qmlscene'
copy /y D:\port\PyQt-5.3.1\__init__.py D:\port\Python341-32\Lib\site-packages\Py
Qt5
        1 file(s) copied.
xcopy /s /q /y /i D:\port\PyQt-5.3.1\pyuic\uic D:\port\Python341-32\Lib\site-pac
kages\PyQt5\uic
36 File(s) copied
copy /y D:\port\PyQt-5.3.1\pyuic5.bat D:\port\Python341-32
        1 file(s) copied.

D:\port\Qt5.3.1\5.3\Src\qtbase\src\plugins\sqldrivers\oci>mingw32-make
mingw32-make -f Makefile.Release all
mingw32-make[1]: Entering directory 'D:/port/Qt5.3.1/5.3/Src/qtbase/src/plugins/
sqldrivers/oci'
D:\port\Qt5.3.1\5.3\mingw482_32\bin\moc.exe -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT
_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -D
QT_CORE_LIB -D__GNUC__ -DWIN32 -ID:/port/Qt5.3.1/5.3/Src/qtbase/mkspecs/win32-g+
+ -ID:/port/Qt5.3.1/5.3/Src/qtbase/src/plugins/sqldrivers/oci -ID:/port/Qt5.3.1/
5.3/mingw482_32/include/QtSql/5.3.1 -ID:/port/Qt5.3.1/5.3/mingw482_32/include/Qt
Sql/5.3.1/QtSql -ID:/port/Qt5.3.1/5.3/mingw482_32/include -ID:/port/Qt5.3.1/5.3/
mingw482_32/include/QtSql -ID:/port/Qt5.3.1/5.3/mingw482_32/include/QtCore/5.3.1
 -ID:/port/Qt5.3.1/5.3/mingw482_32/include/QtCore/5.3.1/QtCore -ID:/port/Qt5.3.1
/5.3/mingw482_32/include/QtCore main.cpp -o .moc\release\main.moc
g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -W
all -Wextra -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCE
PTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -I"D:\port\Qt5.3
.1\5.3\mingw482_32\include\QtSql\5.3.1" -I"D:\port\Qt5.3.1\5.3\mingw482_32\inclu
de\QtSql\5.3.1\QtSql" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include" -I"D:\port\Qt5
.3.1\5.3\mingw482_32\include\QtSql" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include\Q
tCore\5.3.1" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include\QtCore\5.3.1\QtCore" -I"
D:\port\Qt5.3.1\5.3\mingw482_32\include\QtCore" -I".moc\release" -I"%INCLUDE%" -
I"D:\port\OracleIC-11.2.0.3.0\include" -I"..\..\..\..\mkspecs\win32-g++" -o .obj
\release\main.o main.cpp
.
.
.
g++ -c -pipe -fno-keep-inline-dllexport -g -std=c++0x -fno-exceptions -frtti -Wa
ll -Wextra -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEP
TIONS -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -I"D:\port\Qt5.3.1\5.3\mingw482
_32\include\QtSql\5.3.1" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include\QtSql\5.3.1\
QtSql" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include" -I"D:\port\Qt5.3.1\5.3\mingw4
82_32\include\QtSql" -I"D:\port\Qt5.3.1\5.3\mingw482_32\include\QtCore\5.3.1" -I
"D:\port\Qt5.3.1\5.3\mingw482_32\include\QtCore\5.3.1\QtCore" -I"D:\port\Qt5.3.1
\5.3\mingw482_32\include\QtCore" -I".moc\debug" -I"%INCLUDE%" -I"D:\port\OracleI
C-11.2.0.3.0\include" -I"..\..\..\..\mkspecs\win32-g++" -o .obj\debug\moc_qsql_o
ci_p.o .moc\debug\moc_qsql_oci_p.cpp
g++ -shared -Wl,--out-implib,D:\port\Qt5.3.1\5.3\Src\qtbase\plugins\sqldrivers\l
ibqsqlocid.a -o ..\..\..\..\plugins\sqldrivers\qsqlocid.dll .obj/debug/main.o .o
bj/debug/qsql_oci.o .obj/debug/moc_qsql_oci_p.o  -L%LIB% -LD:\port\OracleIC-11.2
.0.3.0\lib\msvc -loci -LD:/port/Qt5.3.1/5.3/mingw482_32/lib -lQt5Sqld -lQt5Cored

mingw32-make[1]: Leaving directory 'D:/port/Qt5.3.1/5.3/Src/qtbase/src/plugins/s
qldrivers/oci'

D:\port\Qt5.3.1\5.3\Src\qtbase\src\plugins\sqldrivers\oci>

==>copy qsqloci.dll D:\port\Qt5.3.1\5.3\Src\qtbase\plugins\sqldrivers to D:\port\Qt5.3.1\5.3\mingw482_32\plugins\sqldrivers

Change Archive Log Location to Only One Folder

My archived log are saved in different folders according to the save date; for example 2014_03_10, 2014_03_11 which contains all the archives saved on that day and so on. 

This is my log_archive_dest parameter,

SQL> show parameter log_archive_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest                     string
log_archive_dest_1                   string

SQL> SELECT DEST_NAME, DESTINATION FROM V$ARCHIVE_DEST WHERE STATUS='VALID';

DEST_NAME                DESTINATION
------------------------ -------------------------------------------
LOG_ARCHIVE_DEST_1       USE_DB_RECOVERY_FILE_DEST


SQL> show parameter db_recovery_file_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_
                                                 area


To change archived log save in one folder without separate it by day, we can change alter LOG_ARCHIVE_DEST_1

SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle/backups/fast_recovery_area' scope=both;

System altered.

Pandazen DB Backup Strategy with RMAN – EXPDP

  1. monthly
    rman db backup full
  2. weekly
    rman db backup incremental
    rman db crosscheck
    rman db delete obsolete, expired
  3. daily
    expdp db backup full
    expdp db backup metadata
  4. 4-hourly
    rman db backup archivelog
    rman db delete archivelog

RMAN – Difference Between Crosscheck Backup and Crosscheck Backupset

CROSSCHECK BACKUP;  # checks backup sets, proxy copies, and image copies
CROSSCHECK BACKUPSET; # crosschecks backupsets on disk and SBT

and

CROSSCHECK COPY;    	# crosschecks only disk copies of database files

RMAN-06207 and RMAN-06208 Delete Obsolete

RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy     15     13-FEB-14          /home/oracle/standby.ctl
Control File Copy     18     15-FEB-14          /home/oracle/stby.ctl
Control File Copy     19     15-FEB-14          /home/oracle/new.ctl
Control File Copy     21     15-FEB-14          /home/oracle/top.ctl
Control File Copy     23     15-FEB-14          /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f

Do you really want to delete the above objects (enter YES or NO)? yes

RMAN-06207: WARNING: 5 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212:   Object Type   Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Datafile Copy   /home/oracle/standby.ctl
RMAN-06214: Datafile Copy   /home/oracle/stby.ctl
RMAN-06214: Datafile Copy   /home/oracle/new.ctl
RMAN-06214: Datafile Copy   /home/oracle/top.ctl
RMAN-06214: Datafile Copy   /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f

This solution work for me,

RMAN> crosscheck copy;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1702 device type=DISK
specification does not match any datafile copy in the repository
validation failed for control file copy
control file copy file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f RECID=23 STAMP=839616673
validation failed for control file copy
control file copy file name=/home/oracle/top.ctl RECID=21 STAMP=839589691
validation failed for control file copy
control file copy file name=/home/oracle/new.ctl RECID=19 STAMP=839585230
validation failed for control file copy
control file copy file name=/home/oracle/stby.ctl RECID=18 STAMP=839584426
validation failed for control file copy
control file copy file name=/home/oracle/standby.ctl RECID=15 STAMP=839414702

RMAN> delete expired copy;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1702 device type=DISK
specification does not match any datafile copy in the repository
specification does not match any archived log in the repository
List of Control File Copies
===========================

Key     S Completion Time Ckp SCN    Ckp Time
------- - --------------- ---------- ---------------
23      X 15-FEB-14       69502411861 15-FEB-14
        Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f
        Tag: TAG20140215T185113

21      X 15-FEB-14       69502351103 15-FEB-14
        Name: /home/oracle/top.ctl
        Tag: TAG20140215T112131

19      X 15-FEB-14       69502304494 15-FEB-14
        Name: /home/oracle/new.ctl
        Tag: TAG20140215T100710

18      X 15-FEB-14       69502303165 15-FEB-14
        Name: /home/oracle/stby.ctl
        Tag: TAG20140215T095346

15      X 13-FEB-14       69426170931 13-FEB-14
        Name: /home/oracle/standby.ctl
        Tag: TAG20140213T104502


Do you really want to delete the above objects (enter YES or NO)? yes
deleted control file copy
control file copy file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f RECID=23 STAMP=839616673
deleted control file copy
control file copy file name=/home/oracle/top.ctl RECID=21 STAMP=839589691
deleted control file copy
control file copy file name=/home/oracle/new.ctl RECID=19 STAMP=839585230
deleted control file copy
control file copy file name=/home/oracle/stby.ctl RECID=18 STAMP=839584426
deleted control file copy
control file copy file name=/home/oracle/standby.ctl RECID=15 STAMP=839414702
Deleted 5 EXPIRED objects


RMAN>

RMAN – crosscheck archivelog – validation failed for archived log

Cause of this message is because archive log file destination was changed or someone deleted/moved the archive log files manually using OS commands.

Use “DELETE EXPIRED ARCHIVELOG ALL” will alleviate the VALIDATION FAILED messages.

RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;

How to connect Oracle using sqlplus without tnsnames.ora or DBLink

Just simple,

sqlplus "user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname_or_ipaddress)(PORT=port_number))(CONNECT_DATA=(SERVER=dedicated)(SID=remote_SID)))"

example,

sqlplus "pandazen/pandaworld@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.1.2)(PORT=1521))(CONNECT_DATA=(SERVER=dedicated)(SID=pandaserver)))"

Resizing Redo Log on Oracle 11g (No Archivelog Mode)

[root@mars ~]# su - oracle
[oracle@mars ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Feb 27 15:12:23 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 CURRENT
         2 INACTIVE
         3 INACTIVE

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 CURRENT
         2 INACTIVE
         3 INACTIVE

SQL> alter system switch logfile;

System altered.

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 INACTIVE
         2 INACTIVE
         3 CURRENT

SQL> alter system switch logfile;

System altered.

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 INACTIVE
         2 CURRENT
         3 INACTIVE

SQL> alter database drop logfile group 1;

Database altered.

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         2 CURRENT
         3 INACTIVE

SQL> ALTER DATABASE ADD LOGFILE GROUP 1 (
  2  '/u01/app/oracle/oradata/itcsyariah2/redo01a.log',
  3  '/data04/redolog/itcsyariah2/redo01b.log',
  4  '/backup/redolog/itcsyariah2/redo01c.log') SIZE 250M REUSE;

Database altered.

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 UNUSED
         2 CURRENT
         3 INACTIVE

SQL> alter system switch logfile;

System altered.

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 CURRENT
         2 INACTIVE
         3 INACTIVE

SQL> alter database drop logfile group 2;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE GROUP 2 (
  2  '/u01/app/oracle/oradata/itcsyariah2/redo02a.log',
  3  '/data04/redolog/itcsyariah2/redo02b.log',
  4  '/backup/redolog/itcsyariah2/redo02c.log') SIZE 250M REUSE;

Database altered.

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 CURRENT
         2 UNUSED
         3 INACTIVE

SQL> alter database drop logfile group 3;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE GROUP 3 (
  2  '/u01/app/oracle/oradata/itcsyariah2/redo03a.log',
  3  '/data04/redolog/itcsyariah2/redo03b.log',
  4  '/backup/redolog/itcsyariah2/redo03c.log') SIZE 250M REUSE;

Database altered.

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 CURRENT
         2 UNUSED
         3 UNUSED

SQL> alter system switch logfile;

System altered.

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 INACTIVE
         2 CURRENT
         3 UNUSED

SQL> alter system switch logfile;

System altered.

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 INACTIVE
         2 INACTIVE
         3 CURRENT

SQL> alter system switch logfile;

System altered.

SQL> select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 CURRENT
         2 INACTIVE
         3 INACTIVE

SQL>

How to Backup SPFILE

CMIIW ^_^

  1. using SQLPLUS (1)

    SQL> create pfile=’/u01/app/oracle/backups/pools/pfiles/pfilesqlplus20140226.ora’ from spfile;

    File created.

  2. using SQLPLUS (2)

    SQL> create pfile=’/u01/app/oracle/backups/pools/pfiles/pfilememory20140226.ora’ from memory;

    File created.

  3. using ASMCMD

    ASMCMD> cp +DATA/ITCAPPS2/spfileitcapps2.ora /u01/app/oracle/backups/pools/pfiles/pfileasmcmd20140226.ora
    copying +DATA/ITCAPPS2/spfileitcapps2.ora -> /u01/app/oracle/backups/pools/pfiles/pfileasmcmd20140226.ora

  4. using RMAN

    RMAN> backup spfile to destination=’/u01/app/oracle/backups/pools/pfiles/rman’;

    Starting backup at 26-FEB-14
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=1385 device type=DISK
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    including current SPFILE in backup set
    channel ORA_DISK_1: starting piece 1 at 26-FEB-14
    channel ORA_DISK_1: finished piece 1 at 26-FEB-14
    piece handle=/u01/app/oracle/backups/pools/pfiles/rman/ITCAPPS2/backupset/2014_02_26/o1_mf_nnsnf_TAG20140226T153522_9jv9tbqw_.bkp tag=TAG20140226T153522 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 26-FEB-14

ORA-01565: error in identifying file ‘?/dbs/spfile@.ora’

Usually I want to create pfile from spfile just run this command,

SQL> create pfile='/u01/app/oracle/backups/pools/pfiledb20120226.ora' from spfile;

File created.

But in ASM environment, the above command raises an error,

SQL> create pfile='/u01/app/oracle/backups/pools/pfileasm20120226.ora' from spfile;
create pfile='/u01/app/oracle/backups/pools/pfileasm20120226.ora' from spfile
*
ERROR at line 1:
ORA-01565: error in identifying file '?/dbs/spfile@.ora'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3


SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string

Solution I found after googling,

SQL> create pfile='/u01/app/oracle/backups/pools/pfileasm20120226.ora' from memory;

File created.

RMAN Script Example

/home/oracle/.bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs
export BASHDP='BASHRC'
#PATH=$PATH:$HOME/bin

#export PATH
umask 022
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db1
ORACLE_SID=itcsyariah2
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

/u01/app/oracle/backups/scrips/conf/bck.cfg

ORACLE_BASE=/u01/app/oracle

# how many days we want to keep backups on disk before RMAN deletes them
REDUNDANCY=2

# enable/disable automatic backup of spfile and controlfile
CONTROLFILE_AUTOBACKUP="ON"

# string with the destination of the automatic backup of the spfile and controlfile
CONTROLFILE_AUTOBACKUP_FORMAT="$ORACLE_BASE/backups/controlspfile/%F"

# Define parallelism degree by an integer (only usable on Enterprise Edition),
PARALLELISM=2
# and if the backupset is going to be compressed.
BACKUPSET_TYPE="COMPRESSED BACKUPSET"

# Set the destination of the snapshot control file to be kept on the backups.
SNAPSHOT_CONTROLFILE="$ORACLE_BASE/backups/controlspfile/snapcf_itcsyariah2.f"

DATAFILES_DEST="$ORACLE_BASE/backups/datafiles/%d_%T_s%s_s%p"
ARCHIVELOGS_DEST="$ORACLE_BASE/backups/archivelogs/%d_%T_s%s_s%p"

/u01/app/oracle/backups/scrips/bck.sh

#!/bin/bash

source ~/.bash_profile # $ORACLE_HOME and $ORACLE_SID should be exported here

source $ORACLE_BASE/backups/scripts/conf/bck.cfg

usage() {
echo `basename $0`: ERROR: $* 1>&2
echo usage: `basename $0` '[-[a(rchive log only) f(full)]]' 1>&2
exit 1
}

case "$1" in
-a) BACKUP_TYPE="archivelog all format '$ARCHIVELOGS_DEST' delete input";;
-f) BACKUP_TYPE="database plus archivelog";;
*) usage ;;
esac

rman target / nocatalog <<EOF
# how many days we want to keep backups on disk before RMAN deletes them
CONFIGURE RETENTION POLICY TO REDUNDANCY $REDUNDANCY;

# enable/disable automatic backup of spfile and controlfile
CONFIGURE CONTROLFILE AUTOBACKUP $CONTROLFILE_AUTOBACKUP;

# string with the destination of the automatic backup of the spfile and controlfile
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$CONTROLFILE_AUTOBACKUP_FORMAT';

# Define parallelism degree by an integer (only usable on Enterprise Edition), and if the backupset is going to be compressed.
CONFIGURE DEVICE TYPE DISK PARALLELISM $PARALLELISM BACKUP TYPE TO $BACKUPSET_TYPE;

# Set the destination of the snapshot control file to be kept on the backups.
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '$SNAPSHOT_CONTROLFILE';

backup $BACKUP_TYPE;
exit;
EOF

exit

VGS-1313: Font lookup failed

I open a LOGIN.fmb with Oracle Form Builder – Layout Editor on Centos 6.4, then the pop-up display this error, VGS-1313: Font lookup failed. To solve this proble, I tried the steps as below :

===check list font installed
$ fc-list | wc -l
===65, no problem, but the form use Microsoft True Type

===after gooogling, Installing Microsoft TrueType fonts on Linux
===Install RPM: rpm -ivh cabextract-0.6-1.i386.rpm
===Download: msttcorefonts-1.3-4.spec
===Create RPM: rpmbuild -bb msttcorefonts-1.3-4.spec
===(This downloads Microsoft CAB files and extracts the fonts and builds an RPM. Uses wget, rpm-build, chkfontpath, fc-cache, ttmkfdir)
===This creates /usr/src/redhat/RPMS/noarch/msttcorefonts-1.3-4.noarch.rpm

The error still exist, then I execute
===yum install xorg-x11-fonts-base liberation-fonts (http://www.howtoforge.com/installing-an-oracle-ready-centos-6.2-server)

===Successfully eliminate the problem

Useful Oracle Data Dictionary Views

select * from v$pwfile_users

USERNAME                       SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS                            TRUE  TRUE  FALSE
WI                             TRUE  FALSE FALSE

Export Missing Table on Oracle 11g

I try to export all schema of IPOINT, export succesfully without warning but the table with empty row not exported on Oracle 11g.

using this command :

exp ipoint/xxx file=c:\ipt%date:~4,2%%date:~7,2%%date:~12,2%.dmp log=c:\log\ipt%date:~4,2%%date:~7,2%%date:~12,2%.log

Actually, the solution is simple, we need to do one of the following step

  1.  just insert 1 row in the empty table so it can be exported
  2. update parameter DEFERRED_SEGMENT_CREATION, set to FALSE and then the empty table must be recreated
  3. use expdp

expdp userid=ipoint schemas=ipoint dumpfile=ipt130723.dmp logfile=ipt130723.log directory=DATAPUMPDIR

ALTER USER IPOINT QUOTA UNLIMITED ON USERS;
CREATE DIRECTORY DATAPUMPDIR AS ‘C:\DATAPUMPDIR’;
GRANT READ, WRITE ON DIRECTORY DATAPUMPDIR TO IPOINT;

DBMS_FGA

To add audit policy
BEGIN
DBMS_FGA.add_policy(
object_schema => ‘MIS’,
object_name => ‘TRD_STATEMENTS_POS’,
policy_name => ‘POS_AUDIT’,
audit_condition => NULL, — Equivalent to TRUE
audit_column => ‘AGREEMENT_NO’,
statement_types => ‘SELECT,INSERT,UPDATE,DELETE’);
END;

To drop audit policy
BEGIN
DBMS_FGA.drop_policy(
object_schema => ‘MIS’,
object_name => ‘TRD_STATEMENTS_POS’,
policy_name => ‘POS_AUDIT’);
END;

How to Change Google Drive Language – Desktop Application

1. Open your control panel
2. Go to System and Security
3. Click on System
4. Open Advanced system settings (in the left panel)
5. Click on Environment Variables
6. Click either the top (user) or bottom (system) New… button.
7. For Variable name input LANG and for Variable value enter en_US.

Quit and restart Google Drive.

Oracle User Locked(Timed)

Why Oracle user get locked(timed) ? I had change profile : PASSWORD_LIFE_TIME, PASSWORD_LOCK_TIME, PASSWORD_GRACE_TIME to UNLIMITED, but it doesn’t work.

Then I run audit trail :

  1. alter system set audit_trail=db scope=spfile; (then restart db)
  2. audit connect whenever not successful;
  3. monitoring via this query : 

    SELECT *
    FROM dba_audit_session
    WHERE action_name = ‘LOGON’ AND returncode > 0
    ORDER BY timestamp DESC;

  4. then login fail and then locked because the user password case-sensitive, so I run : alter system set sec_case_sensitive_logon=false;
  5. done ^_^

 

Oracle RMAN Backup Script In Oracle Linux

This is rman.sh

ORACLE_SID=ITCAPPS; export ORACLE_SID
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
rman target / log=/home/oracle/rman.log &lt;&lt; EOF
crosscheck backup;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt expired archivelog all;
sql 'alter system switch logfile';
backup database format '/disk1/backup/full_%U.bkp';
delete noprompt obsolete;
EOF

And this is RMAN configuration,

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ITCAPPS are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/disk1/backup/controlfile_autobackup_%F.bkp';
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_ITCAPPS.f'; # default

Oracle Database in Oracle Linux Cannot Start / Open

Today I mess around with the Oracle database that can not start and open. I get some error messages from various places such as alert.log, sqlplus, rman.

These errors are,

ORA-03110: end-of-file on communication channel
ORA-03135: connection lost contact
ORA-00845: MEMORY_TARGET not supported on this system
ORA-16038: log 3 sequence# 400 cannot be archived
ORA-19502: write error on file "", block number  (block size=)
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/ITCAPPS/redo03.log'
ORA-19816: WARNING: Files may exist in db_recovery_file_dest that are not known to database.
ORA-00257: archiver error. Connect internal only, until freed.

I have do this step :
1. replace the  current spfile with the old one
2. startup with pfile
3. restore and recover database using rman

But that no help at all.

And the real solution is to enlarge the capacity of the folder where the archivelog is

Oracle Parameter optimizer_index_cost_adj Performance

From Oracle Documentation,

Default value 100
Modifiable ALTER SESSION, ALTER SYSTEM
Range of values 1 to 10000

OPTIMIZER_INDEX_COST_ADJ lets you tune optimizer behavior for access path selection to be more or less index friendly—that is, to make the optimizer more or less prone to selecting an index access path over a full table scan.

The default for this parameter is 100 percent, at which the optimizer evaluates index access paths at the regular cost. Any other value makes the optimizer evaluate the access path at that percentage of the regular cost. For example, a setting of 50 makes the index access path look half as expensive as normal.

The default value 100 and 0 for OPTIMIZER_INDEX_COST_ADJ and OPTIMIZER_INDEX_CACHING respectively are set for Data Warehouse System.

For OLTP system, setting 10 to OPTIMIZER_INDEX_COST_ADJ and 90 to OPTIMIZER_INDEX_CACHING will perform good result.