본문 바로가기
IT

우분투 리눅스에서 오라클 타임스텐 데이터베이스 생성 및 기본 명령 수행하기

by eddy's warehouse 2024. 4. 1.

지난 포스팅에서 오라클 타임스텐의 설치를 알아보았습니다. 오라클 타임스텐에 접속해서 sql을 수행하고 간단한 db 명령을 수행해 보려고 하는데, 매뉴얼에 아무리 찾아봐도 데이터베이스 생성 명령이 보이지 않습니다. 오늘은 오라클 타임스텐 클래식에 데이터베이스를 생성하고 접속해서 테이블을 만들고 DML을 수행하는 것을 설명드리겠습니다.

우분투 리눅스에서 오라클 타임스텐 데이터베이스 생성 및 기본 명령 수행하기 썸네일

타임스텐 데이터베이스( TimesTen Database )에 연결하기

타임스텐 데이터베이스는 테이블, 뷰, 시퀀스 등의 객체 모음입니다. 데이터베이스에 연결한 후 SQL 문을 통해 타임스텐 데이터베이스에 액세스 하고 조작할 수 있습니다.

타임스텐 클래식에서는 데이터베이스가 없는 경우 인스턴스 관리자가 데이터베이스에 연결할 때 지정된 연결 속성으로 데이터베이스를 생성합니다.

 

타임스텐 스케일아웃에서는 애플리케이션이 데이터베이스에 연결하기 전에 데이터베이스를 생성하고 열어야 합니다. Oracle TimesTen 인메모리 데이터베이스 스케일아웃 사용 안내서에서 데이터베이스 관리를 참조하세요.

 

여기서 우리는 타임스텐 클래식을 사용합니다. 실제로 스케일아웃에 있는 데이터베이스 관리의 dbCreate를 수행하면 다음과 같이 에러가 발생합니다.

~/tt_instances/ttinstance/bin$ ttGridAdmin dbCreate tpcc
Error 73: This command is not allowed to run on this instance

 

다시 본론으로 돌아와서 타임스텐 클래식에서 데이터베이스를 생성하기 위해서는 연결을 해야합니다.

 

참고: https://docs.oracle.com/en/database/other-databases/timesten/22.1/operations/connecting-timesten-database.html#GUID-B637884E-42DB-410F-B289-8050D6973D40

 

TimesTen Database 연결( Connections ) 관리

타임스텐에 연결을 위한 드라이버는 JDBC, OCI, ODPI-C, Python, Node.js등이 있지만, 결국 이러한 모든 인터페이스는 궁극적으로 타임스텐 ODBC 드라이버를 사용하여 타임스텐 데이터베이스에 액세스 합니다. 이러한 인터페이스는 TimesTen ODBC Direct 드라이버, TimesTen ODBC 클라이언트 드라이버, TimesTen 드라이버 관리자 또는 일반 ODBC 드라이버 관리자를 사용할 수 있습니다.

 

TimesTen ODBC Drivers를 사용하여 연결하

애플리케이션은 TimesTen ODBC 드라이버를 사용하여 TimesTen 데이터베이스에 연결할 수 있습니다.

타임스텐에는 다음과 같은 타임스텐 ODBC 드라이버가 포함되어 있습니다.

  • TimesTen Data Manager (Direct) 드라이버: Direct connect 애플리케이션을 위한 TimesTen ODBC 드라이버.
  • TimesTen Client 드라이버: 클라이언트/서버 애플리케이션과 함께 사용하기 위한 TimesTen 클라이언트 ODBC 드라이버

타임스텐에는 다음 두 가지 버전의 타임스텐 데이터 관리자 드라이버(Direct 드라이버)가 포함되어 있습니다.

  • Production: 대부분의 애플리케이션 개발 및 모든 배포에는 프로덕션 버전의 TimesTen 데이터 관리자 드라이버를 사용합니다.
  • Debug: 타임스텐 자체에 문제가 발생한 경우에만 타임스텐 데이터 관리자 드라이버의 디버그 버전을 사용하세요. 이 버전은 추가적인 내부 오류 검사를 수행하며 프로덕션 버전보다 느립니다. Linux 및 UNIX에서 TimesTen 디버그 라이브러리는 추가 디버그 정보를 표시하기 위해 -g 옵션으로 컴파일됩니다.

Windows에서 타임스텐 클래식 지원을 받으려면 일반 또는 사용자 지정 설정을 선택한 후 "타임스텐 클라이언트 22.1" 드라이버를 설치하면 됩니다.

Linux 및 UNIX의 경우, 설치 시 선택한 옵션에 따라 TimesTen 클라이언트 드라이버와 타임스텐 데이터 관리자 드라이버의 프로덕션 버전 및 디버그 버전이 모두 설치될 수 있습니다.

Linux와 Unix에서 사용가능한 드라이버는 아래와 같습니다.

Table 1-1 ODBC Drivers Provided for Linux and UNIX Platforms

Platform Version Location and name
Linux
Solaris x86
Solaris Sparc
Production timesten_home/install/lib/libtten.so
TimesTen Data Manager 22.1 driver.
Linux
Solaris x86
Soliaris Sparc
Debug timesten_home/install/lib/libttenD.so
TimesTen Data Manager 22.1 Debug driver.
Linux
Solaris x86
Soliaris Sparc
Client timesten_home/install/lib/libttclient.so
TimesTen Client 22.1 driver.
AIX Production timesten_home/install/lib/libtten.a
TimesTen Data Manager 22.1 driver.
AIX Debug timesten_home/install/lib/libttenD.a
TimesTen Data Manager 22.1 Debug driver.
AIX Client timesten_home/install/lib/libttclient.a
TimesTen Client 22.1 driver.
macOS Client timesten_home/install/lib/libttclient.dylib
TimesTen Client 22.1 driver.

ODBC Driver Manager를 사용하여 연결하기

애플리케이션 프로세스에서 Direct 드라이버와 TimesTen Client 드라이버를 모두 사용하려는 경우, ODBC 드라이버 관리자(ODBC Driver Manager)와 연결해야 합니다.

 

타임스텐에서 ODBC Driver Manager는 두 가지를 사용할 수 있습니다.

 

1. 타임스텐 드라이버 매니저는 이 케이스를 위해 특별히 설계된 투명하고 오버헤드가 적은 옵션입니다. TimesTen 드라이버 관리자는 모든 TimesTen 기능을 지원합니다.

 

2. 애플리케이션을 일반 ODBC 드라이버 관리자(Windows or Unix ODBC Driver Manager)와 연결할 수도 있습니다. 일반 ODBC 드라이버 관리자는 일반적으로 성능에 상당한 영향을 미치며 일부 TimesTen 기능(예: XLA, 라우팅 API, 유틸리티 API 및 TimesTen ODBC 확장 기능)을 사용하지 못할 수 있습니다.

TimesTen 드라이버 관리자와 일반 ODBC 드라이버 관리자 모두 런타임에 ODBC 드라이버를 동적으로 로드합니다.

 

ODBC 애플리케이션은 데이터베이스의 속성(호스트, 포트 번호 등) 또는 데이터 소스 이름(DSN)을 참조하여 데이터베이스에 연결할 수 있습니다.


TimesTen 클래식의 경우 Oracle TimesTen 인메모리 데이터베이스 운영 가이드에 데이터베이스의 DSN 생성에 대한 정보가 포함되어 있습니다. 생성하는 DSN 유형은 애플리케이션이 데이터베이스에 직접 연결하는지 아니면 클라이언트를 통해 연결하는지에 따라 다릅니다.

또한, DSN은 User DSN과 System DSN이 존재합니다.

User DSN과 System DSN (DSN: 데이터 소스 이름)

DSN은 2단계 네이밍 시스템을 사용하여 확인되는데, 타임스텐은 먼저 정의된 User DSN 내에서, 두 번째로 정의된 System(시스템) DSN 내에서 DSN을 확인하려고 시도합니다.

1. 사용자 DSN은 해당 DSN을 생성한 사용자만 사용할 수 있습니다.

  • Windows에서 사용자 DSN은 ODBC 데이터 소스 관리자의 사용자 DSN 탭에서 정의합니다.
  • Linux 및 UNIX의 TimesTen Classic의 경우 사용자 odbc.ini 파일에서 사용자 DSN을 정의합니다. 타임스텐은 먼저 ODBCINI 환경 변수에 파일이 지정되어 있는지 확인하여 이 파일을 찾습니다. 그렇지 않은 경우, TimesTen은 $HOME/.odbc.ini 파일을 찾습니다.
  • 타임스텐 클래식은 타임스텐 데이터 관리자 드라이버와 타임스텐 클라이언트 드라이버 모두에 대한 데이터 소스를 .odbc.ini 파일에서 지원합니다.
  • 타임스텐 스케일아웃의 경우, 적절한 데이터베이스 정의 및 연결 가능 항목 내에서 사용자 DSN을 정의하세요. Oracle TimesTen 인메모리 데이터베이스 스케일아웃 사용 설명서에서 데이터베이스 관리를 참조하세요.

2. 시스템 DSN은 타임스텐 데이터베이스에 연결하도록 시스템 DSN이 정의된 시스템의 모든 사용자가 사용할 수 있습니다.

  • Windows에서 시스템 DSN은 ODBC 데이터 소스 관리자의 시스템 DSN 탭에서 정의합니다.
  • Linux 및 UNIX의 TimesTen Classic의 경우, 시스템 DSN은 시스템 odbc.ini 파일이라고 하는 sys.odbc.ini 파일에 정의됩니다.
  • TimesTen은 다음 순서로 시스템 DSN 파일을 찾습니다.
    • SYSODBCINI 환경 변수에 의해 지정된 경우 파일을 찾습니다.
    • 설치 시 파일은 timesten_home/conf/sys.odbc.ini에 있습니다.
    • 이 위치 중 어느 곳에서도 찾을 수 없는 경우, 타임스텐은 시스템에서 /etc/odbc.ini 파일을 찾습니다.
  • 타임스텐 스케일아웃의 경우, 적절한 데이터베이스 정의 및 연결 가능 항목 내에서 시스템 DSN을 생성하세요. Oracle TimesTen 인메모리 데이터베이스 스케일아웃 사용 안내서에서 데이터베이스 관리를 참조하세요.

Direct 또는 Client/Server 연결을 위한 DSN 정의하기

DSN은 로컬이든 원격이든 데이터베이스를 고유하게 식별하기 위해 만들어집니다.
다음은 Direct 연결 또는 클라이언트/서버 연결에 사용할 DSN 유형에 대해 설명합니다:

데이터 관리자 DSN

Linux 또는 UNIX 호스트의 로컬 데이터베이스를 지정하는 DSN입니다. 타임스텐 데이터 관리자 드라이버의 프로덕션 버전 또는 디버그 버전을 사용할 수 있습니다.

데이터 관리자 DSN은 경로 이름과 파일 이름 접두사를 사용하는 데이터베이스를 나타냅니다. 데이터베이스 경로 이름은 데이터베이스의 디렉터리 위치와 데이터베이스의 접두사(예: /disk1/databases/AdminDS)를 지정합니다.

이 경로 이름과 접두사는 파일 이름이 아니라 데이터베이스가 있는 디렉터리의 이름과 모든 데이터베이스 파일의 접두사를 정의합니다. 데이터베이스에서 사용하는 실제 파일에는 /disk1/databases/AdminDS.ds0과 같은 파일 접미사가 추가됩니다.

 

특정 타임스텐 데이터베이스를 참조하는 데이터 관리자 DSN은 데이터베이스가 상주하는 동일한 시스템에 정의되어야 합니다. 여러 데이터 관리자 DSN이 동일한 데이터베이스를 참조하는 경우, 다른 경로 이름이 동일한 위치를 식별하더라도 모두 정확히 동일한 데이터베이스 경로 이름을 사용해야 합니다. 예를 들어 심볼릭 링크를 사용하여 한 DSN에서는 데이터베이스를 참조하고 다른 DSN에서는 실제 경로 이름을 참조할 수 없습니다.

클라이언트 DSN

클라이언트 DSN은 원격 데이터베이스를 지정하고 타임스텐 클라이언트를 사용합니다. 클라이언트 DSN은 호스트 이름, DSN 쌍을 지정하여 타임스텐 데이터베이스를 간접적으로 참조하며, 여기서 호스트 이름은 타임스텐 서버가 실행 중인 서버 시스템을 나타내고 DSN은 서버 호스트의 타임스텐 데이터베이스를 지정하는 서버 DSN을 참조합니다.

서버 DSN

서버 DSN은 항상 시스템 DSN으로 정의되며 클라이언트 애플리케이션에서 액세스할 수 있는 해당 서버의 각 데이터베이스에 대해 서버 시스템에 정의됩니다. 서버 DSN의 형식과 속성은 데이터 관리자 DSN의 형식과 속성과 매우 유사합니다.


Windows에서는 데이터 소스 이름 및 데이터 소스와 관련된 모든 구성 정보(데이터베이스 경로 이름 포함)가 시스템 레지스트리에 저장됩니다. ODBC 드라이버 관리자와 TimesTen은 이 정보를 사용합니다.

 

Linux 및 UNIX에서는 특정 사용자가 만든 클라이언트 DSN과 데이터 관리자 DSN을 모두 포함한 모든 사용자 DSN이 동일한 사용자 odbc.ini 파일에 정의됩니다. 마찬가지로 모든 시스템 DSN도 동일한 시스템 odbc.ini 파일에 정의됩니다.

 

다음 표는 타임스텐에서 지원하는 DSN의 유형, 사용자 또는 시스템 DSN 생성 여부 및 DSN의 위치를 나타냅니다.

DSN type User or System DSN? Location of DSN
Data Manager DSN Can be a user or system DSN Located on the system where the database resides.
Client DSN Can be a user or system DSN Located on any local or remote system.
Server DSN Must be a system DSN Located on the system where the database resides.

클라이언트 DSN 및 서버 DSN에 대한 자세한 내용은 타임스텐 클라이언트 및 서버로 작업하기를 참조하세요.

 

이 글에서는 Datta Manager DSN을 이용해서 타임스텐 클래식에 연결해 보도록 하겠습니다.

리눅스(유닉스)에서 타임스텐 클래식을 위한 DSN 생성하기

사용자 및 시스템 DSN은 여러 odbc.ini 파일 유형 중 하나에 정의됩니다.

Linux 및 UNIX에서 사용자 DSN은 $HOME/.odbc.ini 파일 또는 ODBCINI 환경 변수로 명명된 파일에 정의됩니다. 이 파일을 사용자 odbc.ini 파일이라고 합니다. 시스템 DSN은 timesten_home/conf/sys.odbc.ini에 있는 시스템 odbc.ini 파일에 정의됩니다.

사용자 및 시스템 odbc.ini 파일의 구문은 동일합니다. 구문은 odbc.ini 파일 항목 설명에 설명되어 있습니다. 시스템 odbc.ini 파일은 타임스텐이 시스템에 설치될 때 생성됩니다. 사용자 odbc.ini 파일을 사용하기 위해서는 직접 만들어야 합니다.

제 시스템의 경우 아래와 같이 timesten_home에 들어가서 sys.odbc.ini 파일을 살펴본 결과 주석으로 자세한 설명이 나타나 있습니다.

timesten:~/tt_instances/ttinstance/bin$ cd $TIMESTEN_HOME
timesten:~/tt_instances/ttinstance$ ls
bin  conf  diag  info  install  plsql  startup
timesten:~/tt_instances/ttinstance$ cd conf/
timesten:~/tt_instances/ttinstance/conf$ ls
sys.odbc.ini  sys.ttconnect.ini  timesten.conf
timesten:~/tt_instances/ttinstance/conf$ cat sys.odbc.ini
# Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.

#########################################################################
#
# The following are the default values for connection attributes.
# In the Data Sources defined below, if the attribute is not explicitly
# set in its entry, TimesTen 22.1 uses the defaults as
# specified below.  For more information on these connection attributes,
# see the accompanying documentation.
#
# Lines in this file beginning with # or ; are treated as comments.
# In _attribute_=_value_ lines, the _value_ consists of everything
# after the = to the end of the line, with leading and trailing white
# space removed.
#
#########################################################################
#
#    ** attribute **           ** default **
#
# Data store attributes
#       DataStore                 (no default)
#       DatabaseCharacterSet      (no default)
#       Description               (no default)
#       Driver                    (no default)
#       LogDir                    (Directory containing db transaction log
#                                  files)
#       Preallocate               (1 - Specifies that disk space for the database
#                                  should be preallocated when creating the database)
#       ReplicationApplyOrdering  (0 - automatic parallel replication)
#       ReplicationParallelism    (1)
#       Temporary                 (0 - do not create a permanent datastore)
#
# First connection attributes
#       AutoCreate                (1)
#       CkptFrequency             (0 - no predefined frequency)
#       CkptLogVolume             (The value of the LogFileSize attribute)
#       CkptRate                  (0 - rate not limited)
#       CkptReadThreads           (1)
#       Connections               (The lesser of 32000 or the number of
#                                  semaphores specified in the SEMMSL kernel
#                                  parameter)
#       ForceConnect              (0 - connection disallowed)
#       LogAutoTruncate           (1 - continue after log is truncated)
#       LogBufMB                  (64 - measured in MB)
#       LogBufParallelism         (4)
#       LogFileSize               (The value of the LogBufMB attribute)
#       LogFlushMethod            (1 - Write data to transaction log files
#                                  using buffered writes.  Use explicit sync
#                                  operations as needed to sync log data to
#                                  disk)
#       LogPurge                  (1 - remove unneeded transaction log files)
#       MemoryLock                (0 - Linux, Solaris and Windows 64-bit
#                                  platforms only)
#       Overwrite                 (0 - do not overwrite the existing datastore)
#       PermSize                  (32 - measured in MB)
#       RecoveryThreads           (4 - the number of threads used to rebuild
#                                  indexes during recovery)
#       TempSize                  (default is derived from PermSize - measured
#                                  in MB)
#
# General connection attributes
#       CommitBufferSizeMax       (10 - measured in MB)
#       ConnectionName            (process argv[0])
#       DDLReplicationAction      (INCLUDE)
#       DDLReplicationLevel       (2 - Replication of objects enabled)
#       Diagnostics               (1 - generate base level diagnostics )
#       DurableCommits            (0 - do not force log to disk on transaction
#                                  commits)
#       IncludeInCore             (255 - dump everything)
#       Isolation                 (1 - read-committed)
#       LockLevel                 (0 - row-level locking)
#       LockWait                  (10 seconds)
#       OptimizerHint             (no default)
#       PermWarnThreshold         (90 - pecentage at which warnings should be
#                                  issued)
#       PrivateCommands           (0 - share commands between connections)
#       PWD                       (no default)
#       PWDCrypt                  (no default)
#       QueryThreshold            (0 - do not return an error nor throw an SNMP
#                                  trap if the query times out before executing)
#       ReplicationTrack          (no default)
#       SQLQueryTimeout           (0 - time limit in seconds for executing SQL
#                                  queries)
#       TempWarnThreshold         (90 - percentage at which out-of-memory
#                                  warnings should be issued)
#       UID                       (operating system user ID)
#       WaitForConnect            (1 - wait until connection to the datastore
#                                  is possible)
#
# Grid mode attributes
#       Durability                (0 - if ksafety = 2)
#                                 (1 - if ksafety = 1)
#
# TimesTen Scaleout First connection attributes
#       EpochInterval             (0 - if Durability = 1)
#                                 (1 - if Durability = 0)
#
# TimesTen Scaleout General connection attributes
#       CreateEpochAtCommit       (0 - TimesTen does not write the transaction log
#                                  to disk on transaction commit)
#
# NLS general connection attributes
#       ConnectionCharacterSet    (US7ASCII)
#       NLS_LENGTH_SEMANTICS      (BYTE - default length semantic configuration)
#       NLS_NCHAR_CONV_EXCP       (0 - do not report data loss for data
#                                  conversion between NCHAR/NVARCHAR data and
#                                  CHAR/VARCHAR data)
#       NLS_SORT                  (BINARY - the collating sequence to use for
#                                  linguistic comparisons)
#
#
# PL/SQL first connection attibutes
#       PLSQL_MEMORY_ADDRESS      (platform specific default; value is entered
#                                  as Hex: 20000000 means 0x20000000)
#       PLSQL_MEMORY_SIZE         (128 - measured in MB)
#
#
# PL/SQL general connection attibutes
#    The following Attributes are significant only when PLSQL=1
#       PLSQL_OPTIMIZE_LEVEL      (2)
#       PLSQL_CCFLAGS             (NULL)
#       PLSQL_CONN_MEM_LIMIT      (100 - measured in MB)
#       PLSCOPE_SETTINGS          (IDENTIFIERS:NONE)
#       PLSQL_TIMEOUT             (30 - measured in seconds)
#
#
# TimesTen Cache first connection attributes
#       CacheAWTMethod            (1 - plsql)
#
#
# TimesTen Cache database attributes
#       CacheAWTParallelism       (1 - no parallelism)
#
#
# TimesTen Cache general connection attributes
#       DynamicLoadEnable         (1 - Enable dynamic load of Oracle data to
#                                  dynamic cache groups for the current
#                                  connection)
#       DynamicLoadErrorMode      (0 - do not return an error on a transparent
#                                  dynamic load behavior)
#       OracleNetServiceName      (no default)
#       OraclePWD                 (no default)
#       PassThrough               (0 - SQL not passed through to Oracle)
#       RACCallback               (1 - Install the TAF and FAN callbacks)
#
#
# TimesTen Client connection attributes
#       TCP_Port                  (no default)
#       TCP_Port2                 (no default)
#       TTC_FailoverPortRange     (no default)
#       TTC_REDIRECT              (1 - connect to any available server)
#       TTC_REDIRECT_LIMIT        (1)
#       TTC_Server                (no default)
#       TTC_Server2               (no default)
#       TTC_Server_DSN            (no default)
#       TTC_Server_DSN2           (no default)
#       TTC_TCP_KEEPALIVE_TIME_MS (1000)
#       TTC_TCP_KEEPALIVE_INTVL_MS(1000)
#       TTC_TCP_KEEPALIVE_PROBES  (2)
#       TTC_Timeout               (60 - seconds the client waits for a
#                                  connection)
#
#
# TimesTen Server connection attributes
#       MaxConnsPerServer         (1)
#       ServersPerDSN             (1)
#       ServerStackSize           (256)
#
#########################################################################


[ODBC Data Sources]
#sampledb=TimesTen 22.1 Driver
#sampledbCS=TimesTen 22.1 Client Driver

#[sampledb]
#Driver=/home/timesten/tt_instances/ttinstance/install/lib/libtten.so
#DataStore=/databases/sampledb
#PermSize=512
#TempSize=128
#LogBufMB=256
#LogFileSize=256
#LogDir=/logs
#DatabaseCharacterSet=AL32UTF8
#OracleNetServiceName=ttorcl


#[sampledbCS]
#TTC_SERVER=sampledb_CS
#TTC_SERVER_DSN=sampledb

timesten:~/tt_instances/ttinstance/conf$

 

 

위의 sys.odbc.ini 파일을 다음과 같이 수정하였습니다. tpcc라는 데이터베이스와 DSN을 만들기 위해서 아래와 같이 작성해 보았습니다.

[ODBC Data Sources]
tpcc=TimesTen 22.1 Driver
#sampledb=TimesTen 22.1 Driver
#sampledbCS=TimesTen 22.1 Client Driver

[tpcc]
Driver=/home/timesten/tt_instances/ttinstance/install/lib/libtten.so
DataStore=/home/timesten/tt_instances/ttinstance/tpcc
DatabaseCharacterSet=KO16MSWIN949

 

참고: https://docs.oracle.com/en/database/other-databases/timesten/22.1/operations/creating-dsn-linux-and-unix-timesten-classic.html#GUID-E4C94D8C-638B-4DE9-930F-2160E85680B7

 

데이터베이스 생성 및 최초 접속하기

타임스텐 데이터베이스는 최초에 접속할 때 데이터베이스가 생성된다고 했습니다. 위와 같이 설정해 놓은 상태에서는 tpcc라는 데이터베이스를 만들고 최초로 접속하기 위해서 ttIsql 유틸리티를 사용합니다.

DSN이 tpcc이므로 ttIsql tpcc를 치면 connect "DSN=tpcc"로 나타나면서 약간의 시간이 소요됩니다.

최초 접속으로 인해서 데이터베이스를 생성하는 시간으로 보입니다.

timesten:~/tt_instances/ttinstance/conf$ ttIsql tpcc

Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.

connect "DSN=tpcc";
Connection successful: DSN=tpcc;UID=timesten;DataStore=/home/timesten/tt_instances/ttinstance/tpcc;DatabaseCharacterSet=KO16MSWIN949;ConnectionCharacterSet=US7ASCII;DRIVER=/home/timesten/tt_instances/ttinstance/install/lib/libtten.so;
(Default setting AutoCommit=1)
Command> create table t1(i1 integer);
Command> insert into t1 values (10);
1 row inserted.
Command> select * from t1;
< 10 >
1 row found.
Command> drop table t1;
Command> select * from t1;
 2206: Table TIMESTEN.T1 not found
The command failed.

 

오라클 타임스텐 데이터베이스 생성 및 DML 수행하기

오늘은 오라클 타임스텐 클래식 인스턴스에 데이터베이스를 생성하고 DML을 수행하는 법을 알아보았습니다.

오라클 타임스텐 클래식은 데이터베이스를 생성하는 명령이 따로 존재하지 않고 최초 접속 시에 자동으로 생성된다는 것을 알게 되었습니다.

그리고, 최초 접속은 DSN을 통해서 진행됩니다.

DSN을 설정하고 최초로 접속하면 자동으로 데이터베이스가 생성되니 데이터베이스 생성구문이나 명령 찾지 마시고 바로 ttIsql로 접속 시도를 하시면 되겠습니다.

 

facebook twitter kakaoTalk kakaostory naver band shareLink