Tuesday, February 3, 2009

Working with the Local Database

Us developers all have local databases we use to make changes before checking them into the server, right? "No, I develop directly on the server," is not the right answer. Sometimes it's useful to work directly with the local database to view or change data. Here are some basics to get your started.

Logging In

Siebel ships with a dandy SQL client you can use to log into your local database interactively. The program is located in both the "..\tools\bin" and "..\web client\bin" directories, called dbisqlc.exe.

Start this program and you'll enter directly onto a "Login" tab where you can fill in your username and password. In the "Database" tab, specify the "Database file", pointing to the local database to which you want to connect.

Once connected, running SQL statements is pretty self-explanatory.

Logging in as SIEBEL

To make schema changes, log in as SIEBEL, using the same password as when you log in as yourself. By default, the passwords are set to the same value when you get your extract.

Dropping a Column

After you delete a column from a table in the Siebel Repository, applying that change will not drop the column in your database. You'll have to drop it manually using this command:
alter table <table name> drop <column name>
Notice that there is no "column" keyword before the column name.

Unlocking Projects

When you get a locked project from the server, its copy remains locked on your local database as well. If you want to locally test some changes in that project, you're going to have to forcibly unlock it using this SQL update statement:
update s_project set locked_flg = 'N' where name = <project name>
Changing your Password

Passwords are set when you extract the database, but can be changed using this command:
grant connect to <username> identified by <password>
If you change your own password, don't forget to set SIEBEL's password to the same; otherwise you might forget it. You'll have to log in as SIEBEL to change SIEBEL's password. SIEBEL can also change your password, so you might as well log in as him.

2 comments:

  1. There is one util DDLSYNCH which could be used for dropping the column. I have not used but Iguess could be used rather than using this explicit SQL statements

    ReplyDelete