随笔分类 - Oracle
摘要:JDBC Driver Connection URLThis section describes the connection URL format and how to create connection objects with the DriverManager class.If you want to use the DriverManager class to create connection objects, you need to know how to make a connection URL that provides access information to the
阅读全文
摘要:D:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMINtnsnames.oraXE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = spark)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) )ORA254 =(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST...
阅读全文
摘要:http://shqkm.blog.163.com/blog/static/794804172010323102545265/Oracle Connect By用法oracle中的select语句可以用START WITH...CONNECT BY PRIOR子句实现递归查询,connect by 是结构化查询中用到的,其基本语法是:select ... from <TableName>where <Conditional-1>start with <Conditional-2>connect by <Conditional-3>;<Con
阅读全文
摘要:select row_number () over (order by rownum desc) as rn,rownum,aaa from aaaa/
阅读全文
摘要:SELECT E.EMPLOYEE_ID, E.LAST_NAME, D.DEPARTMENT_ID, D.DEPARTMENT_NAME FROM HR.EMPLOYEES E LEFT OUTER JOIN HR.DEPARTMENTS D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID SELECT E.EMPLOYEE_ID, E.LAST_NAME, D.DEPARTMENT_ID, D.DEPARTMENT_NAME FROM HR.EMPLOYEES E ,HR.DEPARTMENTS D WHERE E.DEPARTMENT_ID= D.DEPARTM
阅读全文
摘要:package wcg.test.jdbc.oracle;import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;public class TestConnOracle { /** * @param args */ public static void main(String[] args) throws Exception { Connection conn = null;
阅读全文
摘要:SELECT * FROM session_privs这个在sqlplus里可以查看当前用户所有权限,查看是否是dbaselect userenv('isdba') from dual;查看当前schema和user:select sys_context('userenv','current_user') as current_userfrom dual;select sys_context('userenv','current_schema') as current_schemafrom dual;-------
阅读全文
摘要:An Oracle instanceBackground Processes for an InstanceDatabase Writer (DBWR)Log Writer (LGWR)System Monitor (SMON)Process Monitor (PMON)Archiver (ARC)Checkpoint (CKPT)Recover (RECO)Processes or Threads?With all this talk about processes, you may be wondering whether Oracle actually uses threads or p
阅读全文
摘要:oracle循环的几种写法:declarex number :=5;begin--x:=0;loopx:=x+1;/*if (x=10) then exit; end if;*/exit when x=10;dbms_output.put_line('x='||x);end loop;dbms_output.put_line('outer');end;/------------------------------declarex number :=5;beginwhile x<10 loopx:=x+1;dbms_output.put_line('
阅读全文
摘要:DECODE语法:SELECT DECODE( <EXPR,SEARCH1,RESULT1,SEARCH2,RESULT2,...[,DEFAULT]>)FROM <TABLE_NAME>e.g.:select orderno,decode(ostatus,'p','准备处理','c','已完成')from order_master此函数可用于行转列:select * from scoreSELECT u_id, stu_name, SUM (DECODE (score_type, '语文'
阅读全文
摘要:http://blog.sina.com.cn/s/blog_4a93ccea0100ijd9.htmlToad for Oracle工具的使用出处:转载[注意:单击图片可以放大显示]在Oracle应用程序的开发过程中,访问数据库对象和编写SQL程序是一件乏味且耗费时间的工作,对数据库进行日常管理也是需要很多SQL脚本才能完成的。Quest Software为此提供了高效的Oracle应用开发工具-Toad(Tools of Oracle Application Developers)。在Toad的新版本中,还加入了DBA(Database Administrator 数据库管理员)模块,可以
阅读全文
摘要:http://apps.hi.baidu.com/share/detail/16268377pl/sql develop的使用
阅读全文
摘要:jdbc thin,oci:Oracle提供的两套Java访问Oracle数据库的方法 thin就是纯粹用Java完成访问数据库的所有方法,优点是不用安装客户端 oci就是使用Java来调用本机的Oracle客户端然后再访问数据库,优点是速度快但是需要安装和配置数据库请问jdbc:oracle:thin:@192.168.3.98:1521:orcl是什么意思?jdbc:oracle:thin:@192.168.3.98:1521:orcljdbc:表示采用jdbc方式连接数据库oracle:表示连接的是oracle数据库thin:表示连接时采用thin模式(oracle中有两中模式)jdbc
阅读全文
摘要:from:http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.htmlOracle Database 10gRelease 2 JDBC DriversYou must accept theOTN Development and Distribution License Agreementto download this software.AcceptLicense Agreement|DeclineLicense AgreementOracle Database 10gRelease
阅读全文
摘要:sqlplus登陆oracle:法1:1.cmd -> 2.输入 sqlplus "sys/123 as sysdba"法2:打开oracle 运行sql命令:SQL> connect sys as sysdba输入口令:[输入密码,我此处为123]已连接。-------------------------------------------------SQL> desc v$controlfile [控制文件]select * from v$controlfile;[数据文件]select name from v$datafile;select file
阅读全文