Ozeki NG SMS Gateway logo OZEKI NG SMS Gateway
"The World's most reliable SMS gateway software!"
info@ozekisms.com
Tel.: +36 1 371 0150
SMS Gateway to send SMS via GSM modem or IP SMS connection Overview SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Quick start SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Download SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Manual SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection How to buy SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection FAQ SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Contact Us SMS Gateway to send SMS via GSM modem or IP SMS connection
OZEKI NG SMS Gateway - Product Guide

MSSQL Contents | SearchCommand prompt

Home > Product Manual > Installation Guide > Users and applications > SMS from/to database > MSSQL > SQL Express

SMS Gateway SMS Gateway Home

  Product Manual
  Introduction
  SMS technology
  Installation Guide
  Prerequisites
  Download Information
  Installation Steps
  Service Provider Connections
  Users and applications
  Standard user
  SMPP user
  SMS from/to database
  MSSQL
  SQL Express
  Command prompt
  Connection problem
  Create user
  SQL Server 2005 remote connection
  MSSQL Server 2008 Connection
  MSSQL Server 2012/2014 Connection
  International characters
  MySQL
  Oracle
  Sybase SQL Anywhere
  PostgreSQL
  Pervasive SQL
  Date Format Strings
  Scheduled SMS
  SQL templates
  Informix
  Access
  Video
  Connection string builder
  Keywords
  MS SQL high speed
  Oracle High Speed
  SQL statements
  Polling technology
  Dynamic Keywords
  Dynamic SMPP parameters
  Autoreply SMS from database
  Autoreply SMS using a script
  Simple autoreply SMS
  SMS from/to file
  SMS through E-mail
  SMS via HTTP Request
  SMS via colour protocol
  Application starter SMS
  SMS Voting
  SMS from MS Outlook
  SMS from/to FTP server
  PDF Request in SMS
  SMS to WCF service
  SMS Forwarder
  RSS to SMS
  Linux
  User Guide
  Developers Guide
  Examples and Solutions
  Appendix
  FAQ
  Feature list
  Commercial Information
  Search
  Cookie policy
 
Automated phone calls?
Ozeki Phone System XE VoIP PBX software is an advanced PBX built for automated voice calls and 2 way SMS messaging. It has outstanding APIs for software developers. It can be used for:

Phone calls from SQL
Phone calls from HTTP
Voice and SMS applications

Callcenter developers
If you are working on telephone solutions, please check out the Ozeki VoIP SIP SDK.
It can be used to create VoIP client and server software.

Contact Us!
If you wish to get further information, do not hesitate to contact us!

E-mail: info@ozekisms.com

If you have a technical question, please submit a support request on-line.

Send SMS messages using Microsoft SQL Express

Video tutorial: Send and receive SMS from SQL Express (part 1/4, Install and configure SQL Express)
Video tutorial: Send and receive SMS from SQL Express (part 2/4, Create database layout)
Video tutorial: Send and receive SMS from SQL Express (part 3/4, Configure Ozeki NG database user)
Video tutorial: Send and receive SMS from SQL Express (part 4/4, Send a test message)

On this page you can get the necessary information to configure Microsoft SQL Express database server for SMS messaging. This page is an extension to the How to send SMS from an database server guide. The solution uses the Ozeki NG - SMS Gateway software installed on your PC.

To setup your system, first you need to install and configure Ozeki NG SMS Gateway for SMS messaging. After Ozeki NG is configured for SMS messaging, you can open it's management console and you can install a database user in it. This database user will make SMS sending and receiving possible from your SQL Express database server. The database user will require you to provide the database connection type and the database connection string. For SQL Express you will have to use the following parameters:

Connection type:
OleDb

Connection string:
Provider=SQLNCLI;Server=.\SQLEXPRESS;MultipleActiveResultSets=True;User ID=ozekiuser;password=ozekipass;Database=ozeki;Persist Security Info=True

After you have configured the database user, you need to create the database layout in SQL express to be able to send and receive SMS messages by using SQL INSERT and SELECT statements. You can create the database layout by opening a windows command prompt (Start->Run->cmd.exe), and starting the SQL Command interpreter by typing:

C:\sqlcmd -S .\SQLExpress

Once the SQL command interpreter is running, you should enter the following commands. If the command interpreter could not connect to SQL express, try the instructions provided on the How to connect to SQL Express using the SQL command line utility page.


create database ozeki
GO

use ozeki
GO

CREATE TABLE ozekimessagein (
 id int IDENTITY (1,1),
 sender varchar(30),
 receiver varchar(30),
 msg nvarchar(160),
 senttime varchar(100),
 receivedtime varchar(100),
 operator varchar(30),
 msgtype varchar(30),
 reference varchar(30),
);

CREATE TABLE ozekimessageout (
 id int IDENTITY (1,1),
 sender varchar(30),
 receiver varchar(30),
 msg nvarchar(160),
 senttime varchar(100),
 receivedtime varchar(100),
 operator varchar(100),
 msgtype varchar(30),
 reference varchar(30),
 status varchar(30),
 errormsg varchar(250)
);

GO

sp_addLogin 'ozekiuser', 'ozekipass'
GO

sp_addsrvrolemember 'ozekiuser', 'sysadmin'
GO

Figure 1 - SQL Create table script

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.



After the database layout has been created you are ready to send your first SMS. To send your first SMS message you should insert a record into the ozekimessagout database table. You can use the following SQL command to achieve this:

insert into ozekimessageout (receiver,msg,status) values ("+44111223465","Hello
 world","Send");
GO


Hint: You can download SQLExpress free of charge from the following URL: http://msdn2.microsoft.com/en-us/express/aa718378.aspx

Trouble shooting

On some systems, you might have difficulties connecting to SQL Express. This is the error message you might experience:

ERROR 6001: Database connection error: The 'SQLNCLI' provider is not registered on the local machine..


SQLNCLI is installed with SQL Server Native Client. This error indicates that this is not installed on your machine. You can try to change the provider to "sqloledb" to use OLE DB and see if that works. In this case your connection string would be:

Connection type:
OleDb

Connection string:
Provider=SQLOLEDB;Data Source=.\SQLEXPRESS;User ID=ozekiuser;password=ozekipass;Database=ozeki;Persist Security Info=True


Or change the whole connection string to ODBC and use the following connection string:

Connection type:
ODBC

Connection string:
Driver={SQL Server};Server=.\SQLEXPRESS;User ID=ozekiuser;password=ozekipass;Database=ozeki;Persist Security Info=True;


Or change the whole connection string to SQLServer and use the following connection string:

Connection type:
SQLServer

Connection string:
Server=.\SQLEXPRESS;User ID=ozekiuser;password=ozekipass;Database=ozeki;Persist Security Info=True;


One of these should work.

Microsoft SQL Server 2008

If you use Microsoft SQL Server 2008, apply the following connection string:

Connection string:
Provider=SQLOLEDB.1;Data Source=YourHostName;Persist Security Info=False;Integrated Security=SSPI;User ID=UserName;Password=User'sPassword;Initial Catalog=DatabaseName

Dig deeper!
People who read this also read...





Next page: Command prompt
Copyright © 2000 - 2017 Ozeki Informatics Ltd.
All rights reserved

Software PBX for Windows | VoIP SDK   |   Legal information   |   Privacy policy   |   Terms of use
Please, address your inquiries to info@ozekisms.com