Set Oracle8i full-text search on a UNIX server (1)

Source: Internet
Author: User

Due to work needs, I set Oracle Intermedia on HP UX And sortium to implement full-text search. It is currently in use. There are many problems and experiences in the setup process. This article is based on Oracle 8.1.6 and 8.1.7, and cannot be applied to other versions.
Currently, full-text retrieval is supported by almost all mainstream databases. Previously, I implemented it on SQL server 2000, which is very simple and convenient. However, it usually takes more than a dozen hours to create a full-text search index. The creation and maintenance of full-text search in Oracle is much faster. It takes only 20 minutes to create an index for a table with 0.65 million records, and only 1 minute for synchronization. But the setting is much more complicated.
I. setup process
1. First, check whether intermedia is installed in your database.
This can be done by checking whether there are ctxsys users and ctxapp roles (role). If you do not have this user and role, it means that the intermedia function is not installed when your database is created. You must modify the database to install this function.
Modification Process:
Run $ ORACLE_HOME/bin/dbassist and select 'modify database'. Then, select both j server and intermedia to install intermedia at the same time when selecting the database function ). we strongly recommend that you back up the entire database before making this change.

2. Set extproc
Oracle implements intermedia through the so-called 'external call function' (external procedure). Therefore, setting extproc correctly is a key step.
First, you must configure listener to enable it to listen to requests called by intermedia. You can run $ ORACLE_HOME/bin/netassit to configure the listener. You can also manually modify the configuration file $ ORACLE_HOME/network/admin/listener. ora and restart listener. The following example shows how to manually modify the configuration file.
Open the listener. ora file. Before modification, the following content is usually assumed to use the default listener ):
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = MYDATABASE) (PORT = 1521 ))
)

SID_LIST_LISTENER =
(SID_DESC =
(GLOBAL_DBNAME = mydatabase. world)
(ORACLE_HOME =/u01/app/oracle/product/8.1.6)
(SID_NAME = mydatabase)
)

Extproc has not been configured for this listener. Therefore, you need to add a listener to extproc by adding description and sid_desc respectively. The modified listner. ora is as follows:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = MYDATABASE) (PORT = 1521 ))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC ))

)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = mydatabase. world)
(ORACLE_HOME =/u01/app/oracle/product/8.1.6)
(SID_NAME = mydatabase)
)
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME =/u01/app/oracle/product/8.1.6)
)
)

Note that the above host, global_dbname, sid_name, oracle_home should fill in the actual value of your database, but the actual value of program must be extproc.
Configure the tnsnames. ora file on the server. The file is located under $ ORACLE_HOME/network/admin. You can also configure it by running netasst.
Add the following to the tnsnames. ora file:
EXTPROC_CONNECTION_DATA, EXTPROC_CONNECTION_DATA.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC ))
)
(CONNECT_DATA =
(SID = PLSExtProc)
)
)
Note that the KEY and SID must be the same as the key and sid_name in listener. ora.
After the modification, restart listener (stop WITH lsnrctl and then lsnrctl start). Then, use tnsping to check whether the configuration is correct:
Tnsping extproc_connection_data or
Tnsping extproc_connection_data.world:
Attempting to contact (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC) OK140 millisecond)
Otherwise, check your two files and note that you must restart listener after modification, but you do not need to restart the database.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.