Oracle, Web, Script, SQLserver, Tips & Trick

December 2, 2016

How to get http from cmd (dev 6i)

Filed under: dev6i,dos,oracle,windows — sikathabis @ 8:05 pm
Tags: , , , ,

I have an application using oracle developer 6i (dev 6i). The application must communicate with the website to get the result. For example: If the application click the button then will access http: // localhost /show, and then the result “It works” showing to the application

I found winhttpjs.bat ( https://github.com/npocmaka/batch.scripts/blob/master/hybrids/jscript/winhttpjs.bat )

CMD> call winhttpjs.bat http://localhost/show -saveTo result.txt

If the result

CMD> Status: 200 OK

then file result.txt contained the result of website It work’s

If the result

CMD>  A connection with the server could not be established

then file result.txt contained The system cannot find the file specified.

To get the result for dev6i I’m using HOST to get the result and TEXT_IO for retrive text file (result.txt)

Download ~ winhttpjs-bat (erase .doc)

June 9, 2016

Print using default printer on local computer (Oracle Developer 6i, windows)

Filed under: dev6i,oracle,windows — sikathabis @ 7:29 am
Tags: , , , , ,

this example, I want to show you how to automate print using default printer on local computer.

PROCEDURE GENERATE_VALIDATION (ID1 number, ID2 number, ID3 DATE) IS
    PL_ID PARAMLIST;
    filename varchar2(255);
    teks varchar2(255);
    IN_FILE TEXT_IO.FILE_TYPE;
BEGIN
    pl_id := Create_Parameter_List('TEMP'); 
    ADD_PARAMETER(PL_ID,'ID_1',TEXT_PARAMETER,ID1);
    ADD_PARAMETER(PL_ID,'ID_2',TEXT_PARAMETER,ID2);
    ADD_PARAMETER(PL_ID,'ID_3',TEXT_PARAMETER,ID3);
--this statement for get default printer and generate to text file
    host('CMD /C wmic printer where default=''TRUE'' get name > '||filename,NO_SCREEN);
--because wmic generate 3 lines, this statement for get only line where the 
--default printer located

    host('CMD /C Powershell "Get-Content '||filename||' | Select-Object -Index 1" > '||filename||'.txt', NO_SCREEN );
    begin
        IN_FILE  := TEXT_IO.FOPEN(filename||'.txt', 'r');   
        TEXT_IO.GET_LINE(IN_FILE,TEKS);
        --Trim TEKS, because there is spaces after default printer name
        TEKS := LTRIM(RTRIM(TEKS));
        TEXT_IO.FCLOSE(IN_FILE);
    exception when others then
        TEXT_IO.FCLOSE(IN_FILE);
    end;  

--erase temporary files

    host('CMD /R DEL '||filename||'.*',NO_SCREEN);    

--if there's default printer then automate print default printer on local computer

    if TEKS is null then
         ADD_PARAMETER(PL_ID,'DESTYPE',TEXT_PARAMETER,'PRINTER');
         ADD_PARAMETER(PL_ID,'DESNAME',TEXT_PARAMETER,TEKS);
--if there's no default printer then show your report
    else
         ADD_PARAMETER(PL_ID,'DESTYPE',TEXT_PARAMETER,'SCREEN');
    end if;     
    Add_Parameter(pl_id,'PARAMFORM', TEXT_PARAMETER, 'NO');
    Add_Parameter(pl_id,'PRINTJOB',  TEXT_PARAMETER,'YES'); 

    Run_Product(REPORTS,'VALIDATION', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);     
    Destroy_Parameter_List(pl_id);
END;

Reference: https://technet.microsoft.com/en-us/library/hh849895.aspx | https://adamstech.wordpress.com/2010/11/1 | http://stackoverflow.com/questions/17217476..

Notes: For windows XP/2003 you must install powershell, here’s the links:

  1. Microsoft .NET Framework 2.0 Service Pack 1 (x86)
  2. Update for Windows XP (KB968930): includes Windows PowerShell 2.0 and Windows Remote Management (WinRM) 2.0
  3. Update for Windows 2003

 

August 10, 2015

How to hide password login to oracle in CMD

Filed under: linux,oracle,windows — sikathabis @ 10:14 am
Tags: , ,

I have application for backup database, in the application I’ve created, can generate user password, without other user know what the password is. Other user use that application which can see the content of .bat file where my application whom creating that file, the trouble is, other user can see password from login “user/password@tnsnames” . There are many solution to hide the password from Mbah Google, but there’s one reference very usefull

http://stackoverflow.com/questions/17807188/how-to-authenticate-oracle-login-using-encrypted-password (first comment)

example: echo generatepassword | exp username@tnsnames file=backup.dmp owner=scott

“Echo generatepassword |” is created on the application, and “exp username@tnsnames file=backup.dmp owner=scott” is .bat file which can other user see or using it.

August 5, 2014

Oracle Developer 10g troubleshoot Installation (Windows 7)

Filed under: oracle,oracle:10g,windows — sikathabis @ 8:19 pm
Tags: , ,
Clipboard02

If error message show like this then

automatically manage custom size

Advanced System Settings – Advanced – Settings – Advanced – Change uncheck automatically manage – choose and fill the custom size

Reference : http://oracleplatform.blogspot.com/2008/02/oracle-developer-suite-10g-quick.html

January 7, 2014

Route add untuk koneksi berbarengan internet dan jaringan lokal (windows)

Filed under: network,windows — sikathabis @ 12:45 pm
Tags: , ,
Contoh:
IP Jaringan 172.16.15.111 netmask 255.255.255.249 gateway 172.16.15.1
IP Internet 192.168.1.111 netmask 255.255.255.0 gateway 192.168.1.1
Jalankan
  1. CMD
  2. route add 0.0.0.0 mask 255.255.255.0 192.168.1.1
  3. route add 172.16.15.0 mask 255.255.255.249 172.16.15.1

December 23, 2013

How to kill oracle.exe on windows

Filed under: oracle,windows — sikathabis @ 7:06 am
Tags: , ,

Use tasklist to show all process on windows

Then taskkill to kill pid, for example:

kill process oracle.exe

reference : http://www.dba-oracle.com/t_kill_process_windows.htm

May 18, 2013

Solution for cannot acces help on dev 6i using windows 7 x64

Filed under: dev6i,oracle,windows — sikathabis @ 7:44 am
Tags: , , ,

Solution for “cannot acces help on dev 6i / oracle developer 6i using windows 7 x64”

Because windows 7 x64 doesn’t containt WinHlp32.exe,  then you must have the file.

Use this link to get them

http://www.ziddu.com/download/22213893/Windows6.1-KB917607-x86.zip.html

http://www.ziddu.com/download/22213894/Windows6.1-KB917607-x64.zip.html

http://www.softpedia.com/get/System/OS-Enhancements/WinHlp-for-Windows7.shtml

 

 

March 17, 2013

How to disable complexity password on windows server

Filed under: server,windows — sikathabis @ 12:04 pm
Tags: ,

Run GPEDIT.MSC, choose Computer configuration – Windows settings – Security settings – Account policies – Password policy … change from enabled to disabled

forcepassword

October 9, 2012

How to Attach .reg file on x64 bit windows OS

Filed under: windows — sikathabis @ 8:32 am
Tags:

Run for example :

%systemroot%\syswow64\regedit filename.reg

source

December 16, 2011

How to start Enterprise manager console

Filed under: oracle,windows — sikathabis @ 4:38 am
Tags: ,

Windows

if ORACLE_SID is null then set ORACLE_SID with ORACLE_HOME directory, example

open CMD and then type SET ORACLE_SID=ORA92

emctl start dbconsole

 

Next Page »

Create a free website or blog at WordPress.com.

Teknologi Pendidikan

Just another WordPress.com weblog

KATAKAMI

Jurnalisme Yang Dapat Dipercaya

Qey050489's Blog

Ayo Bangkit sobat..!!!!!

B. S. Totoraharjo

Orang Bodoh Yang Tak Kunjung Pandai

culturekitchen foodlab

New Food and Art in Yogyakarta

Wahyu Catur Wibowo

Musafir Dunia Maya

SQL.... Still Learning

My Reference on SQL Server

arihdyacaesar

"A distance is getting far if your heart is impatient" -ean-

neinframe

Street Photography is like a box of a chocolates, you're never know what you're gonna get - Thomas Leuthard -

Keluarga Andrivito

-- Andrivito's Journal --

DRK™

This site is about Latest NEWS, Articles, Videos, Books, Course, Presentations, Tips & Tricks related to I.T Pro's

Gaurav Saxena

|| तत् त्वम् असि ||

Be a good Moeslim

Menuju Pribadi Muslim Sejati yang Bertaqwa

TuanSUFI

Manajemen Sholat, renungan spiritual, Teknologi Informasi

Pelangi di khatulistiwa....

Mari berbagi kebaikan, pengalaman dan senyum denganku

Angkasa13

Ceritanya saya, Pikirannya saya, Hatinya saya

sikathabis

sikathabis semua informasi disini

Don Charisma

because anything is possible with Charisma