Category Archives: database

Export and Import Oracle Database

this video created by Mohamed Yassin

Posted in oracle | Tagged , , | Leave a comment

ORA-01940: cannot drop a user that is currently connected solved

select sid, serial# from v$session where username = ‘AXF’; Alter user AXF account lock; alter system kill session ‘209,8029’; drop user AXF cascade;

Posted in database, oracle | Tagged , , , | Leave a comment

Oracle Sql

USING SQL PLUS or Any Oracle Tool Like “SQL Developer or TOAD” ============================================================== create user supplier2 identified by supplier2 grant connect,resource,dba to supplier2 unlock ====== alter user joe account unlock; alter user awb account unlock identified by awb; change password … Continue reading

Posted in Oracle, oracle, Uncategorized | Tagged , , | Leave a comment

How to Fix ORA-12162 TNS:net service name is incorrectly specified Error in Oracle?

sometimes ┬áthe oracle profile is not prepared correctly and this give so many errors and you should go direct to directory of SqlPlus to start DB /u01/app/oracle/product/11.2.0/dbhome_1/bin ./sqlplus sys/password as sysdba; the following error will arises ORA-12162 TNS:net service name … Continue reading

Posted in oracle | Tagged , , , , , , | 2 Comments

run linux command from java and reading result?

import java.*; class Test { public static void main(String[] args) { int ch; try { Process myProcess = Runtime.getRuntime().exec(“ls -al”); InputStreamReader myIStreamReader = new InputStreamReader(myProcess.getInputStream()); while ((ch = != -1) { System.out.print((char) ch); } } catch (IOException anIOException) { … Continue reading

Posted in java, mysql

restarting mysql at linux

service mysql restart

Posted in linux, mysql

SqlExecuter vs JDBC

public class CmdExec { public static void main(String argv[]) { executeSql(); } private static void executeSql() { final class SqlExecuter extends SQLExec { public SqlExecuter() { Project project = new Project(); project.init(); setProject(project); // setTaskType(“sql”); setTaskName(“sql”); } } SqlExecuter executer … Continue reading

Posted in java, jdbc, mysql