- Quick Start Guide
- System requirements
- Installation guide
- Mobile networks
- User guide
- Developers guide
- SMS from SQL
- MSSQL SMS
- Oracle SMS
- Connection strings
- Oracle 11g Express
- Oracle Installation
- Create Database
- Configure Database User
- Test Message
- MySQL SMS
- SQL Anywhere
- Microsoft Access
- HTTP API
- PHP SMS API
- C# SMS API
- VB.NET SMS API
- Service providers
SMS from/to Oracle
The connection between Oracle Database and Ozeki SMS Gateway is a perfect solution for SMS messaging. Ozeki SMS Gateway's Database User makes sure that incoming SMS messages can be inserted while outgoing SMS messages can be selected from database tables. Incoming and outgoing messages are handled in separate tables. The solution uses the Ozeki SMS Gateway software installed on your PC.
This page extends the general guide to SMS from/to Database.
You should also make sure that Ozeki SMS Gateway is installed. You should also check if Oracle Database is installed. If Oracle is not installed on your machine, please download the server and client from here. You will see how to store outgoing and incoming SMS messages in your Oracle Database's tables.
You can choose from a wide variety of options to send and receive SMS messages. The most popular hardware option is a mobile phone or GSM modem attached to your computer. Or you can use popular software options which connects through an IP SMS service provider over the internet. For example SMPP, CIMD2 or UCP/EMI are service provider connections. Please set up one of these connections and install a Database User from the top menu of Ozeki SMS Gateway ('Users and applications/Add user or application'). After the Database User has been properly installed and configured, you can connect it to your Oracle Database with a connection string, so it can take control over the tables by using the configured SQL statements. It can insert incoming messages as records into tables or select records for sending outgoing messages to mobile phones.
Each Database Connection needs it's own Database User.
The Database User belonging to an Oracle Database has the following connection string format:
|Connection string type:||Oracle|
|Connection string:||Data Source=127.0.0.1; User ID=username; Password=pwd123;|
In the connection string the 127.0.0.1 IP address should be replaced with the IP address of the machine where Oracle Database server is running and do not forget to use the login credentials belonging to your Oracle Server's account.
By including 'Unicode=True' to the connection string, you can use unicode characters like NVARCHAR2. Make sure that NLS_CHARACTERSET and NLS_LANGUAGE parameters are set to your language. You can also try to set HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID\NLS_LANG registry key to UTF8.
Now the connection should be configured between Ozeki SMS Gateway's Database User and your Oracle Server, so it is time to create two database tables both for incoming and outgoing message by creating a proper database table structure:
Oracle SQL statements:
CREATE TABLESPACE ozeki
|CREATE USER ozeki|
IDENTIFIED BY qwe123
DEFAULT TABLESPACE ozeki;
GRANT DBA TO ozeki;
CREATE TABLE ozekimessagein (
CREATE index index_id1 ON ozekimessagein(id);
CREATE SEQUENCE X;
CREATE TRIGGER ozekimessagein_auto BEFORE INSERT on ozekimessagein
CREATE TABLE ozekimessageout (
CREATE index index_id2 ON ozekimessageout(id);
CREATE SEQUENCE Y;
CREATE TRIGGER ozekimessageout_auto BEFORE INSERT on ozekimessageout
The 'id' field should be maintained to support faster SQL updates.
The size of the message can be set higher than 160 character if it is necessary.
The 'msgtype' field can also be changed.