Oracle® Sensor Edge Server Guide 10g (10.1.3) Part Number B28979-01 |
|
|
View PDF |
This chapter provides information on installing Oracle Sensor Edge Server. Topics include:
"Upgrading or Installing Oracle Sensor Edge Server From a 10.1.2 OC4J Instance"
"Installing Oracle Sensor Edge Server From a 10.1.3 OC4J Instance"
"Manually Configuring Sensor Data Repository and Sensor Data Streams in Release 10.1.3"
"Connecting to an Existing Sensor Data Repository in Release 10.1.2"
"Connecting to an Existing Sensor Data Streams in Release 10.1.2"
The hardware requirements for Oracle Sensor Edge Server are the same as the hardware requirements for Oracle Application Server. Refer to the Oracle Application Server 10g Installation Guide for your platform for the specific hardware requirements.
Oracle Sensor Edge Mobile requires Pocket PC 2003 or later devices. Oracle Sensor Edge Mobile includes device drivers for Symbol 9000G and Intermec IP3 devices for RFID and barcode. Sensor Edge Mobile requires less than 150KB of program storage, and less than 1MB of memory.
Table 1-1 lists minimum memory and disk space requirements.
Oracle Sensor Edge Server requires the following:
Unix, Linux, Windows 2000, Windows XP, or later
Sensor Data Streams and Sensor Data Repository require an enterprise version of Oracle Database (version 9.2.0.6 or later). Oracle Database 10g Release 2 is recommended.
To install and use Sensor Data Streams, Oracle Database must be running in ArchiveLog mode, with automatic archiving enabled. Refer to the appropriate version of the Oracle Database Administrator's Guide for instructions on changing to ArchiveLog mode, and for instructions on enabling automatic archiving. Note that these instructions vary depending on the Oracle Database version you are using, so be sure to consult the version of the Oracle Database Administrator's Guide that corresponds to the Oracle Database version you are using.
Sun Java2 SDK, Standard Edition, version 1.4.2 or later
Oracle Containers for J2EE (OC4J), version 10.1.3 or later
Note: For backward compatibility with 10.1.2 OC4J instances:
|
J2EE Server and Process Management, 10.1.3 (Not with Oracle HTTP Server or WebCache)
All other software requirements are the same as they are for Oracle Application Server
Additionally, Sensor Data Repository and Sensor Data Streams must have encoding set to UTF-8.
For Oracle Sensor Edge Mobile, the software requirements are as follows:
Pocket PC 2003 or later
Pocket IE 3.0.3 browser or later
Before you install Oracle Sensor Edge Server, you must install OC4J. In previous releases, OC4J was packaged as part of the Oracle Sensor Edge Server installation. In release 10.1.3, to make upgrading OC4J easier, it is not included as part of the Oracle Sensor Edge Server installation and must be installed before you install Oracle Sensor Edge Server.
You can install OC4J when you install Oracle Application Server. In the Oracle Universal Installer for Oracle Application Server, you must select Advanced Installation Mode, and then select the option for J2EE Server and Process Management. Refer to the Oracle Application Server Installation Guide for your platform for more information on installing Oracle Application Server.
Once you complete the OC4J installation, you are ready to install Oracle Sensor Edge Server.
If you are installing release 10.1.2 for backward compatibility, follow these installation steps:
After installing release 10.1.2.x.x companion CD OUI (or after unzipping oc4j_extended.zip), navigate to ORACLE_HOME/j2ee/home.
Run java -jar oc4j.jar -install.
When prompted for a password, enter an administrator password for the OC4J instance.This is the password that you will use to log in to the management UI, and it is also required for installation of Oracle Sensor Edge Server.
If you already have a 10.1.2 instance of OC4J installed, you can install Oracle Sensor Edge Server by following the steps for "Installing Oracle Sensor Edge Server From a 10.1.3 OC4J Instance". During installation, Oracle Universal Installer will ask you to create the OC4J administrator password. This is the password used to install and administer OC4J.
If you already have a previous version of Oracle Sensor Edge Server installed, you will not be able to upgrade it. You must install the new version by following the steps for "Installing Oracle Sensor Edge Server From a 10.1.3 OC4J Instance". You will then need to manually recreate your Sensor Edge Server settings in the new version.
To install Oracle Sensor Edge Server from a 10.1.3 instance of OC4J:
Insert the companion CD and start Oracle Universal Installer.
When the Welcome screen appears, click Next.
In the Specify File Locations screen, under Destination, enter a name for the installation and the path where you want to install Oracle Sensor Edge Server. Oracle Sensor Edge Server must use the same oracle_home as OC4J. Then click Next.
In the Select Installation Type screen, choose Sensor Edge Server and click Next.
In the J2EE Container (OC4J) Password screen, enter the password for the OC4J administrator, and click Next. This is the administrator password you defined when you installed OC4J.
In the Sensor Data Repository Installation screen, choose Yes if you want to connect the Sensor Edge Server to a Sensor Data Repository. If you choose Yes, you will be able to create a new Sensor Data Repository or connect to an existing one. If you choose No, skip to 10. If you choose No, and you later want to use Sensor Data Repository, you can manually configure it by following the steps in "Connecting to an Existing Sensor Data Repository in Release 10.1.2" or "Manually Configuring Sensor Data Repository and Sensor Data Streams in Release 10.1.3". After making your choice, click Next.
In the Sensor Data Repository Configuration screen, choose whether you want to connect to a new Sensor Data Repository or connect to an existing one, and click Next.
In the SDR Database Connection Information screen, enter the requested information for the Sensor Data Repository, and click Next.
In the Sensor Data Repository Password screen, specify the password you want to use for the Sensor Data Repository schema, and click Next. (This screen does not appear if you chose to connect to an existing Sensor Data Repository in 7.) The schema must be installed under the edge user in the database.
In the Sensor Data Streams Installation screen, choose Yes if you want to connect the Sensor Edge Server to Sensor Data Streams. If you choose Yes, you will be able to create a new Sensor Data Streams schema or connect to an existing one. If you choose No, skip to 14. If you choose No, and you later want to use Sensor Data Streams, you can manually configure it by following the steps in "Connecting to an Existing Sensor Data Streams in Release 10.1.2" or "Manually Configuring Sensor Data Repository and Sensor Data Streams in Release 10.1.3". After making your choice, click Next.
In the Connect to an Existing SDS screen, choose whether you want to create a new Sensor Data Streams schema or connect to an existing one, and click Next.
In the Sensor Data Streams Configuration screen, enter the database SYS password and TNS connection string, and click Next.
In the Sensor Data Streams Password screen, specify the password you want to use for Sensor Data Streams, and click Next. (This screen does not appear if you chose to connect to an existing Sensor Data Streams schema in 11.) The schema must be installed under the edge user in the database.
In the Summary screen, verify the installation options, and click Install.
In the Configuration Assistants screen, wait for the configuration assistants to finish, and click Next.
In the End of Installation screen, click Exit.
The Oracle Sensor Edge Server Welcome screen appears.
If there are errors during installation, you can examine the Oracle Sensor Edge Server log files located in oracle_home/edge
(createedgeuser_SDR.log
, deploySDR.log
, createedgeuser_SDS.log
), and the Oracle Universal Installer log files.
To uninstall Oracle Sensor Edge Server, you must use Oracle Universal Installer. In the Oracle Universal Installer Welcome screen, click Deinstall Products to uninstall.
Uninstalling Sensor Data Repository or Sensor Data Streams removes the temp files that were used to deploy the schemas, but the schemas themselves are not removed from the database.
To verify that your installation was successful, perform the following tasks:
display and navigate through the screens of the Sensor Edge Server (SES) console
test the database connection
To display the SES console:
Determine the port number that the HTTP service is listening on (for example, 8888). If you do not know the port number, do the following:
Open a command window, and change directories to oracle_home/opmn/bin.
Type opmnctl status -l
. The port number for the HTTP service is displayed.
Note: To determine the port number for a 10.1.2 OC4J instance:
See Oracle Application Server Containers for J2EE User's Guide for more information. |
Open a browser window and enter the URL for the Sensor Edge Server console in the form of http://localhost:port_number/edge/, where port_number is the port number for the http service.
On the Oracle Sensor Edge Server Login page, enter the username and password for the Sensor Edge Server administrator. The default username is oc4jadmin. For password, enter the password for the OC4J administrator (as specified when you installed OC4J).
You can test the database connection to verify that installation was successful. To connect to the Sensor Data Repository using SQL*Plus, do the following:
Configure tnsnames.ora (located in /network/admin/) to set up the TNS connection string for the database. For example:
BAR.US.ORACLE.COM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = foo.us.oracle.com)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = BAR) ) )
Connect to the schema, always using the username edge for sda_usr. For example, if the username is edge and the password is sda_pwd, enter:
sqlplus edge/sdr_pwd@BAR
To check if there are events coming in, verify that the number of rows in view edg_event_vw increases as events come in, as follows:
select count(*) from edg_event_vw
The count of events should increase as events are sent to the repository. In the case of a clean installation with no configuration, there should still be some events sent over, such as the edge server starting event.
Two other tables can be used for diagnostic purposes: edg_diag_tab (for checking device related error and status messages) and edg_log (for checking internal errors encountered in processing events).
To connect to the schema using SQL*Plus, do the following:
Configure tnsnames.ora to set up the TNS connection string for the database. For example:
BAR.US.ORACLE.COM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = foo.us.oracle.com)(PORT = 1521))) ) (CONNECT_DATA = (SERVICE_NAME = BAR) ) )
Connect to the schema, always using the username edge for sds_usr. For example, if the username is edge and the password is sds_pwd, enter:
sqlplus edge/sds_pwd@BAR
The sds_pwd is the password entered for Sensor Data Streams during installation.
To check if there are events coming in, verify that the number of rows in sda_observations increases as events come in, as follows:
select count(*) from sda_observations
The count of events should increase as events are sent to the repository.
For OC4J 10.1.3, you can test the JDBC connection to the Sensor Data Repository by examining the JNDI resource using OC4J Enterprise Manager as follows:
Login into OracleAS Enterprise Manager (http://localhost:oc4j_web_port_number/em/) by entering the OC4J administrator and password.
Click the Members tab and then click the OC4J instance (per default home).
Select Administration.
If needed, expand Services.
Click the Go to Task icon for JDBC Resource. The JDBC Resources page appears.
Click the Test Connection icon for edge/SensorDataRepositoryDS.
Click Continue.
Enter select count (*) from edg_event_vw
in the SQL Statement field to verify that events are coming in and that the number of rows in the view edg_event_vw
increase as these events come in.
The event count should increase as events are sent to the Sensor Data Repository. In the case of a clean installation with no configuration, there should still be some events sent over, such as the Oracle Sensor Edge Server starting event.
To verify that events are coming in and that the number of rows in sda_observations
increases as events come in, enter select count (*) from sda_observations in the SQL Statement field.
Click Test. The connection status displays under Confirmation (Connection to "edge/SensorDataRepositoryDS" established successfully for all OC4J instances in the Group.) An error displays if the connection has not been established.
Note: For OC4J 10.1.3, you can test the OC4J instance directly from OC4J Enterprise Manager. In addition, using the SES Console, you can set the log level of the Oracle Sensor Edge Server instance to All and then check the log at startup to ensure that it connects properly. The View Log page displays the errors from the Sensor Data Repository that indicate problems. For more information on setting the log level, see "Setting the General Information for the Oracle Sensor Edge Server Instance" and "Viewing Log Information".For OC4J 10.1.2, you cannot test the connection using Enterprise Manager. However, if the log does not report errors from the Sensor Data Repository at startup, then the connection is successful. If the log level of the Oracle Sensor Edge Server instance is set to All, then the SES Console's View Log page displays any SQL errors. |
To install Oracle Sensor Edge Mobile:
Insert the companion CD and start Oracle Universal Installer.
When the Welcome screen appears, click Next.
In the Specify File Locations screen, under Destination, enter a name for the installation and the path where you want to install Oracle Sensor Edge Mobile. Oracle Sensor Edge Mobile must use the same oracle_home as OC4J. Then click Next.
In the Select Installation Type screen, choose Sensor Edge Mobile and click Next.
In the Summary screen, verify the installation options, and click Install.
The installer places the following .CAB files into oracle_home/edge:
OracleEdgeMobile.PPC420_StrongARM-XScale.CAB: Installer for ARM or XScale devices. To run the installer on a Pocket PC device, follow the instructions under "Installing and Starting Oracle Sensor Edge Mobile on a Pocket PC Device".
OracleEdgeMobile.PPC420_i686.CAB: Pocket PC emulator for use with Windows 2000/XP computers, to allow code testing when no Pocket PC device is available. To install the emulator, follow the instructions described in "Installing the Oracle Sensor Edge Mobile Emulator".
To install Oracle Sensor Edge Mobile on a Pocket PC device:
Using ActiveSync, load OracleEdgeMobile.PPC420_StrongARM-XScale.CAB (located in oracle_home/edge) onto the Pocket PC device, and click on it to install it.
To start the Sensor Edge Mobile background service from the emulator screen, choose Start, then choose Programs, and then click the Start EdgeMobile Service shortcut. The background service should now be running.
To verify that the background service is running, open a File Explorer window, navigate to the \EdgeMobile\html_samples directory, and click admin.html. The Sensor Edge Mobile Administration page should appear as shown in Figure 1-1.
Figure 1-1 Sensor Edge Mobile Administration Page
Verify that the System status is "Running". If System status is not "Running", click View log to examine the log file for errors. The log file is shown in Figure 1-2.
By default, the Symbol 900G drivers are loaded on the Pocket PC device. The following additional drivers are provided:
EdgeMobileConfig_INTERMEC.xml: Intermec drivers configuration file.
EdgeMobileConfig_SYMBOL.xml: Symbol drivers configuration file.
EdgeMobileConfig_SIMULATOR.xml: Simulator drivers configuration file.
EdgeMobileConfig_KEYBOARD.xml: Keyboard dispatcher configuration file.
To load a different driver, rename the appropriate driver configuration file to EdgeMobileConfig.xml and restart the Sensor Edge Mobile service.
To shut down the Sensor Edge Mobile service:
Navigate to the \EdgeMobile\html_samples directory and open the file admin.html.
Click Shutdown System.
Click OK in the Confirmation dialog box.
Verify that the System status is "Stopped".
If you are developing applications to use with Oracle Sensor Edge Mobile, you can run the Sensor Edge Mobile emulator on a Windows 2000 or Windows XP computer. Using the emulator allows you to test your code when no Pocket PC device is available.
To install the Oracle Sensor Edge Mobile emulator:
If you have not already done so, install Oracle Sensor Edge Mobile as described in "Installing Oracle Sensor Edge Mobile".
Download the SDK for Windows Mobile 2003-based Pocket PCs from this location: http://www.microsoft.com/downloads/details.aspx?familyid=9996b314-0364-4623-9ede-0b5fbb133652&displaylang=en
Install the SDK on a Windows 2000 or Windows XP computer. The Pocket PC emulator is part of the SDK.
To start the Pocket PC emulator from the Windows Start menu, choose Microsoft Pocket PC 2003 SDK, and then choose Pocket PC Emulator.
Once the emulator starts, choose Emulator, and then choose Folder Sharing.
Click Browse, and browse to an existing folder on your computer, and click OK.
In the Folder Sharing dialog box, click OK.
In the emulator window, choose Start, and then choose Programs.
Click the File Explorer icon.
In the File Explorer, select My Device.
Select the folder that you made a shared folder in Step 6.
Load the OracleEdgeMobile.PPC420_i686.CAB file into the shared folder and click on it in the emulator to install it. This file is located in oracle_home/edge.
If you want to use Sensor Data Repository or Sensor Data Streams in Release 10.1.3, but you did not configure them when you installed Sensor Edge Server, you can manually deploy them using the procedures described in this section. This section contains the following topics:
"Connecting Oracle Sensor Edge Server to Sensor Data Repository"
"Connecting Oracle Sensor Edge Server to Sensor Data Streams"
If you have already deployed Sensor Data Streams, you can skip this section, because the Sensor Data Streams schema includes everything necessary to deploy Sensor Data Repository.
To manually deploy Sensor Data Repository, use the following procedure:
Create the edge user (schema) in your database to host the Sensor Data Repository schema. To do this, log in as system with SQL*Plus and run the create_edg_sda_user.sql
script located in oracle_home/edge/stage/sql/10.1.3.
When you are prompted for an input value, enter the password you want to use for the edge schema.
Log in to SQL*Plus as the edge user with the password you just chose, and run the edg_sda_with_edgeuser.sql
script located in oracle_home/edge/stage/sql/10.1.3.
Follow the procedure described in "Connecting Oracle Sensor Edge Server to Sensor Data Repository".
To manually connect Sensor Edge Server to Sensor Data Repository, use the following procedure:
Make sure that OC4J is running. To start OC4J, open a command window, and change directories to oracle_home/opmn/bin. Then type opmnctl startall
.
Note: For OC4J 10.1.2, start OC4J by navigating toORACLE_HOME/j2ee/home and then running Java_HOME/bin/java -jar oc4j.jar . JDK 1.4.2 should already be installed on the machine. |
Open a browser window and enter the URL for Oracle Enterprise Manager in the form of http://localhost:oc4j_web_port_number/em/. Note that the OC4J web port may have an Apache listener, in which case you must use the port Apache is listening on.
Log in to Oracle Enterprise Manager using the OC4J password you entered in Oracle Universal Installer.
Navigate to the OC4J Home page, and click Administration.
Scroll down to JMX, click the icon next to System MBean Browser, and navigate to oc4j>J2EEServer>standalone>J2EEApplication>default.
Click Operations, then click createNativeDataSource. You use this screen to create the data source to connect to the database on which Sensor Data Repository schema is installed.
Enter the following values:
dataSourceName: edge/SensorDataRepositoryDS
user: edge
password: enter the password you chose when you ran the create_edg_user.sql
script
jndiLocation: edge/SensorDataRepositoryDS
loginTimeout: 20
dataSourceClass: oracle.jdbc.pool.OracleDataSource
URL: enter the jdbc URL to your database. The URL should look something like jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=yourhost.us.oracle.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=your_service_name)))
Log in to the Sensor Edge Server administration console.
On the first page, for Use Archive, select Yes.
Restart OC4J.
Before manually deploying Sensor Data Streams, Oracle Database must be running in ArchiveLog mode, with automatic archiving enabled. Refer to the appropriate version of the Oracle Database Administrator's Guide for instructions on changing to ArchiveLog mode, and for instructions on enabling automatic archiving. Note that these instructions vary depending on the Oracle Database version you are using, so be sure to consult the version of the Oracle Database Administrator's Guide that corresponds to the Oracle Database version you are using.
To manually deploy Sensor Data Streams if you've already created a Sensor Data Repository, use the following procedure:
Use SQL*Plus to connect to the database as sysdba, by running sqlplus /nolog
.
Run sqlplus connect sys/
your_pwd
@your_db
as sysdba
.
Run the script grant_edg_user.sql
, located in oracle_home /edge/stage/sql/10.1.3.
Follow the procedure described in "Connecting Oracle Sensor Edge Server to Sensor Data Streams".
To manually deploy Sensor Data Streams if you have not already created a Sensor Data Repository, use the following procedure:
Run the script create_edg_user.sql
, located in oracle_home /edge/stage/sql/10.1.3. When prompted, enter the password you want to use for the edge schema.
Run sqlplus connect edge/
your_edge_user_pwd
@your_db
.
Run the script edg_create_streams.sql
, located in oracle_home /edge/stage/sql/10.1.3.
When running edg_create_streams.sql
, you may encounter the following error:
drop role edg_user * ERROR at line 1: ORA-01919: role 'EDG_USER' does not exist
You can ignore this error, as it notes that this is the first time an edge schema was installed on this database instance.
Follow the procedure described in "Connecting Oracle Sensor Edge Server to Sensor Data Streams".
Note: Installing Oracle Data Streams on an Oracle9i database instance results in the following error:BEGIN DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE(grantee => 'edge'); END; * ERROR at line 1: ORA-06550: line 1, column 7: PLS-00201: identifier 'DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Because this is a Oracle 10g procedure that does not exist in Oracle9i, you can ignore this error. |
To manually connect Sensor Edge Server to Sensor Data Streams, use the following procedure:
Make sure that OC4J is running. To start OC4J, open a command window, and change directories to oracle_home/opmn/bin. Then type opmnctl startall
.
Note: For OC4J 10.1.2, start OC4J by navigating toORACLE_HOME/j2ee/home and then running Java_HOME/bin/java -jar oc4j.jar . JDK 1.4.2 should already be installed on the machine. |
Open a browser window and enter the URL for Oracle Enterprise Manager in the form of http://localhost:oc4j_web_port_number/em/. Note that the OC4J web port may have an Apache listener, in which case you must use the port Apache is listening on.
Log in to Oracle Enterprise Manager using the OC4J password you entered in Oracle Universal Installer.
Navigate to the OC4J Home page, and click Administration.
Scroll down to JMX, click the icon next to System MBean Browser, and navigate to oc4j>J2EEServer>standalone>J2EEApplication>default.
Click Operations, then click createNativeDataSource. You use this screen to create the data source to connect to the database on which Sensor Data Streams schema is installed.
Enter the following values:
dataSourceName: edge/StreamsDS
user: edge
password: enter the password you chose when you ran the create_edg_user.sql
script
jndiLocation: edge/StreamsDS
loginTimeout: 20
dataSourceClass: oracle.jdbc.pool.OracleDataSource
URL: enter the jdbc URL to your database. The URL should look something like jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=yourhost.us.oracle.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=your_service_name)))
To configure Sensor Edge Server to use the streams dispatcher, log in to the Sensor Edge Server administration console.
Click Change dispatcher, and then select Streams DispatcherV2.
Restart OC4J. The streams dispatcher will attempt to connect to the Sensor Data Streams schema. For more information, see "Setting the Dispatcher for the Oracle Sensor Edge Server Instance" and "Starting and Stopping the Oracle Sensor Edge Server Instance".
If you want to use Sensor Data Repository, but you did not configure it when you installed Sensor Edge Server, you can manually connect to it using the following procedure:
Using a text editor, open the data-sources.xml file. This file is located in oracle_home/j2ee/home/config/.
Add the following xml entry:
<data-source class="com.evermind.sql.DriverManagerDataSource" name=""edge/SensorDataRepositoryDS" location=""edge/SensorDataRepositoryDS" xa-location=""edge/SensorDataRepositoryDSXA" ejb-location=""edge/SensorDataRepositoryDS" connection-driver="oracle.jdbc.driver.OracleDriver" username="edge" password="<password for sdr>" url="<jdbc url for database holding SDR>" inactivity-timeout="100" />
Save and close the data-sources.xml file.
To use Sensor Data Streams, Oracle Database must be running in ArchiveLog mode, with automatic archiving enabled. Refer to the appropriate version of the Oracle Database Administrator's Guide for instructions on changing to ArchiveLog mode, and for instructions on enabling automatic archiving.
If you want to use Sensor Data Streams, but you did not configure it when you installed Sensor Edge Server, you can manually connect to it using the following procedure:
Using a text editor, open the data-sources.xml file. This file is located in oracle_home/j2ee/home/config/.
Add the following xml entry:
<data-source class="com.evermind.sql.DriverManagerDataSource" name=""edge/StreamsDS" location=""edge/StreamsDS" xa-location=""edge/StreamsDSXA" ejb-location=""edge/StreamsDS" connection-driver="oracle.jdbc.driver.OracleDriver" username="edge" password="<password for sds>" url="<jdbc url for database holding SDS>" inactivity-timeout="100" />
Save and close the data-sources.xml file.