Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

Sunday, January 25, 2009

Kill Session in Oracle DB

Now I try to write about kill session in oracle database. First time please login to oracle server. Type sqlplus then enter


$ sqlplus

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Jan 24 07:26:59 2009

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

Enter user-name:
$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Jan 24 07:27:17 2009

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.


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

To get serial of the session that will kill type @sql_sid then enter

SQL> @sql_sid
enter value for sid: session_id

Now kill session

SQL> alter system kill session 'session,serial';

System altered.

SQL>

If the message showed System Altered the killing session is done

Wednesday, August 6, 2008

Script buat nge-dump ma restore Database Postgree di linux

Masuk ke konsole linux trus ketikkan script di bawah ini :
- Untuk ngedump database :
pg_dump -Fc -U username dbname > file.sql
- Untuk ngerestorenya :
pg_restore -U username -d dbname file.sql