In this guide you can learn
how to send and receive SMS messages using an Oracle database. This guide is
an extension of the general SQL to SMS
configuration guide. It contains Oracle specific information. It is assumed,
that you already have an Oracle database server and the Oracle client
components installed. You also need Ozeki
NG SMS Gateway installed on your
system to have this example work.
Of course you have to replace the 127.0.0.1 IP address to the IP address or the
Data source name of your Oracle
database server, and the username and pwd123 field to the database username
and database password that matches your user account information stored in Oracle.
Once the connection is configured in Ozeki NG, all you have to do is create
two database tables in your Oracle database according to the following
CREATE TRIGGER ozekimessageout_auto BEFORE INSERT on ozekimessageout
for each row
when (new.id is null)
SELECT y.nextval INTO :new.id FROM DUAL;
If you want to work with larger messages, you can increase the size of the msg
field, or you may also change it's data type.
It is strongly recommended to maintain an index in the database
for the 'id' field of the outgoing SMS table to support SQL updates.
If you want to use unicode characters, you should use NVARCHAR2 as the
datatype, you should put "Unicode=True" into the connection string and you
should make sure that the NLS_CHARACTERSET and NLS_LANGUAGE parameters
for your database are set to your language. You may also try to set the
following registry key
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID\NLS_LANG to UTF8
Note: Oracle 8i clients cannot access NVARCHAR2 data in Oracle 9i databases
when the server's national character set is specified as AL16UTF16 (the default
setting for Oracle 9i). Because support for the UTF-16 character set was not
introduced until Oracle 9i, Oracle 8i clients cannot read it.