Oracle| Program | introduction | Clients are mainly to do three pieces of work: packaging files, write the registry, register environment variables
Description: My Oracle version is 9, test pass on Advanced Server, you can create a database connection normally
1. Packaging files
The catalog results are shown in the following figure
The following is a list of files in my packaging program,
Bin: The most important of course is the bin directory, in my packaging program, requires 29 files:
Network\admin:tnsnames.ora
The contents of the Tnsnames.ora file are as follows: (service_name = Server connection)
ORCL =
(DESCRIPTION =
(Address_list =
(address = (PROTOCOL = TCP) (HOST = xxx.xxx.xxx.xxx) (PORT = 1521))
)
(Connect_data =
(service_name = ORCL)
)
)
Ocommon\nls\admin\data: All files under the original Oracle installation directory
Oracore\zoneinfo:timezone.dat
2. Write the Registration form
Hkey_local_machine\software\oracle
"Oracle_home" = "C:\oracle\ora90"
I find that the oracle_home value of the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0 found on the Internet is not necessary.
The best thing to note here is that you don't have to set the path directly into this value, this will overwrite the original path of the system, so it is best to add it on the original path. However, you cannot do this by setting the registry directly in the. NET Setup program, which can be done in your program by adding a custom installation action.
One problem is that the path does not take effect immediately after setup, so after installing the program, the system cannot find the Oracle Bin directory and cannot establish a database connection. My approach now is to copy all 29 files in the Bin directory to the system's [Systems directory] (in the. NET deployment program, the file system-> special folders). It's kind of vicious, but live for a while:) Whoever finds a solution, remember to tell me.
///
Writes the specified value to the registry
///
<param name= "Startkey" > Initial registry Entries </param>
<param name= "Registrykeys" > Registry entry array, representing the path of the specified value </param>
<param name= the name of "VALUENAME" > Value </param>
<param name= "value" > Values to write </param>
<param name= "Append" > whether to add before the current value, if no, overwrite current value </param>
private void Setregistrykey (RegistryKey startkey, string[] Registrykeys, String valuename, String value, bool append) {
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.