Oracle, Web, Script, SQLserver, Tips & Trick

July 6, 2018

PL/SQL: Sleep without using DBMS_LOCK

Filed under: Uncategorized — sikathabis @ 11:50 am

Oracle Deli

If you want to wait in your PL/SQL program (“sleep”) you may want to use the procedure “SLEEP” from the package “DBMS_LOCK“. While this function does exactly what you want, your DBA may not grant you access to this package, because it contains some other mighty and dangerous procedures.

But there is help! Here are some valid alternatives:

Option 1: APEX_UTIL.sleep

If APEX is installed you can use the procedure “PAUSE” from the publicly available package APEX_UTIL.

Example – “Wait 5 seconds”:

SET SERVEROUTPUT ON ;
BEGIN
    DBMS_OUTPUT.PUT_LINE('Start ' || to_char(SYSDATE, 'YYYY-MM-DD HH24:MI:SS'));
    APEX_UTIL.PAUSE(5);
    DBMS_OUTPUT.PUT_LINE('End   ' || to_char(SYSDATE, 'YYYY-MM-DD HH24:MI:SS'));
END;
/

Option 2: java.lang.Thread.sleep

An other option is the use of the method “sleep” from the Java class “Thread”, which you can easily use through providing a simple PL/SQL wrapper procedure:

CREATE OR REPLACE PROCEDURE SLEEP

View original post 48 more words

Advertisements

February 2, 2018

How to fix Cannot load OCI DLL: D:\oracle\instantclient_10_2\oci.dll

Filed under: oracle,toad — sikathabis @ 7:34 am
Tags: , ,

We have Oracle database 11.2.0.4 (red hat linux 64bit) and the client connect from Windows 10 64bit

Firstable, on the client we are using Oracle client 10.2.0.5 32 bit and setting ORACLE_HOME by environment variables using this tutorial:
https://sikathabis.wordpress.com/2013/09/12/menjalankan-toad-dengan-oracle-client-basic-lite-for-windows/

But we have a problem, the toad cannot find the setting ORACLE_HOME, after we searching how to fix it, then we set the ORACLE_HOME on the regedit:
Clipboard03
Second problem is show message “Cannot load OCI DLL: d:\oracle\instantclient_10_2\oci.dll” and then try to fix it by using Oracle Instant Client 32bit with same version Oracle Database 11.2.0.4, and …… the toad connected from windows 10

December 16, 2017

How to convert xml into text file [python]

Filed under: phyton — sikathabis @ 10:51 am
Tags: , ,

import xml.etree.ElementTree as ET
tree = ET.parse(‘test.xml’)
notags = ET.tostring(tree.getroot(), encoding=’utf-8′,method=’text’)
f = open(‘test.txt’,’w’)
f.write(notags)
f.close()

reference : link1 | link2

November 18, 2017

How to Install DosBox with QBASIC

Filed under: dos,qbasic — sikathabis @ 10:35 pm
Tags: , , ,
  1. First you must download dosbox on this link
    https://www.dosbox.com/download.php?main=1
    If your Operating System (OS) Windows choose Windows, if your OS Mac OS X
  2. Download QBASIC on this link http://www.qbasic.net/en/qbasic-downloads/compiler/qbasic-interpreter.htm
  3. Extract zip file from point 2 to new folder example c:\oldDos\qbasic
  4. Run DosBox , shortcut on the Desktop or programs Clipboard01
  5. Type mount C c:\oldDos
  6. Type c:\
  7. Type CD\qbasic
  8. Type Qbasic, now you can use Qbasic

 

October 7, 2017

Auto-backups of PLSQL source

Filed under: Uncategorized — sikathabis @ 4:11 pm

Auto backups of plsql source

Learning is not a spectator sport

I saw this on an ideas forum today

image

and whilst most people would take care of this with a source code control system, its also true that people might do several compilations / tests with their PLSQL source before checking it in officially to their source repository.

So the idea has some merit… and maybe we can roll our own without too much fuss. I make no claims that this is a ‘complete’ solution, but it should get you going Smile

 SQL> set timing off SQL> drop trigger plsql_trigger; Trigger dropped. SQL> SQL> drop table plsql_params purge; Table dropped. SQL> drop table plsql_history cascade constraints purge; Table dropped. SQL> drop table plsql_history_source cascade constraints purge; Table dropped. SQL> drop table plsql_log cascade constraints purge; Table dropped. SQL> SQL> SQL> create table plsql_params 2 as select 3 versions_kept from dual; Table created. SQL> SQL> create table plsql_history ( 2 TSTAMP TIMESTAMP 3…

View original post 604 more words

September 14, 2017

How to connect oracle 12c from toad 9.7

Filed under: oracle,oracle:12c,toad — sikathabis @ 3:34 am
Tags: , ,

You must have Oracle Client 10g and then replace 12c
https://sikathabis.wordpress.com/2013/09/12/menjalankan-toad-dengan-oracle-client-basic-lite-for-windows/

Example
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.111)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orclpdb)))

September 7, 2017

Example how to use expdp

Filed under: dos,oracle,oracle:10g — sikathabis @ 7:07 am

example

set ORACLE_SID=VBSUPG

expdp user/user FULL=y COMPRESS=N DUMPFILE=DMP:USER%U.dmp FILESIZE=2G PARALLEL=4 LOGFILE=DMP:expuser.log JOB_NAME=expuser

March 31, 2017

How to fix Error on Birt org.xml.sax.SAXParseException: Premature end of file

Filed under: java,web — sikathabis @ 7:49 am
Tags: , , , , ,

on line 666 remark requestHeaders.push(‘Content-type’,’application/x-www-form-urlencoded’);

Example:
setRequestHeaders: function() {
var requestHeaders =
[‘X-Requested-With’, ‘XMLHttpRequest’,
‘X-Prototype-Version’, Prototype.Version];
if (this.options.method == ‘post’) {
/* biang kerok you must remark this
requestHeaders.push(‘Content-type’,
‘application/x-www-form-urlencoded’);
*/

Reference: http://developer.actuate.com/community/forum/index.php?/topic/28492-errors-from-birt-report-viewer-on-chrome-and-safari/
Reason: https://bugs.eclipse.org/bugs/show_bug.cgi?id=310512#c6

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)

October 3, 2016

Windows 10 start menu doesn’t appear | start menu won’t show | start menu tidak muncul

Filed under: Uncategorized — sikathabis @ 9:32 am
Tags: , , ,

Permasalahan:

Windows 10 start menu doesn’t appear

Windows 10 start menu won’t show

Windows 10 start menu tidak muncul

Solusi:

  • Buka Regedit.exe
  • Klik kanan pada HKEY_Users / HKEY_CLASSES_ROOT / HKEY_LOCAL_MACHINE dan click permissions (jalankan di masing-masing HKEY)
  • Pastikan ALL APPLICATION PACKAGES allow read, jika ALL APPLICATION PACKAGES belum ada, maka tambahkan dengan cara:
    1. Click Add
    2. Click Advanced
    3. Click Find Now
    4. Pilih ALL APPLICATION PACKAGES
    5. Click Ok, Click Ok
    6. Lalu Check list Read pada ALL APPLICATION PACKAGES
    7. Click Ok

Referensi: https://support.microsoft.com/en-us/kb/2798317

 

Next Page »

Blog at WordPress.com.

Pureblood

DONT WANNA BE NUMBER ONE

Learning is not a spectator sport

Connor McDonald's Oracle blog

Teknologi Pendidikan

Just another WordPress.com weblog

KATAKAMI

Jurnalisme Yang Dapat Dipercaya

Tonk Kosonk Baonk Bunyinya

Penampungan Serapah Tanpa Sumpah

Qey050489's Blog

Ayo Bangkit sobat..!!!!!

B. S. Totoraharjo

Orang Desa Yang Mencintai Desa dan Kebudayaannya

culturekitchen foodlab

New Food and Art in Yogyakarta

Wahyu Catur Wibowo

Musafir Dunia Maya

SQL.... Still Learning

My Reference on SQL Server

arihdyacaesar

"Tuhan tidak menuntut kita untuk menang. Tuhan hanya meminta kita untuk berjuang tanpa henti.” -ean-

neinframe

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

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