Useful shortcuts for vi editor

Showing posts with label bat. Show all posts
Showing posts with label bat. Show all posts

Sunday, 6 May 2018

How to backup database in XE?

It is very simple to backup your database in Oracle XE with already prepared .bat file quickly.

Steps;
Press Windows Key -> Type "Backup Database" -> Click "Backup Database" link -> .bat file "Backup.bat" runs -> Follow the steps -> Done

Finally, check the backup path;
...\oracle\fast_recovery_area\XE

Tuesday, 11 April 2017

How to get value from xml node?

e.g. xml file:
<A>
<B value="Alper XML">
<C value="Alper XML 2">
</C>
</B>
</A>

catch the value:
@echo off
for /F tokens^=1^,2^delims^=^"^= %%a in (example.xml) do (
if "%%a" equ "<B value" (
rem %%a first column, %%b second column
echo example value: %%b
)
)
)
pause

output:
example value: Alper XML

Saturday, 24 October 2015

How to prevent auto-closing for CMD ?

To do that, you may add "pause" command into your .bat file as you wish.

Example;

sc config OracleServiceXE start= auto
sc start OracleServiceXE
sc config OracleXETNSListener start= auto
sc start OracleXETNSListener
rem stop cmd
pause