'Development/Database'에 해당되는 글 3건

//////////////////////////////////
// Oracle
//////////////////////////////////
drop table t1;
create table t1 (c1 char(20));
insert /*+ APPEND */ into t1 select rownum from dual connect by level <=1000000;
commit;
select count(*) from t1;

//////////////////////////////////
// Timesten 7
//////////////////////////////////
autocommit on;
drop table TEST.T1;
create table test.t1 (c1 char(20));
insert into t1 select a.rowid from sys.columns a cross join sys.columns b;
select count(*) from t1;

//////////////////////////////////
// Timesten 11
//////////////////////////////////
drop table TEST.T1;
create table test.t1 (c1 char(20));
insert into t1 select a.rowid from sys.columns a cross join sys.columns b;
select count(*) from t1;
commit;

//////////////////////////////////
// MS-SQL
//////////////////////////////////
drop table t1;
create table t1 (c1 char(128));
insert into t1(c1) select top 480000 newid() from sys.columns a cross join sys.columns b;
insert into t1(c1) select top 480000 newid() from sys.columns a cross join sys.columns b;
select count(*) from t1;

//////////////////////////////////
// MySQL
//////////////////////////////////
drop table test.t1;
create table test.t1 (c1 char(20));
/* 1,000,000  */
insert into test.t1 (c1) select @row := @row + 1 from
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t1,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t2,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t3,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t4,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t5
;

//////////////////////////////////
// Informix
//////////////////////////////////
drop table t1;
create table t1 (c1 varchar(128));
insert into t1(c1) select a.rowid from syscolumns a cross join syscolumns b;
select count(*) from t1;

//////////////////////////////////
//Altibase 6.5.1
//////////////////////////////////
drop table t1;
create table t1 (c1 char(20));
insert /*+ APPEND */ into t1 select rownum from dual connect by level <=1000000;
commit;
select count(*) from t1;

//////////////////////////////////
// Tibero
//////////////////////////////////
drop table t1;
create table test.t1 (c1 char(20));
insert into t1 select rownum from dual connect by level <=100000

//////////////////////////////////
// CUBRID 9.x
//////////////////////////////////
drop table t1;
create table t1 (c1 int);
insert into t1 select rownum+1 from
                  table({0,1,2,3,4,5,6,7,8,9}) t0(a),
                  table({0,1,2,3,4,5,6,7,8,9}) t1(a), -- 100
                  table({0,1,2,3,4,5,6,7,8,9}) t2(a), -- 1,000
                  table({0,1,2,3,4,5,6,7,8,9}) t3(a), -- 10,000
                  table({0,1,2,3,4,5,6,7,8,9}) t4(a), -- 100,000
                  table({0,1,2,3,4,5,6,7,8,9}) t5(a)  -- 1,000,000

Posted by zennken

http://stackoverflow.com/questions/9463092/how-to-change-oracle-10gr2-express-editions-default-character-set

/* Oracle XE 10g alter default character set */

connect sys/xxxxx as sysdba
shutdown immediate 
startup mount 
alter system enable restricted session ; 
alter system set JOB_QUEUE_PROCESSES=0; 
alter system set AQ_TM_PROCESSES=0; 
alter database open; 
alter database character set internal_use KO16MSWIN949; 
shutdown immediate 
startup


SQL> select * from nls_database_parameters where parameter = 'NLS_CHARACTERSET';
PARAMETER
------------------------------
VALUE
--------------------------------------------------------------------------------
NLS_CHARACTERSET
KO16MSWIN949


Posted by zennken

ALTIBASE
jdbc:Altibase://<address>:<port_number>/<database_name>
dirver file name: Altibase.jar

ORACLE
jdbc:oracle:<drivertype>:<username/password>@<database>
<database>:
* //<host>:<port>/<service>
* <host>:<port>:<SID>
* <TNSName>

String url = "jdbc:oracle:thin:@192.168.3.38:" + port + ":orcl";
Default port: 1521

SID: select instance from v$thread;
DB Name: select name from v$database;

DB2
jdbc:db2://[serverName][:port][/DBName]
Default port 50000

The IBM® Data Server Driver for JDBC and SQLJ
--------------------------------------------------------------------------------------------
Driver package name  Level of JDBC support  Minimum level of SDK for Java required
--------------------------------------------------------------------------------------------
db2jcc.jar and sqlj.zip JDBC 3.0 and earlier  1.4.2
db2jcc4.jar and sqlj4.zip1  JDBC 4.0 and earlier  6

MS-SQL
jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]
port: 1433
sqljdbc.jar

MySQL
jdbc:mysql://<host_name>:<port_number>/<database_name>
Port: 3306

Posted by zennken
1

zennken

달력