Saturday, September 24, 2011

Tugas array pada C

TUGAS
ARRAY dan FUNGSI
1.    Matriks 3 X 3
#include <stdio.h>
#include <conio.h>
main()
{
      int matriks[3][3];
      int A,B,C,i,j;
      A=3;
      B=3;
      for(i=0;i<A;i++)
         {
         for(j=0;j<B;j++)
         {
      printf("Matriks [%d,%d] : ",i+1,j+1);
      scanf("%d",&matriks[i][j]);}}
      printf("\n");
      C = 2 * A + 3 * B;
      printf("C = 2 * A + 3 * B = %d\n\n",C = 2 * A + 3 * B);     
      printf("Matriks = \n\n");
      for(i=0;i<A;i++)
         {
               for(j=0;j<B;j++)
         {
      printf("%3d",matriks[i][j]);
         }
            printf("\n");
         }
      getch ();
      return 0;
}

Tugas C++


TUGAS 1
1.    Menjumlahkan 2 buah bilangan dan mencetak hasilnya
#include<iostream.h>
#include<conio.h>
     main()
{
     clrscr ();
     int nilai1, nilai2, tambah;
     cout<<”masukan nilai 1 :  “ ;
     cin>>nilai1 ;
     cout<<”masukan nilai 2 : “ ;
     cin>>nilai2 ;
     tambah= nilai1 + nilai2 ;
     cout<<”hasil penjumlahan : “ << tambah << endl ;
     getch () ;
}

2.    Mengalikan 2 buah bilangan dan mencetak hasilnya
#include<iostream.h>
#include<conio.h>
     main()
{
     clrscr ();
     int bil1, bil2, kali ;
     cout<<”masukan bilangan 1 :  “ ;
     cin>>bil1 ;
     cout<<”masukan bilangan 2 : “ ;
     cin>>bil2 ;
     tambah= bil1* bil2 ;
     cout<<”hasil penjumlahan : “ << kali << endl ;
     getch () ;
}

Database schema hotel


       Schema hotel
       SQL>CREATE USER HOTEL IDENTIFIED BY HOTEL
          DEFAULT TABLESPACE USERS
          QUOTA UNLIMITED ON USERS;

SQL>GRANT DBA TO HOTEL;


SQL>CONNECT HOTEL/HOTEL;

SQL>CREATE TABLE HOTEL
(
HOTELNO   NUMBER(7),
HOTELNAME                    VARCHAR2(50),
CITY                                       VARCHAR2(50)
);

SQL>CREATE TABLE ROOM
(
ROOMNO                           NUMBER(7),
HOTELNO                           NUMBER(7),
TYPE                                      NUMBER(7),
PRICE                                   NUMBER(7)
);

SQL>CREATE TABLE BOOKING
(
HOTELNO                           NUMBER(7),
GUESTNO                           NUMBER(7),
DATEFROM                       DATE,
DATETO                               DATE,
ROOMNO                           NUMBER(7)
);

SQL>CREATE TABLE GUEST
 (
GUESTNO                           NUMBER(7),
GUESTNAME                    VARCHAR2(50),
GUESTADDRESS             VARCHAR2(50)                  
);

Array pada pascal

contoh program array pada pascal :

program contoh_konstan_array_char_;
uses wincrt;
var
   nilai_akhir : INTEGER;
   nilai_kehadiran,nilai_UTS,nilai_Tugas,nilai_UAS : ARRAY[1..4] OF integer;
   A,B,C,D = real;
begin
    nilai_kehadiran [1] := 50;
    nilai_UTS       [2] := 60;
    nilai_Tugas     [3] := 50;
    nilai_UAS       [4] := 60;
    begin

Wednesday, September 21, 2011

Merubah User LOGIN EBIS

[vismgr@obasvr01 ~]$ FNDCPASS apps/apps 0 y system/manager user sysadmin welcome

APPS
username : apps
password : apps

DATABASE
username : system
password : manager

User LOGIN EBIS
username : sysadmin
password : welcome

Wednesday, August 24, 2011

How to recompile the JSP manually


You can always use the this option to compile JSP's manually at any time.

Connect application tier using applmgr user and source the environment by running the script:

/oracle/apps/apps_st/appl/APPSSID_host.env

Run the commands
cd $FND_TOP/patch/115/bin
perl ojspCompile.pl --compile --flush -p 2

Restart the Middle Tier services.
  

Friday, August 12, 2011

Autoconfig EBS R12

login as: applmgr
applmgr@192.168.2.11's password:
Last login: Wed Aug 10 10:09:31 2011 from 192.168.2.205
[applmgr@orasvr01 ~]$ ps -ef | grep ora_
applmgr  19502     1  0 Aug10 ?        00:00:07 ora_pmon_VIS
applmgr  19504     1  0 Aug10 ?        00:00:00 ora_vktm_VIS
applmgr  19508     1  0 Aug10 ?        00:00:00 ora_diag_VIS
applmgr  19510     1  0 Aug10 ?        00:00:00 ora_dbrm_VIS
applmgr  19512     1  0 Aug10 ?        00:00:01 ora_psp0_VIS
applmgr  19514     1  0 Aug10 ?        00:02:11 ora_dia0_VIS
applmgr  19516     1  0 Aug10 ?        00:00:00 ora_mman_VIS
applmgr  19518     1  0 Aug10 ?        00:00:04 ora_dbw0_VIS
applmgr  19520     1  0 Aug10 ?        00:00:07 ora_lgwr_VIS
applmgr  19522     1  0 Aug10 ?        00:00:05 ora_ckpt_VIS
applmgr  19524     1  0 Aug10 ?        00:00:22 ora_smon_VIS
applmgr  19526     1  0 Aug10 ?        00:00:00 ora_reco_VIS
applmgr  19528     1  0 Aug10 ?        00:00:26 ora_mmon_VIS
applmgr  19530     1  0 Aug10 ?        00:00:17 ora_mmnl_VIS
applmgr  19538     1  0 Aug10 ?        00:00:00 ora_fbda_VIS
applmgr  19542     1  0 Aug10 ?        00:00:00 ora_qmnc_VIS
applmgr  19563     1  0 Aug10 ?        00:00:00 ora_q001_VIS
applmgr  19565     1  0 Aug10 ?        00:00:01 ora_q002_VIS
applmgr  19620     1  0 21:04 ?        00:00:00 ora_w000_VIS
applmgr  19745 19722  0 21:14 pts/2    00:00:00 grep ora_
applmgr  20695     1  0 Aug10 ?        00:00:29 ora_cjq0_VIS
applmgr  20762     1  0 Aug10 ?        00:00:00 ora_smco_VIS
[applmgr@orasvr01 ~]$ more startVIS.sh
cd /u02/oracle/VIS/db/tech_st/11.1.0/appsutil/scripts/VIS_orasvr01
sh addbctl.sh start
sh addlnctl.sh start VIS

cd /u02/oracle/VIS/inst/apps/VIS_orasvr01/admin/scripts
sh adstrtal.sh apps/apps

lokasi file Log Oracle EBS R12


- Startup/Shutdown Log files:
$INST_TOP/logs/appl/admin/log

Db:
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME//adconfig.log $ORACLE_HOME/appsutil/log/$CONTEXT_NAME//NetServiceHandler.log

- Patch log:
$APPL_TOP/admin/$SID/log/

- Autoconfig log file:
Apps:
$INST_TOP/apps/$CONTEXT_NAME/admin/log/$MMDDHHMM/adconfig.log

- Apache, OC4J and OPMN:
$LOG_HOME/ora/10.1.3/Apache $LOG_HOME/ora/10.1.3/j2ee $LOG_HOME/ora/10.1.3/opmn

- Concurrent log:
$INST_TOP/apps/$CONTEXT_NAME/logs/appl/conc/log


Saturday, July 16, 2011

Membuat database standby

Pada database primary:
1. database harus pada archive log mode
2. memastikan database yang memiliki orapw (passwordfile)
   cd $ORACLE_HOME/dbs orapwd file=orapw[database_name] password=oracle entries=5 force=y
3. mengubah parameter:
   * db_file_name_convert='/path/','/path/'
   * log_file_name_convert='/path/','/path/'
   * dg_broker_start='TRUE'
   * standby_file_management='AUTO'
4. membuat stanby controlfile
   alter database create standby controlfile as '/path/controltsstandby.ctl';


Schema database sales

schema_sales.sql

CONN / AS SYSDBA
DROP USER SALES CASCADE;
SPOOL C:\SCRIPT-SQL11G.LOG

CREATE USER SALES IDENTIFIED BY ORACLE
DEFAULT TABLESPACE USERS
QUOTA UNLIMITED ON USERS;


Thursday, July 14, 2011

Command Unix DBA

The following is a list of commonly used Unix command:
      • ps - Show process
      • grep - Search files for text patterns
      • mailx - Read or send mail
      • cat - Join files or display them
      • cut - Select columns for display
      • awk - Pattern-matching language
      • df - Show free disk space
Here are some examples of how the DBA uses these commands:

Command Unix

#Cek available instance di server process
   bash$ ps –ef | grep pmon

#Cek listener di server process
   bash$ ps –ef | grep lsnrctl

#Mengetahui jumlah line di dalam alert.log
   bash$ cat alert.log | wc –l