Showing posts with label Free RDBMS. Show all posts
Showing posts with label Free RDBMS. Show all posts

2010/10/05

Firebird Windows에 수동으로 설치하기

우선 운영체제에 맞는 설치 파일을 선택한다. 32비트는 Firebird-2.5.0.26074-0_Win32.zip 를 64비트는 Firebird-2.5.0.26074-0_x64.zip 를 설치하고자 하는 경로에 압축을 풀어놓는다. (Download Site)






여기서는 F:\Firebird64 경로에 압축을 풀고 작업을 했다.






우선 bin 폴더에 있는 install_super.bat 를 실행하여 서비스를 등록한다.






이제 시스템의 서비스 목록을 확인해 보면 Firebird Guardian 과 Firebird Server 가 등록되어 있음을 확인 할 수 있다.






사실 이것 만으로 설치는 끝난것인데 항상 Firebird 를 운영할 일이 없는 개인 PC 에서 서비스 형태로 돌리는 것이 맘이 들지 않아 Application 형태로 필요할 때에 운영을 하려 한다.






우선 F:\Firebird64\system32 폴더에 있는 Firebird2Control.cpl 를 윈도우의 System 폴더(C:\Windows\System32)에 복사를 한다. 복사를 하고 시작 메뉴의 제어판을 보면 Firebird Server Manager 가 등록 된다.






Firebird Server Manager를 실행하면 Firebird Server Control 이 실행 된다.






Firebird Server Control 에서 현재 운영중이라면 서버를 중지시키고 운영 형태(Run)를 Application 으로  시작(Start)를 Manually로 설정하고 Apply 를 누르고 시작을 한다.






그러면 시스템의 서비스 목록에 등록되었던 두 개의 서비스(Firebird Guardian, Firebird Server)가 사라지고 Firebird 는 Application 형태로 운영이 된다. 시스템의 프로세스 목록을 보면 두개의 프로세스가 동작중인 것을 확인 할 수 있다.





<

Original Post : http://neodreamer-dev.tistory.com/464

2010/10/04

2009/12/01

Firebird C API를 이용하여 데이터베이스 생성하기


isc_db_handle db = NULL; /* database handle */
isc_tr_handle trans = NULL; /* transaction handle */
ISC_STATUS_ARRAY status; /* status vector */
long sqlcode; /* SQLCODE */

char *szSQL = "CREATE DATABASE 'e:\\ew.fdb' USER 'sysdba' PASSWORD 'masterkey';";

if ( isc_dsql_execute_immediate(status, &db, &trans, 0, szSQL, 1, NULL) )
{
sqlcode = isc_sqlcode(status);

TRACE( "Fail to create database : %d\n", sqlcode );
}
else
{
TRACE( "Database created!!!\n" );
}

Original Post : http://neodreamer-dev.tistory.com/341

2009/11/30

Firebird isql을 이용한 데이터베이스 생성하기(Windows)

Firebird 의 Interactive SQL Tool 인 isql 을 이용하여 데이터베이스를 생성하는 방법이다.

일단 Firebird를 설치하고 isql을 실행시켜 데이터베이스 생성 스크립트를 실행을 하면 아래와 같은 에러 메세지를 보게 된다.

C:\Program Files\Firebird\Firebird_2_1\bin>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'e: est.fdb';
Statement failed, SQLCODE = -902
Your user name and password are not defined. Ask your database administrator to
set up a Firebird login.


이 메세지는 사용자 이름과 암호를 설정하지 않아서 발생하는 에러이다. 사용자 이름과 암호를 설정하는 방법은 몇가지가 있다. 그중에서 환경 설정에 지정하는 방법과 isql 을 실행할 때 사용자 이름과 암호를 명시하는 방법이 있다.

우선 전자의 경우 도스 명령어의 Set 명령을 이용하여 사용자 이름과 암호를 지정하고 isql을 실행하여 데이터베이스를 생성하는 방법이다.

C:\Program Files\Firebird\Firebird_2_1\bin>SET ISC_USER=sysdba

C:\Program Files\Firebird\Firebird_2_1\bin>SET ISC_PASSWORD=masterkey

C:\Program Files\Firebird\Firebird_2_1\bin>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'e: est.fdb';
SQL>


두 번째로 isql 실행시 사용자 이름과 암호를 지정하는 방법이다.

C:\Program Files\Firebird\Firebird_2_1\bin>isql -user sysdba -password masterkey

Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'e: est1.fdb';
SQL>

Original Post : http://neodreamer-dev.tistory.com/340