ORCL172 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.22.51.172)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = RDPCS) ) ) 3.安装GPRS Modem的驱动程序,插上GPRM Modem硬件; 4.安装GPRM Modem的管理程序; 5.创天炫彩的通道配置; 6.在Oracle数据库创建程序所需的数据表,脚本如下: create table MSG_FAILEDBOX ( ID NUMBER not null, OriginMsgID NUMBER not null, ExpressLevel NUMBER default 2 not null , Sender VARCHAR2(100), Receiver VARCHAR2(200) not null, MsgType NUMBER not null, MsgTitle VARCHAR2(500), MMSContentLocation VARCHAR2(500), SendTime DATE default SYSDATE not null, CommPort NUMBER not null, ActualSendTime DATE not null, FailedReason VARCHAR2(500) ); alter table MSG_FAILEDBOX add constraint MSG_FAILEDBOX_PK11075707620945 primary key (ID) using index pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); create table MSG_INBOX ( ID NUMBER not null, Sender VARCHAR2(100) not null, MsgType NUMBER not null, MsgTitle VARCHAR2(500), MMSUrl VARCHAR2(200), MMSContentLocation VARCHAR2(4000), MsgArrivedTime DATE not null, MMSDownloadedTime DATE, MMSDownloadedState NUMBER default 0 not null , CommPort NUMBER not null ); alter table MSG_INBOX add constraint MSG_INBOX_PK21075710238559 primary key (ID) using index pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); create table MSG_OUTBOX ( MsgID NUMBER not null, ExpressLevel NUMBER default 2 not null , Sender VARCHAR2(100), Receiver VARCHAR2(200) not null, MsgType NUMBER default 1 not null , MsgTitle VARCHAR2(500), MMSContentLocation VARCHAR2(500), SendTime DATE default SYSDATE not null, CommPort NUMBER default 0 not null ); alter table MSG_OUTBOX add constraint MSG_OUTBOX_PK21075710226041 primary key (MsgID) using index pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); create table MSG_SENTBOX ( ID NUMBER not null, OriginMsgID NUMBER not null, ExpressLevel NUMBER not null, Sender VARCHAR2(100), Receiver VARCHAR2(200) not null, MsgType NUMBER not null, MsgTitle VARCHAR2(500), MMSContentLocation VARCHAR2(500), SendTime DATE not null, CommPort NUMBER not null, ActualSendTime DATE not null, ReceiveMMSTime DATE, MMSMessageID VARCHAR2(200) ); alter table MSG_SENTBOX add constraint MSG_SENTBOX_PK21075710226041 primary key (ID) using index pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); create sequence MSG_FAILEDBOX_ID_SEQ minvalue 1 maxvalue 999999999 start with 81 increment by 1 cache 20; create sequence MSG_INBOX_ID_SEQ minvalue 1 maxvalue 999999999 start with 81 increment by 1 cache 20; create sequence MSG_OUTBOX_ID_SEQ minvalue 1 maxvalue 999999999 start with 141 increment by 1 cache 20; create sequence MSG_SENTBOX_ID_SEQ minvalue 1 maxvalue 999999999 start with 81 increment by 1 cache 20; CREATE OR REPLACE TRIGGER "SET_MSG_FAILEDBOX_ID" BEFORE INSERT ON "MSG_FAILEDBOX" FOR EACH ROW DECLARE NEXT_MSG_FAILEDBOX_ID NUMBER; BEGIN SELECT MSG_FAILEDBOX_ID_SEQ.NEXTVAL INTO NEXT_MSG_FAILEDBOX_ID FROM DUAL; :NEW.ID := NEXT_MSG_FAILEDBOX_ID; END; / CREATE OR REPLACE TRIGGER "SET_MSG_INBOX_ID" BEFORE INSERT ON "MSG_INBOX" FOR EACH ROW DECLARE NEXT_MSG_INBOX_ID NUMBER; BEGIN SELECT MSG_OUTBOX_ID_SEQ.NEXTVAL INTO NEXT_MSG_INBOX_ID FROM DUAL; :NEW.ID := NEXT_MSG_INBOX_ID; END; / CREATE OR REPLACE TRIGGER "SET_MSG_OUTBOX_ID" BEFORE INSERT ON "MSG_OUTBOX" FOR EACH ROW DECLARE NEXT_MSG_OUTBOX_ID NUMBER; BEGIN SELECT MSG_OUTBOX_ID_SEQ.NEXTVAL INTO NEXT_MSG_OUTBOX_ID FROM DUAL; :NEW.MsgID := NEXT_MSG_OUTBOX_ID; END; / CREATE OR REPLACE TRIGGER "SET_MSG_SENTBOX_ID" BEFORE INSERT ON "MSG_SENTBOX" FOR EACH ROW DECLARE NEXT_MSG_SENTBOX_ID NUMBER; BEGIN SELECT MSG_SENTBOX_ID_SEQ.NEXTVAL INTO NEXT_MSG_SENTBOX_ID FROM DUAL; :NEW.ID := NEXT_MSG_SENTBOX_ID; END; / commit; 7.创天炫彩的数据库配置: 使用方法为:向MSG_Outbox表(信息发送表)插入想要发送的短信内容,GRRS Modem硬件中的程序会把表中的数据发送到目标手机号,同时将这条记录从MSG_Outbox表删除。消息发送成功,将这条记录存储到MSG_Sentbox表(信息发送成功表);消息发送失败,将这条记录存储到MSG_Failedbox表(信息发送失败表)。MSG_Inbox表用于存储接收到的彩信/短信。
到此,短信服务器的运行环境搭建成功,希望我的分享能够帮助大家进步。 |
2021年4月10日,金丰集团与韩国亚拓士及浙江旭玩达成战略合作,...详情
正统新派回合手游《大秦帝国OL》全新版本即将来袭!新装备、新玩...详情
每个人心中都装着一个明星梦!时光荏苒,回头一看,愕然发现你心...详情
请发表评论