/* Copyright (c) Oracle Corporation 1995. All Rights Reserved */ /***************************************************************************** NAME cfgc23.vrf DESCRIPTION This script allows the user to configure entries for SQL*Net V2 by modifying TNSNAMES.ORA file. OWNER Eng Khor MODIFIED DD-MMM-YY Reason ctow 06-SEP-96 Add Exit option dhojaboo 24-JUN-96 fix bug #351792: try to break out the dialog "Host", "Service", "Server", and "Computer" from the "Host", "Service", "Server", and "Computer" written to disk so the dialog ones can be localized. dstiefel 17-APR-96 Added Bequeath adapter, fixed bugs 351792 and 358214 ljiang 10/95 Modified for NT Ekhor 29-SEP-95 Remove tnsnames.exe, do not support existing TNSNAMES.ORA *****************************************************************************/ { { /* OS variables */ if(platform() == "nt") prefix = "nt"; else prefix = "w95"; ui_phase(nls("ui_phase_ez_config","Loading...")); doit = execute("%installer_home%\%operating_system%.vrf"); } [ 'UNBOUND_VARIABLE: { signal('failure,instantiate(nls("instver_too_early1","The version of the Installer currently running cannot run Easy Configure. Please run version the latest version of the installer."))); } ] if (doit) { vrf_ratchet = "1.0.0.0.0"; prod_name = nls("prod_name","SQL*Net Easy Configuration"); /****************************************************************************************************************** NLS STRING ******************************************************************************************************************/ selection_title = nls("selection_title", "Selective Product Install"); selection_prompt = nls("selection_prompt", "Please select the products you wish to install:"); selection_help = nls("selection_help", "Select the products you wish to install by selecting the desired item. Multiple products may be selected.%carriage_return%%carriage_return%Items may be selected by clicking on the item with the mouse or by moving the cursor to the item and using the space bar to select the item."); help_about_cancel = nls("help_about_cancel","CANCEL allows you to exit %prod_name% without committing any changes you have made since the last confirmation."); warning1 = nls("warning1","#This is a SQL*Net Configuration file generated by SQL*Net Easy Configuration."); warning2 = nls("warning2","#Attention: Do not modify this file yourself."); warning3 = nls("warning3","#If you do, your SQL*Net Easy Configuration may not function properly."); no_alias_see = nls("no_alias_see","There is no Database Alias configuration information."); write_error_msg = nls("write_error_msg","Unable to configure SQL*Net. Please rerun %prod_name% again."); exit_program = nls("exit_program","There may be a problem with %prod_name%. Please contact the person responsible for reporting this problem to Oracle before restarting this operation."); tnsnav_sqlnet_exist = nls("tnsnav_sqlnet_exist","%prod_name% detects existing SQL*Net configuration files (SQLNET.ORA and TNSNAV.ORA) which are not compatible with %prod_name%. Choose YES to backup your existing configuration files, allowing you to use %prod_name%. Choose NO or CANCEL to exit, allowing you to continue to use your existing method of SQL*Net configuration. "); tnsnav_sqlnet_exist_label = nls("tnsnav_sqlnet_exist_label","Existing SQL*Net Configuration Files"); tnsnav_sqlnet_exist_help = nls("tnsnav_sqlnet_exist_help","%prod_name% only supports SQL*Net configuration files provided with or generated by %prod_name%. %prod_name% assumes that you have been using another method to configure SQL*Net but that you want to switch to using %prod_name%. By choosing YES, %prod_name% saves your existing SQLNET.ORA and TNSNAV.ORA files to %%sqlnet_num%% and %%tnsnav_num%% respectively. A new SQLNET.ORA file is provided. TNSNAV.ORA is not replaced as %prod_name% does not support configuration of TNSNAV.ORA features (multi-protocol interchange). If you need to view previous SQL*Net configuration information, the files can be found in the directory %%oracle_home%%\NETWORK\ADMIN. By choosing NO or CANCEL, the SQLNET.ORA and TNSNAV.ORA files will not be backed up and %prod_name% will exit, allowing you to continue to use your existing method of SQL*Net configuration. "); sqlnet_exist = nls("sqlnet_exist","%prod_name% detects an existing SQL*Net configuration file (SQLNET.ORA) which is not compatible with %prod_name%. Choose YES to backup your existing configuration file, allowing you to use %prod_name%. Choose NO or CANCEL to exit, allowing you to continue to use your existing method of SQL*Net configuration. "); sqlnet_exist_label = nls("sqlnet_exist_label","Existing SQL*Net Configuration File"); sqlnet_exist_help = nls("sqlnet_exist_help","%prod_name% only supports SQL*Net configuration files provided with or generated by %prod_name%. %prod_name% assumes that you have been using another method to configure SQL*Net but that you want to switch to using %prod_name%. By choosing YES, %prod_name% saves your existing SQLNET.ORA file to %%sqlnet_num%%. A new SQLNET.ORA file is provided. If you need to view previous SQL*Net configuration information, the file can be found in the directory %%oracle_home%%\NETWORK\ADMIN. By choosing NO or CANCEL, the SQLNET.ORA file will not be backed up and %prod_name% will exit, allowing you to continue to use your existing method of SQL*Net configuration. "); tnsnav_exist = nls("tnsnav_exist","%prod_name% detects an existing SQL*Net configuration file (TNSNAV.ORA) which is not compatible with %prod_name%. Choose YES to backup your existing configuration file, allowing you to use %prod_name%. Choose NO or CANCEL to exit, allowing you to continue to use your existing method of SQL*Net configuration. "); tnsnav_exist_label = nls("tnsnav_exist_label","Existing SQL*Net Configuration File"); tnsnav_exist_help = nls("tnsnav_exist_help","%prod_name% only supports SQL*Net configuration files provided with or generated by %prod_name%. %prod_name% assumes that you have been using another method to configure SQL*Net but that you want to switch to using %prod_name%. By choosing YES, %prod_name% saves your existing TNSNAV.ORA file to %%tnsnav_num%%. TNSNAV.ORA is not replaced as %prod_name% does not support configuration of TNSNAV.ORA features (multi-protocol interchange). If you need to view previous SQL*Net configuration information, the file can be found in the directory %%oracle_home%%\NETWORK\ADMIN. By choosing NO or CANCEL, the TNSNAV.ORA file will not be backed up and %prod_name% will exit, allowing you to continue to use your existing method of SQL*Net configuration. "); /* NLS string label length limitation of 32 bytes */ names_nav_sqlnet_exist = nls("names_nav_sqlnet_exist","%prod_name% detects existing SQL*Net configuration files (TNSNAMES.ORA, SQLNET.ORA, and TNSNAV.ORA) which are not compatible with %prod_name%. Choose YES to backup your existing configuration files, allowing you to use %prod_name%. Choose NO or CANCEL to exit, allowing you to continue to use your existing method of SQL*Net configuration. "); names_nav_sqlnet_exist_label = nls("names_nav_sqlnet_exist_label","Existing SQL*Net Configuration Files"); names_nav_sqlnet_exist_help = nls("names_nav_sqlnet_exist_help","%prod_name% only supports SQL*Net configuration files provided with or generated by %prod_name%. %prod_name% assumes that you have been using another method to configure SQL*Net but that you want to switch to using %prod_name%. By choosi ng YES, %prod_name% saves your existing TNSNAMES.ORA, SQLNET.ORA, and TNSNAV.ORA files to %%tnsnames_num%%, %%sqlnet_num%%, and %%tnsnav_num%% respectively. New TNSNAMES.ORA and SQLNET.ORA files are provided. TNSNAV.ORA is not replaced as %prod_name% does not support configuration of TNSNAV.ORA features (multi-protocol interchange). If you need to view previous SQL*Net configuration information, the files can be found in the directory %%oracle_home%%\NETWORK\ADMIN. By choosing NO or CANCEL, the TNSNAMES.ORA, SQLNET.ORA, and TNSNAV.ORA files will not be backed up and %prod_name% will exit, allowing you to continue to use your existing method of SQL*Net configuration. "); tnsnames_sqlnet_exist = nls("tnsnames_sqlnet_exist","%prod_name% detects existing SQL*Net configuration files (TNSNAMES.ORA and SQLNET.ORA) which are not compatible with %prod_name%. Choose YES to backup your existing configuration files, allowing you to use %prod_name%. Choose NO or CANCEL to exit, allowing you to continue to use your existing method of SQL*Net configuration. "); tnsnames_sqlnet_exist_label = nls("tnsnames_sqlnet_exist_label","Existing SQL*Net Configuration Files"); tnsnames_sqlnet_exist_help = nls("tnsnames_sqlnet_exist_help","%prod_name% only supports SQL*Net configuration files provided with or generated by %prod_name%. %prod_name% assumes that you have been using another method to configure SQL*Net but that you want to switch to using %prod_name%. By choosing YES, %prod_name% saves your existing TNSNAMES.ORA and SQLNET.ORA files to %%tnsnames_num%% and %%sqlnet_num%% respectively. New TNSNAMES.ORA and SQLNET.ORA files are provided. If you need to view previous SQL*Net configuration information, the files can be found in the directory %%oracle_home%%\NETWORK\ADMIN. By choosing NO or CANCEL, the TNSNAMES.ORA and SQLNET.ORA files will not be backed up and %prod_name% will exit, allowing you to continue to use your existing method of SQL*Net configuration. "); tnsnames_tnsnav_exist = nls("tnsnames_tnsnav_exist","%prod_name% detects existing SQL*Net configuration files (TNSNAMES.ORA and TNSNAV.ORA) which are not compatible with %prod_name%. Choose YES to backup your existing configuration files, allowing you to use %prod_name%. Choose NO or CANCEL to exit, allowing you to continue to use your existing method of SQL*Net configuration. "); tnsnames_tnsnav_exist_label = nls("tnsnames_tnsnav_exist_label","Existing SQL*Net Configuration Files"); tnsnames_tnsnav_exist_help = nls("tnsnames_tnsnav_exist_help","%prod_name% only supports SQL*Net configuration files provided with or generated by %prod_name%. %prod_name% assumes that you have been using another method to configure SQL*Net but that you want to switch to using %prod_name%. By choosing YES, %prod_name% saves your existing TNSNAMES.ORA and TNSNAV.ORA files to %%tnsnames_num%% and %%tnsnav_num%% respectively. A new TNSNAMES.ORA file is provided. TNSNAV.ORA is not replaced as %prod_name% does not support configuration of TNSNAV.ORA features (multi-protocol interchange). If you need to view previous SQL*Net configuration information, the files can be found in the directory %%oracle_home%%\NETWORK\ADMIN. By choosing NO or CANCEL, the TNSNAMES.ORA and TNSNAV.ORA files will not be backed up and %prod_name% will exit, allowing you to continue to use your existing method of SQL*Net configuration. "); tnsnames_exist = nls("tnsnames_exist","%prod_name% detects an existing SQL*Net configuration file (TNSNAMES.ORA) which is not compatible with %prod_name%. Choose YES to backup your existing configuration file, allowing you to use %prod_name%. Choose NO or CANCEL to exit, allowing you to continue to use your existing method of SQL*Net configuration. "); tnsnames_exist_label = nls("tnsnames_exist_label","Existing SQL*Net Configuration File"); tnsnames_exist_help = nls("tnsnames_exist_help","%prod_name% only supports SQL*Net configuration files provided with or generated by %prod_name%. %prod_name% assumes that you have been using another method to configure SQL*Net but that you want to switch to using %prod_name%. By choosing YES, %prod_name% saves your existing TNSNAMES.ORA file to %%tnsnames_num%%. A new TNSNAMES.ORA file is provided. If you need to view previous SQL*Net configuration information, the files can be found in the directory %%oracle_home%%\NETWORK\ADMIN. By choosing NO or CANCEL, the TNSNAMES.ORA file will not be backed up and %prod_name% will exit, allowing you to continue to use your existing method of SQL*Net configuration. "); tns_change = nls("tns_change","Your SQL*Net configuration file, %oracle_home%\NETWORK\ADMIN\TNSNAMES.ORA, has been modified. %prod_name% did not make this modification. Choose YES to revert to the previous SQL*Net configuration (previous TNSNAMES.ORA file) that %prod_name% supports. Your existing TNSNAMES.ORA will be renamed %%tnsnames_num%%. Choose NO or CANCEL to exit %prod_name%, allowing you to continue to use the current SQL*Net configuration. "); tns_change_label = nls("tns_change_label","Modified TNSNAMES.ORA"); tns_change_help = nls("tns_change_help","%prod_name% detects changes to your SQL*Net configuration file, TNSNAMES.ORA, which were not performed by %prod_name%. %prod_name% cannot support changes to the SQL*Net configuration files not made using %prod_name%. Choose YES to return to the previous SQL*Net configuration (previous TNSNAMES.ORA file) which %prod_name% supports. The modification made outside of %prod_name% will be lost. However, the current SQL*Net configuration file, TNSNAMES.ORA, will be copied to %%tnsnames_num%% for your reference. Choose NO or CANCEL to exit %prod_name%, allowing you to use the current SQL*Net configuration. If you need more information, contact your network administrator. "); tns_missing = nls("tns_missing","Your SQL*Net configuration file, %oracle_home%\NETWORK\ADMIN\TNSNAMES.ORA, is missing. Choose YES to revert to the previous SQL*Net configuration (previous TNSNAMES.ORA file) that %prod_name% supports. Choose NO or CANCEL to exit %prod_name%, allowing you to use other methods of SQL*Net configuration. "); tns_missing_label = nls("tns_missing_label","Missing TNSNAMES.ORA"); tns_missing_help = nls("tns_missing_help","%prod_name% detects that your SQL*Net configuration file, TNSNAMES.ORA, is missing. %prod_name% can generate the previous TNSNAMES.ORA file in order to return to your previous SQL*Net configuration. Choose YES to return to the previous SQL*Net configuration (previous TNSNAMES.ORA file) which %prod_name% supports. Choose NO or CANCEL to exit %prod_name%, allowing you to use other methods of SQL*Net configuration. If you need more information, contact your network administrator. "); tns_sqlnet_missing = nls("tns_sqlnet_missing","Your SQL*Net configuration files (TNSNAMES.ORA and SQLNET.ORA) are missing. Choose YES to revert to the previous SQL*Net configuration (previous TNSNAMES.ORA and sample SQLNET.ORA file) that %prod_name% supports. Choose NO or CANCEL to exit %prod_name%, allowing you to use other methods of SQL*Net configuration. "); tns_sqlnet_missing_label = nls("tns_sqlnet_missing_label","Missing TNSNAMES.ORA and SQLNET.ORA"); tns_sqlnet_missing_help = nls("tns_sqlnet_missing_help","%prod_name% detects that your SQL*Net configuration files (TNSNAMES.ORA and SQLNET.ORA) are missing. %prod_name% can generate the previous TNSNAMES.ORA file and copy a sample SQLNET.ORA file from the %oracle_home%\NETWORK\ADMIN\SAMPLE directory in order to return to your previous SQL*Net configuration. Choose YES to return to the previous SQL*Net configuration (previous TNSNAMES.ORA file and sample SQLNET.ORA) which %prod_name% supports. Choose NO or CANCEL to exit %prod_name%, allowing you to use other methods of SQL*Net configuration. If you need more information, contact your network administrator. "); sqlnet_ora_gone = nls("sqlnet_ora_gone","Your SQL*Net configuration file, %oracle_home%\NETWORK\ADMIN\SQLNET.ORA, is missing. %prod_name% cannot generate a new SQLNET.ORA for you. Please reinstall SQL*Net Client before running %prod_name% again."); sqlnet_ora_gone_label = nls("sqlnet_ora_gone_label", "Missing SQLNET.ORA"); sqlnet_ora_gone_help = nls("sqlnet_ora_gone_help","%prod_name% detects that your SQL*Net configuration file, %oracle_home%\NETWORK\ADMIN\SQLNET.ORA, is missing. %prod_name% cannot find a replacement for your missing SQLNET.ORA file. Without your configuration file, %prod_name% will not function correctly. Please reinstall SQL*Net Client before running %prod_name% again. If you need more information, contact your network administrator. "); tns_sqlnet_ora_gone = nls("tns_sqlnet_ora_gone","Your SQL*Net configuration files, (TNSNAMES.ORA and SQLNET.ORA) are missing. %prod_name% cannot generate your previous TNSNAMES.ORA and SQLNET.ORA. Please reinstall SQL*Net Client before running %prod_name% again."); tns_sqlnet_ora_gone_label = nls("tns_sqlnet_ora_gone_label", "Missing TNSNAMES.ORA and SQLNET.ORA"); tns_sqlnet_ora_gone_help = nls("tns_sqlnet_ora_gone_help","%prod_name% detects that your SQL*Net configuration files, (TNSNAMES.ORA and SQLNET.ORA) are missing. %prod_name% cannot find a replacement for your missing TNSNAMES.ORA and SQLNET.ORA files. Without these configuration files, %prod_name% will not function correctly. Please reinstall SQL*Net Client before running %prod_name% again. If you need more information, contact your network administrator. "); sqlnet_missing = nls("sqlnet_missing","Your SQL*Net configuration file, %oracle_home%\NETWORK\ADMIN\SQLNET.ORA, is missing. Choose YES to revert to the previous SQL*Net configuration (sample SQLNET.ORA file) that %prod_name% supports. Choose NO or CANCEL to exit %prod_name%, allowing you to use other methods of SQL*Net configuration. "); sqlnet_missing_label = nls("sqlnet_missing_label","Missing SQLNET.ORA"); sqlnet_missing_help = nls("sqlnet_missing_help","%prod_name% detects that your SQL*Net configuration file, SQLNET.ORA, is missing. %prod_name% can copy a sample SQLNET.ORA file from the %oracle_home%\NETWORK\ADMIN\SAMPLE directory in order to return to your previous SQL*Net configuration. Choose YES to return to the previous SQL*Net configuration (sample SQLNET.ORA file) which %prod_name% supports. Choose NO or CANCEL to exit %prod_name%, allowing you to use other methods of SQL*Net configuration. If you need more information, contact your network administrator."); add_rpc = nls("add_rpc", "Add RPC entry"); delete_rpc = nls("delete_rpc", "Delete RPC entry"); rpc_choices = list(add_rpc, delete_rpc); sql_net_info = nls("sql_net_info","SQL*Net (or any protocol adapter) has not been installed on this computer. Please run the Oracle Installer and install SQL*Net."); sql_net_info_label = nls("sql_net_info_label","Information"); sql_net_info_help = nls("sql_net_info_help","Please install SQL*Net before running %prod_name%."); same_alias = nls("same_alias","The Database Alias '%%database_alias%%' is already in use. Please choose a different Database Alias. If you wish to modify this Database Alias, you need to choose the Modify Database Alias option in the Main Menu."); same_alias_label = nls("same_alias_label","Alias Already In Use"); same_alias_help = nls("same_alias_help","If you wish to reconfigure the information for the Database Alias '%%database_alias%%', please go to the Modify Database Alias option in the Main Menu."); same_alias_mod = nls("same_alias_mod","The Database Alias '%%database_alias%%' is already in use."); same_alias_mod_label = nls("same_alias_mod_label","Alias Already In Use"); same_alias_mod_help = nls("same_alias_mod_help","Please choose another name."); no_alias_modify = nls("no_alias_modify","There is no Database Alias to modify."); no_alias_delete = nls("no_alias_delete","There is no Database Alias to delete."); no_rpc_delete = nls("no_rpc_delete", "There is no agent entry for RPC to delete."); sid_label = nls("sid_label","Database Instance"); spx_service_label = nls("spx_service_label","%%chosen_protocol%% Service Name"); tcp_host_label = nls("tcp_host_label","%%chosen_protocol%% Host Name"); nmp_server_label = nls("nmp_server_label","%%chosen_protocol%% Server"); beq_computer_label = nls("beq_computer_label","%%chosen_protocol%% Computer"); serv_label_entry = nls("serv_label_entry","%%chosen_protocol%% %%serv_label%%"); serv_label_entry_name = nls("serv_label_entry_name","%chosen_protocol% %%serv_label%% Name"); enter_modification = nls("enter_modification","Enter Modification Information"); conf_stack_prompt = nls("conf_stack_prompt","The following network protocols were identified on your computer. Check the Adapters you would like to configure."); conf_stack_label = nls("conf_stack_label","Oracle Adapters available for your computer"); conf_stack_help = nls("conf_stack_help","The Installer examined your computer and found the following Oracle Adapters. Please choose the Oracle Adapters you want to configure. Press OK to continue or CANCEL to terminate this installation. "); config_type_prompt = (nls("config_type_prompt", "Please choose the type of SQL*Net configuration you would like to perform. If you would like to exit %prod_name% at any time, choose CANCEL.")); config_type_add = nls("config_type_add","Add Database Alias"); config_type_modify = nls("config_type_modify","Modify Database Alias"); config_type_delete = nls("config_type_delete","Delete Database Alias"); config_type_see = nls("config_type_see","View Configuration Information"); config_type_exit = nls("config_type_exit","Exit %prod_name%"); config_type_content = nls("config_type_content","%prod_name%"); config_type_help = nls("config_type_help","A Database Alias is a short and easy-to-use name which enables you to request a connection to a remote database. The proper SQL*Net V2 term for Database Alias is TNS Service Name. However, Database Alias, a SQL*Net V1 term, is in common usage and is more descriptive. The two terms can be used interchangeably. The database Alias you define using %prod_name% are what you will enter when an application program asks for database connection information. %prod_name% will guide you to generate valid Database Alias(es) step by step. To add a new Database Alias to existing Database Alias(es), choose Add Database Alias. To modify existing Database Alias(es) to reflect a new configuration, choose Modify Database Alias. To select an existing Database Alias to delete, choose Delete Database Alias. To view existing Database Alias(es), choose View Configuration Information. To exit %prod_name% and make any new configuration entries take effect, choose Exit. "); config_type_choices = list(config_type_add, config_type_modify, config_type_delete, config_type_see, config_type_exit); config_type_default = config_type_add; choose_database_alias = nls("choose_database_alias","Choose Database Alias"); database_alias_prompt = nls("database_alias_prompt","Enter a Database Alias name to identify a remote database you want to access. The alias can be any name you choose that has at least one alphabetical character."); database_alias_default = ""; database_alias_label = nls("database_alias_label","Database Alias"); database_alias_help = nls("database_alias_help", "You are being asked to provide configuration information for Oracle SQL*Net V2 networking software. SQL*Net is used when you want to access data in a remote database. You must provide SQL*Net with information about the remote database you want to use. Enter a Database Alias, which is a short, easy-to-use name which you can use to make a connection to a remote database. This is the name you will use in application programs when they request connection information. The Database Alias entry must have at least one alphabetical character, cannot be left blank, and cannot have spaces or periods. %help_about_cancel% "); /*For each remote database you want access to you choose an easy to remember Database Alias which you will use when making a connection to a remote database.");*/ choose_protocol_prompt = nls("choose_protocol_prompt","Choose the network protocol to be used when you connect to a remote database with the Database Alias, '%%database_alias%%'."); choose_protocol_default = ""; choose_protocol_label = nls("choose_protocol_label","Choose Protocol"); choose_protocol_help = nls("choose_protocol_help","%prod_name% detects the network protocols SQL*Net currently supports. For each protocol supported, an Oracle Protocol Adapter was installed. The database that you want to connect to must support one of these protocol adapters. Choose the network protocol that you know the remote database supports. If you don't know, please ask the person who administers your network or remote database. %help_about_cancel% "); /* Limit to the length of the string -- leave out protocol help */ /* choose_protocol_help = nls("choose_protocol_help","%prod_name% detects the network protocols SQL*Net currently supports. For each protocol supported, an Oracle Protocol Adapter was installed. %%protocols_help%% The database that you want to connect to must support one of these protocol adapters. Choose the network protocol that you know the remote database supports. If you don't know, please ask the person who administers your network or remote database. %help_about_cancel% "); */ modify_protocol_prompt = nls("modify_protocol_prompt","Choose the network protocol to be used when you connect to a remote database with Database Alias, '%%target_alias%%'. The current protocol is %%modify_protocol_default%%."); modify_protocol_label = nls("modify_protocol_label","Choose Protocol"); modify_protocol_help = nls("modify_protocol_help","You may change the network protocol used for this Database Alias. Before making a change you should be sure the remote server supports the other protocol. The network protocol you are currently using is already selected. %%protocols_help%% %help_about_cancel%"); modify_option_prompt = nls("modify_option_prompt","Choose the Database Alias you wish to modify:"); modify_option_label = nls("modify_option_label","Modify Database Alias"); modify_option_help = nls("modify_option_help","Listed are the current Database Aliases that are defined. You are being asked to choose which one of the Database Aliases you want to make changes to. Select the one you want to change and press the OK button. BACK returns to the Main Menu. %help_about_cancel%"); modify_only_protocol_prompt = nls("modify_only_protocol_prompt","%%prod_name%% detects %%only_protocol%% is the only network protocol SQL*Net currently supports. The network protocol used for this Database Alias, '%%target_alias%%', is %%modify_protocol_default%%. Do you wish to switch the network protocol to %%only_protocol%%?"); modify_only_protocol_label = nls("modify_only_protocol_label","Modify Protocol"); modify_only_protocol_help = nls("modify_only_protocol_help","You may change the network protocol used for this Database Alias. Before making a change you should be sure the remote server supports the other protocol. The network protocol you are currently using is %%modify_protocol_default%%. The current Database Alias, '%%target_alias%%', cannot be used to connect to a remote database because the Oracle %%modify_protocol_default%% Protocol Adapter is not installed. Do you wish to switch the network protocol to %%only_protocol%%? %%protocol_only_help%% YES switches current network protocol to %%only_protocol%%. NO keeps current network protocol. BACK returns to the %modify_option_label% dialog box. %help_about_cancel%"); modify_left_out_protocol_prompt = nls("modify_left_out_protocol_prompt","%%prod_name%% detects that SQL*Net currently does not support the %%modify_protocol_default%% network protocol because the Oracle %%modify_protocol_default%% Protocol Adapter is not installed on this computer. The network protocol used for this Database Alias, '%%target_alias%%', is %%modify_protocol_default%%. Please select a different network protocol."); modify_left_out_protocol_label = nls("modify_left_out_protocol_label","Modify Protocol"); modify_left_out_protocol_help = nls("modify_left_out_protocol_help","You may change the network protocol used for this Database Alias. Before making a change you should be sure the remote server supports the other protocol. The current Database Alias, '%%target_alias%%', cannot be used to connect to a remote database because the Oracle %%modify_protocol_default%% Protocol Adapter is not installed. The network protocol you are currently using is already selected. Below are descriptions of the network protocols that SQL*Net currently supports on this computer: %%protocols_help%% BACK returns to the %modify_option_label% dialog box. %help_about_cancel%"); delete_option_prompt = nls("delete_option_prompt","Choose the Database Alias you wish to delete:"); delete_option_label = nls("delete_option_label","Delete Database Alias"); delete_option_help = nls("delete_option_help","Listed are the current Database Aliases that are defined. You are being asked to choose which one of the Database Aliases you want to delete. Select the one you want to delete and press the OK button. BACK returns to the Main Menu. %help_about_cancel%"); delete_rpc_prompt = nls("delete_rpc_prompt","Choose the agent entry for RPC you wish to delete:"); delete_rpc_label = nls("delete_rpc_label","Delete Agent Entry"); delete_rpc_help = nls("delete_rpc_help","Listed are the current agent entries for RPC that are defined. You are being asked to choose which one of the entries you want to delete. Select the one you want to delete and press the OK button. BACK returns to the Main Menu. %help_about_cancel%"); see_option_prompt = nls("see_option_prompt","Choose the Database Alias you wish to review:"); see_option_label = nls("see_option_label","Choose Database Alias"); see_option_help = nls("see_option_help","Listed are the current Database Aliases that are defined. You are being asked to choose which one of the Database Aliases you want to view. Select the one you want to view and press the OK button. BACK returns to the Main Menu. %help_about_cancel%"); sid_instance_prompt = nls("sid_instance_prompt","Enter the Database Instance of the particular database you want to access. This is a specific name which is often 'ORCL'. If you don't know, ask your network administrator."); spx_service_prompt = nls("spx_service_prompt","Enter the NetWare Service Name which identifies the location of the remote database. This is a specific name. If you do not know, ask your network administrator."); tcp_host_prompt = nls("tcp_host_prompt","Enter the name of the computer where the remote database is located. This is a specific name. If you do not know, ask your network administrator."); nmp_server_prompt = nls("nmp_server_prompt","Enter the name of the computer where the remote database is located. This is a specific name. If you do not know ask, ask your network administrator."); beq_computer_prompt = nls("beq_computer_prompt","Confirm the SID."); modification_prompt = nls("modification_prompt","Make any modification(s) in the appropriate field(s)."); server_settings_content = nls("install_settings_content", "Choose %%chosen_protocol%% %%serv_label%% Name and Database Instance"); server_settings_prompt = nls("install_settings_prompt", "Please enter configuration information for the database you want to use:"); server_settings_help = nls("server_settings_help", "If you have used Oracle SQL*Net V1 in the past and are familiar with V1 connect strings of the form %quotation_mark%T:<%%serv_label%% Name>:,%quotation_mark% then you already have the information you need to create a Database Alias. Specify the same %%serv_label%% Name and Database Instance you used for SQL*Net V1. If you have not previously used SQL*Net V1 then: The %%serv_label%% Name should be the name assigned to the computer where the remote database resides. The Database Instance should be the name for the system ID (SID) of the remote database to which you want to connect. The Database Instance in many cases is 'ORCL'. If you do not know the information, please ask the person who administers your network or remote database. The %%serv_label%% Name field and the Database Instance field must contain at least one alphabetical character and not be left blank. %%help_about_cancel%% "); server_modify_settings_help = nls("server_modify_settings_help", "You can make changes to any of the fields showed, including changing the name of this Database Alias. If you have used Oracle SQL*Net V1 in the past and are familiar with V1 connect strings of the form %quotation_mark%T:<%%serv_label%% Name>:,%quotation_mark% then you already have the information you need to create a Database Alias. Specify the same %%serv_label%% Name and Database Instance you used for SQL*Net V1. If you have not previously used SQL*Net V1 then: The Database Alias should be a short and easy-to-use name which you can use to make a connection to a remote database. The %%serv_label%% Name should be the name assigned to the computer where the remote database resides. The Database Instance should be the name for the system ID (SID) of the remote database to which you want to connect. The Database Instance in many cases is 'ORCL'. If you do not know the information, please ask the person who administers your network or remote database. "); db_configured = nls("alias_added","The following Database Alias has been successfully configured. Database Alias: %%database_alias%% Protocol: %%chosen_protocol%% %%serv_label%% Name: %%serv_name%% Database Instance: %%data_inst%% "); db_configured_help = nls("db_configured_help","You have the option to modify or delete this Database Alias in the Main Menu."); db_configured_label = nls("db_configured_label","Database Alias Added"); confirm_add = nls("confirm_add","Do you wish to add this Database Alias? Database Alias: %%database_alias%% Protocol: %%chosen_protocol%% %%dlog_serv_label%% Name: %%serv_name%% Database Instance: %%data_inst%% "); confirm_add_label_rpc = nls("confirm_add_label","Confirm Adding RPC Agent Entry");/*Orlando*/ /* confirm_add_label = nls("confirm_add_label","Confirmation");*/ confirm_add_rpc = nls("confirm_add","Do you wish to add this RPC Agent Entry? Protocol: %%chosen_protocol%% %%dlog_serv_label%% Name: %%serv_name%% "); /*Orlando*/ confirm_add_label = nls("confirm_add_label","Confirm Adding Database Alias"); /* confirm_add_label = nls("confirm_add_label","Confirmation");*/ extra_help = nls("extra_help","You cannot use the Database Alias '%%database_alias%%' to make a connection to a remote database if the information that you have provided is incorrect. You can correct the information by choosing the Modify option in the Main Menu of %prod_name%. You must confirm yes and exit the %prod_name% before the new Database Alias '%%database_alias%%' to take effect. %help_about_cancel%"); confirm_add_help = nls("confirm_add_help","You have specified a Database Alias and are being asked to confirm that you want to add this Database Alias. If this information is not correct and you want to change it before adding the Database Alias, you can use the BACK button to do so. The remote server must support the %%chosen_protocol%% network protocol for this Database Alias to be valid. The %%serv_label%% Name, '%%serv_name%%', should be the name assigned to the computer where the remote database resides. The Database Instance, '%%data_inst%%', should be the name for the system ID (SID) of the remote database to which you want to connect. YES adds the Database Alias to any existing one(s). NO does not add the Database Alias to any existing one(s). BACK allows you to change the Database Alias information. %help_about_cancel%"); confirm_modify = nls("confirm_modify","Please confirm Database Alias modification. Is this correct? Database Alias: %%database_alias%% Protocol: %%chosen_protocol%% %%dlog_serv_label%% Name: %%serv_name%% Database Instance: %%data_inst%% "); confirm_modify_label = nls("confirm_modify_label","Confirm Modifying Database Alias"); confirm_modify_help = nls("confirm_modify_help","You have specified a Database Alias and you are being asked to confirm that you want to modify this Database Alias. If this information is not correct and you want to change it before modifying the Database Alias, you can use the BACK button to do so. The remote server must support the %%chosen_protocol%% network protocol for this Database Alias to be valid. The %%serv_label%% Name, '%%serv_name%%', should be the name assigned to the computer where the remote database resides. The Database Instance, '%%data_inst%%', should be the name for the system ID (SID) of the remote database to which you want to connect. YES updates the Database Alias to replace the current Database Alias. NO does not update the Database Alias to replace the current Database Alias. BACK allows you to change the Database Alias information. %help_about_cancel%"); confirm_delete = nls("confirm_delete","Do you wish to delete this Database Alias? Database Alias: %%database_alias%% Protocol: %%chosen_protocol%% %%dlog_serv_label%% Name: %%serv_name%% Database Instance: %%data_inst%% "); confirm_delete_label = nls("confirm_delete_label","Confirm Deleting Database Alias"); confirm_delete_help = nls("confirm_delete_help","You have specified a Database Alias and are being asked to confirm that you want to delete this Alias. You will no longer be able to connect to the remote database located at %%serv_label%% Name, '%%serv_name%%', using the Database Alias, '%%database_alias%%', if you delete this Database Alias. YES deletes the Database Alias. NO does not delete the Database Alias. BACK allows you to select another Database Alias. %help_about_cancel%"); confirm_rpc_delete = nls("confirm_rpc_delete","Do you wish to delete this agent entry for RPC.? %%dlog_serv_label%% Name: %%serv_name%% "); confirm_rpc_delete_label = nls("confirm_rpc_delete_label","Confirm Deleting agent entry for RPC."); confirm_rpc_delete_help = nls("confirm_rpc_delete_help", "Help!!!"); rpc_entry = nls("db_blank_entry","If the Database Alias field is left blank, you may choose to add or delete an agent entry for RPC to the SQL Net Configuration."); db_blank_entry = nls("db_blank_entry","The Database Alias field must not be left blank."); db_space_entry = nls("db_space_entry","The Database Alias field cannot have spaces or periods in it."); db_inst_space_entry = nls("db_inst_space_entry","The Database Instance cannot have spaces or periods in it."); serv_space_entry = nls("serv_space_entry","The %%serv_label%% Name field cannot have spaces."); serv_blank_entry = nls("serv_blank_entry","The %%serv_label%% Name field and the Database Instance field must not be left blank."); any_blank_entry = nls("any_blank_entry","The Database Alias field, the %%serv_label%% Name field and the Database Instance field must not be left blank."); return_to_serv = nls("return_to_serv","Please return to the previous dialog box to fill in the appropriate information"); info_label = nls("info_label","Information"); exit_easy_config = nls("exit_easy_config","Exiting %prod_name%."); modify_protocol_chosen_prompt = nls("modify_protocol_chosen_prompt", "Please select one of the following protocols."); modify_protocol_chosen_label = nls("modify_protocol_chosen_label","Protocol"); modify_protocol_chosen_help = nls("modify_protocol_chosen_help","These are the protocols where you have Database Alias already defined."); see_configuration = nls("see_configuration"," Database Alias: %%database_alias%% Protocol: %%chosen_protocol%% %%dlog_serv_label%% Name: %%serv_name%% Database Instance: %%data_inst%% "); see_configuration_label = nls("see_configuration_label","Configuration Information"); see_configuration_help = nls("see_configuration_help","Displayed is the information for the Database Alias you choose to view. The Database Alias, '%%database_alias%%', can be used to connect to a remote database located at %%serv_label%% Name, '%%serv_name%%', which supports the %%chosen_protocol%% network protocol. The Database Instance is '%%data_inst%%'. You may modify the configuration of this Database Alias by choosing the Modify Database Alias option in the Main Menu. You may delete this Database Alias by choosing the Delete Database Alias option in the Main Menu. OK returns to the Main Menu. BACK returns to the Choose Database Alias dialog box where you can select another Database Alias to view."); tcp_help = nls("tcp_help","%carriage_return%The TCP/IP network protocol enables connections to remote databases on Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.%carriage_return%"); spx_help = nls("spx_help","%carriage_return%The SPX network protocol supports connections to remote databases on a Novell NetWare environment or other server platforms which have an SPX listener (eg. Windows NT).%carriage_return%"); nmp_help = nls("nmp_help","%carriage_return%The Named Pipes network protocol allows you to connect to remote databases in a Microsoft Network environment or LAN Manager environment.%carriage_return%"); beq_help = nls("beq_help","%carriage_return%The Bequeath mechanism supports connections to local databases without using a listnener.%carriage_return%"); no_sqlnet_ora = nls("no_sqlnet_ora","%prod_name% is unable to generate a default SQLNET.ORA for you. Please reinstall SQL*Net Client before using %prod_name% again."); tnsnames_not_moved = nls("tnsnames_not_moved","%prod_name% is unable to backup your TNSNAMES.ORA to %%tnsnames_num%%. Please free up the resources to these files before running %prod_name% again."); no_sqlnetv2_cfg = nls("no_sqlnetv2_cfg","%prod_name% is unable to proceed because some resource files are missing. Please reinstall %prod_name% before using %prod_name% again."); add_sample_sqlnet_ora = nls("add_sample_sqlnet_ora"," and SQLNET.ORA"); /* These are terms, do NOT translate */ tcp_protocol = "TCP/IP"; spx_protocol = "SPX"; nmp_protocol = "Named Pipes"; beq_protocol = "Bequeath"; small_spx = "spx"; small_nmp = "nmp"; small_tcp = "tcp"; small_beq = "beq"; service_label = "Service"; server_label = "Server"; host_label = "Host"; computer_label = "Computer"; service_label_cap = "SERVICE"; server_label_cap = "SERVER"; host_label_cap = "HOST"; computer_label_cap = "COMPUTER"; /* dhojaboo added 6/17/96 */ dlg_service_label = nls("dlg_service_label", "Service"); dlg_server_label = nls("dlg_server_label", "Server"); dlg_host_label = nls("dlg_host_label", "Host"); dlg_computer_label = nls("dlg_computer_label", "Computer"); dlg_service_label_cap = nls("dlg_service_label_cap", "SERVICE"); dlg_server_label_cap = nls("dlg_server_label_cap", "SERVER"); dlg_host_label_cap = nls("dlg_host_label_cap", "HOST"); dlg_computer_label_cap = nls("dlg_computer_label_cap", "COMPUTER"); tmp_template = "%oracle_home%\network\cfg\template.tmp"; sqlnetv2_cfg = "%oracle_home%\NETWORK\CFG\sqlnetv2.cfg"; /***************************************************************************** Start main logic ... *****************************************************************************/ /*********** Network Stacks detection ....... ************/ install_tcp = FALSE; install_spx = FALSE; install_nmp = FALSE; install_beq = TRUE; all_protocol_list = list(tcp_protocol,spx_protocol, nmp_protocol, beq_protocol); protocol_list = list(); chosen_protocol_list = list(); protocols_help = ""; /* detecting TCP */ { if (registered("w32tcp23")) { add( protocol_list, tcp_protocol ); protocols_help = nls("add_tcp_help","%protocols_help%%tcp_help%"); } } [ 'UNREGISTERED_PRODUCT, 'UNBOUND_VARIABLE : continue(); ] /* detecting SPX */ { if (registered("w32spx23")) { add( protocol_list, spx_protocol ); protocols_help = nls("add_spx_help","%protocols_help%%spx_help%"); } } [ 'UNREGISTERED_PRODUCT: 'UNBOUND_VARIABLE : continue(); ] /* detecting Named Pipes */ { if (registered("w32nmp23")) { add( protocol_list, nmp_protocol ); protocols_help = nls("add_nmp_help","%protocols_help%%nmp_help%"); } } [ 'UNREGISTERED_PRODUCT, 'UNBOUND_VARIABLE : continue(); ] /* detecting RDBMS for Bequeath */ { if (registered("%prefix%rdbms73")) { add( protocol_list, beq_protocol ); protocols_help = nls("add_beq_help","%protocols_help%%beq_help%"); } } [ 'UNREGISTERED_PRODUCT, 'UNBOUND_VARIABLE : continue(); ] if (empty(protocol_list)) { information_dialog(sql_net_info, sql_net_info_label, sql_net_info_help, 'NO_CANCEL); signal('FAILURE, exit_easy_config); } /****************************************************************************************************************** B E G I N ..... ******************************************************************************************************************/ /* pretty formatting */ num001 = 1; while(TRUE) { if (num001 > 99) { tnsnames_001 = "%oracle_home%\NETWORK\ADMIN\TNSNAMES.%num001%"; tnsnames_num = "TNSNAMES.%num001%"; tnsnav_001 = "%oracle_home%\NETWORK\ADMIN\TNSNAV.%num001%"; tnsnav_num = "TNSNAV.%num001%"; sqlnet_001 = "%oracle_home%\NETWORK\ADMIN\SQLNET.%num001%"; sqlnet_num = "SQLNET.%num001%"; } else if (num001 > 9) { tnsnames_001 = "%oracle_home%\NETWORK\ADMIN\TNSNAMES.0%num001%"; tnsnames_num = "TNSNAMES.0%num001%"; tnsnav_001 = "%oracle_home%\NETWORK\ADMIN\TNSNAV.0%num001%"; tnsnav_num = "TNSNAV.0%num001%"; sqlnet_001 = "%oracle_home%\NETWORK\ADMIN\SQLNET.0%num001%"; sqlnet_num = "SQLNET.0%num001%"; } else { tnsnames_001 = "%oracle_home%\NETWORK\ADMIN\TNSNAMES.00%num001%"; tnsnames_num = "TNSNAMES.00%num001%"; tnsnav_001 = "%oracle_home%\NETWORK\ADMIN\TNSNAV.00%num001%"; tnsnav_num = "TNSNAV.00%num001%"; sqlnet_001 = "%oracle_home%\NETWORK\ADMIN\SQLNET.00%num001%"; sqlnet_num = "SQLNET.00%num001%"; } if (exists(tnsnames_001)) num001 = num001 + 1; else break(); } extra_files = ""; sample_file = ""; sqlnet_ora = "%oracle_home%\NETWORK\ADMIN\SQLNET.ORA"; sqlnet_sample_ora = "%oracle_home%\network\admin\sample\sqlnet.ora"; tnsnav_ora = "%oracle_home%\NETWORK\ADMIN\TNSNAV.ORA"; tnsnames_old = "%oracle_home%\NETWORK\ADMIN\TNSNAMES.OLD"; tnsnames_ora = "%oracle_home%\NETWORK\ADMIN\TNSNAMES.ORA"; tnsnames_sample_ora = "%oracle_home%\network\admin\sample\tnsnames.ora"; tnsnames_sample_cfg = "%oracle_home%\network\cfg\sqlnetv2.ini"; tnsnames_cfg = "%oracle_home%\NETWORK\CFG\sqlnetv2.cfg"; if ((exists(tnsnames_ora)) && (not(exists(sqlnetv2_cfg)))) { /* existing TNSNAMES.ORA */ { if ((exists(sqlnet_ora)) && (exists(tnsnav_ora))) ans = yesno_dialog(instantiate(names_nav_sqlnet_exist), TRUE, names_nav_sqlnet_exist_label, instantiate(names_nav_sqlnet_exist_help)); else if (exists(sqlnet_ora)) ans = yesno_dialog(instantiate(tnsnames_sqlnet_exist), TRUE, tnsnames_sqlnet_exist_label, instantiate(tnsnames_sqlnet_exist_help)); else if (exists(tnsnav_ora)) ans = yesno_dialog(instantiate(tnsnames_tnsnav_exist), TRUE, tnsnames_tnsnav_exist_label, instantiate(tnsnames_tnsnav_exist_help)); else ans = yesno_dialog(instantiate(tnsnames_exist), TRUE, tnsnames_exist_label, instantiate(tnsnames_exist_help)); if (ans == FALSE) signal('CANCEL, exit_easy_config); } ['CANCEL: signal('CANCEL, exit_easy_config);] if (exists(sqlnet_ora)) { move_file(sqlnet_ora, sqlnet_001); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, nls("sqlnet_not_moved","%prod_name% is unable to backup your SQLNET.ORA to %%sqlnet_num%% Please free up the resources to these files before running %prod_name% again."); ] if (exists(tnsnav_ora)) { move_file(tnsnav_ora, tnsnav_001); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, nls("tnsnav_not_moved","%prod_name% is unable to backup your TNSNAV.ORA to %%tnsnav_num%% Please free up the resources to these files before running %prod_name% again."); ] { copy_file(sqlnet_sample_ora, sqlnet_ora); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, no_sqlnet_ora);] { move_file(tnsnames_ora, tnsnames_001); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, tnsnames_not_moved);] { modify("",warning1,tnsnames_ora); modify("",warning2,tnsnames_ora); modify("",warning3,tnsnames_ora); modify(""," ",tnsnames_ora); append_file(tnsnames_sample_ora, tnsnames_ora); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: continue();] { copy_file(tnsnames_sample_cfg, tnsnames_cfg); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, no_sqlnetv2_cfg);] } else if ((not(exists(tnsnames_ora))) && (not(exists(sqlnetv2_cfg)))) { { if ((exists(sqlnet_ora)) && (exists(tnsnav_ora))) ans = yesno_dialog(instantiate(tnsnav_sqlnet_exist), TRUE, tnsnav_sqlnet_exist_label, instantiate(tnsnav_sqlnet_exist_help)); /* We will have a sqlnet.ora for the server else if (exists(sqlnet_ora)) ans = yesno_dialog(instantiate(sqlnet_exist), TRUE, sqlnet_exist_label, instantiate(sqlnet_exist_help)); */ else if (exists(tnsnav_ora)) ans = yesno_dialog(instantiate(tnsnav_exist), TRUE, tnsnav_exist_label, instantiate(tnsnav_exist_help)); else ans = TRUE; if (ans == FALSE) signal('CANCEL, exit_easy_config); } ['CANCEL: signal('CANCEL, exit_easy_config);] if (exists(sqlnet_ora)) { move_file(sqlnet_ora, sqlnet_001); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, nls("sqlnet_not_moved","%prod_name% is unable to backup your SQLNET.ORA to %%sqlnet_num%% Please free up the resources to these files before running %prod_name% again."); ] if (exists(tnsnav_ora)) { move_file(tnsnav_ora, tnsnav_001); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, nls("tnsnav_not_moved","%prod_name% is unable to backup your TNSNAV.ORA to %%tnsnav_num%% Please free up the resources to these files before running %prod_name% again."); ] /* now start from as if from scratch */ { modify("",warning1,tnsnames_ora); modify("",warning2,tnsnames_ora); modify("",warning3,tnsnames_ora); modify(""," ",tnsnames_ora); append_file(tnsnames_sample_ora, tnsnames_ora); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: continue();] { copy_file(tnsnames_sample_cfg, tnsnames_cfg); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signale('FAILURE, no_sqlnetv2_cfg);] { copy_file(sqlnet_sample_ora, sqlnet_ora); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, no_sqlnet_ora);] } else if ((exists(tnsnames_ora)) && (exists(sqlnetv2_cfg))) { /* both exist */ tns_size = size(tnsnames_ora); cfg_size = translate("tns_filesize",sqlnetv2_cfg,"="); if (tns_size != cfg_size) { { ans = yesno_dialog(instantiate(tns_change), TRUE, tns_change_label, instantiate(tns_change_help)); } ['CANCEL: signal('CANCEL, exit_easy_config);] if (ans == TRUE) { { move_file(tnsnames_ora, tnsnames_001); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, tnsnames_not_moved);] } else { signal('FAILURE, exit_easy_config); } } } else if ((not(exists(tnsnames_ora))) && (exists(sqlnetv2_cfg))) { if (not(exists(sqlnet_ora))) { if (exists(sqlnet_sample_ora)) { ans = yesno_dialog(instantiate(tns_sqlnet_missing), TRUE, tns_sqlnet_missing_label, instantiate(tns_sqlnet_missing_help)); if (ans == TRUE) { copy_file(sqlnet_sample_ora, sqlnet_ora); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, no_sqlnet_ora);] } else { /* let missing SQLNET.ORA section deals with this. */ ans = TRUE; } } else { ans = yesno_dialog(instantiate(tns_missing), TRUE, tns_missing_label, instantiate(tns_missing_help)); } if (ans == FALSE) signal('FAILURE, exit_easy_config); } ['CANCEL: signal('CANCEL, exit_easy_config);] /* retreive Default_Domain */ domain = "world"; if ( exists(sqlnet_ora) ) { domain = translate("names.default_domain",sqlnet_ora); { domain = stringify(domain, TRUE); } ['TYPE_MISMATCH: continue();] } [ 'UNBOUND_VARIABLE, 'UNBOUND_ENVIRONMENT_VARIABLE,'READ_ERROR : { /* if names.default_domain is not there, put in domain = "world" as default */ modify( "names.default_domain",domain,sqlnet_ora ); } ] else { if (exists(sqlnet_sample_ora)) { ans = yesno_dialog(instantiate(sqlnet_missing), TRUE, sqlnet_missing_label, instantiate(sqlnet_missing_help)); if (ans == TRUE) { copy_file(sqlnet_sample_ora, sqlnet_ora); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: signal('FAILURE, no_sqlnet_ora);] else signal('CANCEL, exit_easy_config); } else { if (exists(tnsnames_ora)) { /* only sqlnet.ora missing */ information_dialog(sqlnet_ora_gone, sqlnet_ora_gone_label, sqlnet_ora_gone_help); } else { /* both sqlnet.ora and tnsnames.ora are missing */ information_dialog(tns_sqlnet_ora_gone, tns_sqlnet_ora_gone_label, tns_sqlnet_ora_gone_help); } signal('CANCEL, exit_easy_config); } } ['CANCEL: signal('CANCEL, exit_easy_config);] current_alias_list = list(); current_rpc_list = list(); modified_flag = FALSE; /* get all the database aliases and stored in current_alias_list */ domain_list = list(); add(domain_list, domain); neg_addendum = TRUE; addendum = 0; tmp_addendum = 0; modify_addendum = FALSE; first_one = TRUE; highest_number = 0; /* if sqlnetv2 exists, count to reach the next alias number */ if (exists(sqlnetv2_cfg)) { { highest_number = translate("next_addendum", sqlnetv2_cfg, "="); } ['UNBOUND_ENVIRONMENT_VARIABLE: {modify_addendum = TRUE; continue();}] while(TRUE) { dont_skip = TRUE; tmp_alias = translate("ALIAS_%tmp_addendum%",sqlnetv2_cfg, "="); if (dont_skip) { alias_parts = explode(tmp_alias, ".",'STRINGSONLY); alias_domain_parts = rest(alias_parts); alias_domain = implode(alias_domain_parts, "."); if (count(alias_domain, domain) > 0) { alias_name = first(alias_parts); add(current_alias_list, alias_name); } } tmp_addendum = tmp_addendum + 1; } [ 'UNBOUND_ENVIRONMENT_VARIABLE, 'READ_ERROR: { if (modify_addendum) { modify ("next_addendum", "%tmp_addendum%",sqlnetv2_cfg, "="); addendum = tmp_addendum; highest_number = addendum; break(); } else if ((tmp_addendum == highest_number) || (tmp_addendum > highest_number)) { if (neg_addendum) { addendum = highest_number; neg_addendum = FALSE; } break(); } else { dont_skip = FALSE; if (first_one) { addendum = tmp_addendum; first_one = FALSE; neg_addendum = FALSE; } tmp_addendum = tmp_addendum + 1; continue(); } } ] neg_addendum = TRUE; rpc_addendum = 0; tmp_addendum = 0; modify_addendum = FALSE; first_one = TRUE; highest_rpc_number = 0; { highest_rpc_number = translate("next_rpc_addendum", sqlnetv2_cfg, "="); } ['UNBOUND_ENVIRONMENT_VARIABLE: {modify_addendum = TRUE; continue();}] while(TRUE) { tmp_rpc = translate("AGENT_%tmp_addendum%",sqlnetv2_cfg, "="); rpc_parts = explode(tmp_rpc, ".",'STRINGSONLY); rpc_domain_parts = rest(rpc_parts); rpc_domain = implode(rpc_domain_parts, "."); if(count(rpc_domain, domain) > 0) { rpc_name = first(rpc_parts); add(current_rpc_list, rpc_name); } tmp_addendum = tmp_addendum + 1; } [ 'UNBOUND_ENVIRONMENT_VARIABLE, 'READ_ERROR: { if (modify_addendum) { modify ("next_rpc_addendum", "%tmp_addendum%",sqlnetv2_cfg, "="); rpc_addendum = tmp_addendum; highest_rpc_number = rpc_addendum; break(); } else if ((tmp_addendum == highest_rpc_number) || (tmp_addendum > highest_rpc_number)) { if (neg_addendum) { rpc_addendum = highest_rpc_number; neg_addendum = FALSE; } break(); } else { dont_skip = FALSE; if (first_one) { rpc_addendum = tmp_addendum; first_one = FALSE; neg_addendum = FALSE; } tmp_addendum = tmp_addendum + 1; continue(); } } ] } else { create_file(sqlnetv2_cfg); modify ("next_addendum", "%tmp_addendum%",sqlnetv2_cfg, "="); } ['INVALID_FILE_NAME, 'WRITE_ERROR, 'PERMISSION_DENIED, 'OS_ERROR: { information_dialog(write_error_msg); signal('FAILURE, exit_easy_config); } ] sort(current_alias_list); sort(current_rpc_list); /* MAIN LOOP */ while (TRUE) { confirm = FALSE; /*******************************************************************\ * * * ADD DATABASE ALIAS * * * \*******************************************************************/ level = 0; mark { { if((config_type == add_rpc) || (config_type == delete_rpc))/* Orlando */ config_type_default = config_type_add; else config_type_default = config_type; } ['UNBOUND_VARIABLE: continue();] { config_type = single_selection_dialog(config_type_prompt, config_type_choices, config_type_default, config_type_content, config_type_help); } ['CANCEL: signal('EXIT_CONFIG);] if (config_type == config_type_add) { level = 1; breakout = FALSE; while(breakout == FALSE) mark { while(TRUE) { if (level == 1) { database_alias_default = ""; } else { database_alias_default = database_alias; } database_alias_entry = list('label,database_alias_label, 'prompt,database_alias_prompt, 'default,database_alias_default); database_alias_list = list(database_alias_entry); { database_list = multiple_text_dialog(database_alias_prompt, database_alias_list, choose_database_alias, database_alias_help); } database_alias = first(database_list); if (database_alias == "") { mark { config_type = single_selection_dialog(rpc_entry, rpc_choices, add_rpc, info_label, return_to_serv); } break();/*Orlando*/ } else if ((count(database_alias, " ") > 0) || (count(database_alias, ".") > 0)) { mark { information_dialog(db_space_entry, info_label, return_to_serv, 'NO_CANCEL); } } else { if (member(current_alias_list, database_alias)) { mark { information_dialog(instantiate(same_alias), same_alias_label, instantiate(same_alias_help), 'NO_CANCEL); } } else break(); } } if(config_type == delete_rpc)/* Orlando */ break(); level = 2; mark { if (level == 2) { choose_protocol_default = first(protocol_list); } else { choose_protocol_default = chosen_protocol; } if (empty(rest(protocol_list))) { chosen_protocol = choose_protocol_default; if ((level == 3) || (level == 4)) continue(); } else if(config_type == add_rpc)/*Orlando*/ { chosen_protocol = tcp_protocol; } else { /* choose_protocol_prompt = nls("choose_protocol_prompt","Choose the network protocol to be used with the RPC entry for the agent.");*/ chosen_protocol = single_selection_dialog(instantiate(choose_protocol_prompt), protocol_list, choose_protocol_default, choose_protocol_label, instantiate(choose_protocol_help)); } level = 3; mark { while(TRUE) { if (level == 3) { tcp_host_name = ""; nmp_server_name = ""; spx_service_name = ""; default_sid = "ORCL"; } else { tcp_host_name = serv_name; nmp_server_name = serv_name; spx_service_name = serv_name; default_sid = data_inst; } sid_entry = list('label,sid_label, 'prompt,sid_instance_prompt, 'default,default_sid); if (chosen_protocol == spx_protocol) { comm_label = small_spx; spx_service_name_entry = list('label,instantiate(spx_service_label), 'prompt,spx_service_prompt, 'default,spx_service_name); service_settings_list = list(spx_service_name_entry, sid_entry); serv_label = service_label; dlog_serv_label = dlg_service_label;/* daleh */ server_settings_choices = multiple_text_dialog(server_settings_prompt, service_settings_list, instantiate(server_settings_content), instantiate(server_settings_help)); } else if (chosen_protocol == tcp_protocol) { comm_label = small_tcp; tcp_host_name_entry = list('label,instantiate(tcp_host_label), 'prompt, tcp_host_prompt, 'default,tcp_host_name); if(config_type == add_rpc)/*Orlando*/ { server_settings_list = list(tcp_host_name_entry); } else server_settings_list = list(tcp_host_name_entry, sid_entry); serv_label = host_label; dlog_serv_label = dlg_host_label;/* daleh */ server_settings_choices = multiple_text_dialog(server_settings_prompt, server_settings_list, instantiate(server_settings_content), instantiate(server_settings_help)); if(config_type == add_rpc) add(server_settings_choices, default_sid); } else if (chosen_protocol == nmp_protocol) { comm_label = small_nmp; nmp_server_name_entry = list('label,instantiate(nmp_server_label), 'prompt,nmp_server_prompt, 'default,nmp_server_name); server_settings_list = list(nmp_server_name_entry, sid_entry); serv_label = server_label; dlog_serv_label = dlg_server_label;/* daleh */ server_settings_choices = multiple_text_dialog(server_settings_prompt, server_settings_list, instantiate(server_settings_content), instantiate(server_settings_help)); } else if (chosen_protocol == beq_protocol) { comm_label = small_beq; beq_computer_name= "localhost"; prog_name = "oracle73"; /* This is Easy! */ beq_server_name_entry = list('label,instantiate(beq_computer_label), 'prompt,beq_computer_prompt, 'default,beq_computer_name); server_settings_list = list(beq_server_name_entry, sid_entry); serv_label = server_label; dlog_serv_label = dlg_server_label;/* daleh */ server_settings_choices = multiple_text_dialog(server_settings_prompt, server_settings_list, instantiate(server_settings_content), instantiate(server_settings_help)); } serv_name = first(server_settings_choices); { serv_name = stringify(serv_name, TRUE); } ['TYPE_MISMATCH: continue();] data_inst = first(rest(server_settings_choices)); { data_inst = stringify(data_inst, TRUE); } ['TYPE_MISMATCH: continue();] level = 4; if ((serv_name == "") || (data_inst == "")) { mark { information_dialog(instantiate(serv_blank_entry), info_label, return_to_serv, 'NO_CANCEL); } } else if (count(serv_name, " ") > 0) { mark { information_dialog(instantiate(serv_space_entry), info_label, return_to_serv, 'NO_CANCEL); } } else if ((count(data_inst, " ") > 0) || (count(data_inst, ".") > 0)) { mark { information_dialog(db_inst_space_entry, info_label, return_to_serv, 'NO_CANCEL); } } else { mark { if(config_type == add_rpc) /*Orlando*/ ans = yesno_dialog(instantiate(confirm_add_rpc), TRUE, confirm_add_label_rpc, instantiate(confirm_add_help)); else ans = yesno_dialog(instantiate(confirm_add), TRUE, confirm_add_label, instantiate(confirm_add_help)); if (ans == TRUE) { confirm = TRUE; } else { confirm = FALSE; } breakout = TRUE; break(); } } } } } } ['CANCEL: signal('EXIT_CONFIG);] /*This is where delete_rpc break() leaves you here */ rpc_addendum = 0;/* Orlando */ While(TRUE) { /* Get RPC Entry */ found_agent = translate(instantiate("AGENT_%rpc_addendum%"),sqlnetv2_cfg); rpc_addendum = rpc_addendum + 1; } [ 'UNBOUND_ENVIRONMENT_VARIABLE, 'READ_ERROR: { break(); } ] if(highest_rpc_number < rpc_addendum) { highest_rpc_number = rpc_addendum; } if(confirm) { if(config_type == add_rpc)/* Orlando */ { add(current_rpc_list, serv_name); sort(current_rpc_list); copy(template, "rpc"); } else if(chosen_protocol == tcp_protocol) { copy(template, "tcp"); } else if (chosen_protocol == spx_protocol) { copy(template, "spx"); } else if (chosen_protocol == nmp_protocol) { copy(template, "nmp"); } else if (chosen_protocol == beq_protocol) { copy(template, "beq"); } append_file(tmp_template, sqlnetv2_cfg); if(not(database_alias == "")) { add(current_alias_list, database_alias); sort(current_alias_list); }/*Orlando*/ modified_flag = TRUE; while(TRUE) { addendum = addendum + 1; dummy = translate("ALIAS_%addendum%", sqlnetv2_cfg); } [ 'UNBOUND_ENVIRONMENT_VARIABLE, 'READ_ERROR: break();] if (highest_number < addendum) highest_number = addendum; } } /*******************************************************************\ * * * MODIFY DATABASE ALIAS * * * \*******************************************************************/ if (config_type == config_type_modify) { if (empty(current_alias_list)) { mark { information_dialog(no_alias_modify, 'NO_CANCEL); } } else { level = 1; breakout = FALSE; while(breakout == FALSE) mark { if (level == 1) { target_alias = single_selection_dialog(modify_option_prompt, current_alias_list, modify_option_label, modify_option_help, 'NORADIO); } else { target_alias = single_selection_dialog(modify_option_prompt, current_alias_list, target_alias, modify_option_label, modify_option_help, 'NORADIO); } tmp_protocol = translate(instantiate("%%target_alias%%.%domain%_PROTOCOL"), sqlnetv2_cfg); level = 2; mark { protocol_only_help = ""; if (tmp_protocol == "SPX") { modify_protocol_default = spx_protocol; if (level == 2) { if ((count(protocols_help, spx_help)) == 0) protocol_only_help = nls("add_only_spx_help","%protocols_help%%spx_help%"); tmp_name = translate("%target_alias%.%domain%_SERVICE",sqlnetv2_cfg,"="); original_protocol = spx_protocol; } } else if (tmp_protocol == "NMP") { modify_protocol_default = nmp_protocol; if (level == 2) { if ((count(protocols_help, nmp_help)) == 0) protocol_only_help = nls("add_only_nmp_help","%protocols_help%%nmp_help%"); tmp_name = translate("%target_alias%.%domain%_SERVER",sqlnetv2_cfg,"="); original_protocol = nmp_protocol; } } else if (tmp_protocol == "TCP") { modify_protocol_default = tcp_protocol; if (level == 2) { if ((count(protocols_help, tcp_help)) == 0) protocol_only_help = nls("add_only_tcp_help","%protocols_help%%tcp_help%"); tmp_name = translate("%target_alias%.%domain%_HOST",sqlnetv2_cfg,"="); original_protocol = tcp_protocol; } } else if (tmp_protocol == "BEQ") { modify_protocol_default = beq_protocol; if (level == 2) { if ((count(protocols_help, beq_help)) == 0) protocol_only_help = nls("add_only_beq_help","%protocols_help%%beq_help%"); tmp_name = "localhost"; /* Another hack */ original_protocol = beq_protocol; } } { tmp_name = stringify(tmp_name, TRUE); } ['TYPE_MISMATCH: continue();] if (empty(rest(protocol_list))) { only_protocol = first(protocol_list); if ((level == 3) || (level == 4)) if (chosen_protocol == only_protocol) continue(); if (original_protocol == only_protocol) { chosen_protocol = original_protocol; } else { ans = yesno_dialog(instantiate(modify_only_protocol_prompt), FALSE, modify_only_protocol_label, instantiate(modify_only_protocol_help)); if (ans == TRUE) { chosen_protocol = only_protocol; } else { chosen_protocol = original_protocol; } } } else { if (not(member(protocol_list, modify_protocol_default))) { chosen_protocol = single_selection_dialog(instantiate(modify_left_out_protocol_prompt), all_protocol_list, modify_protocol_default, modify_left_out_protocol_label, instantiate(modify_left_out_protocol_help)); } else { chosen_protocol = single_selection_dialog(instantiate(modify_protocol_prompt), protocol_list, modify_protocol_default, modify_protocol_label, instantiate(modify_protocol_help)); } } if (chosen_protocol == spx_protocol) { tmp_protocol = "SPX"; comm_label = small_spx; serv_label = service_label; dlog_serv_label = dlg_service_label;/* daleh */ serv_label_cap = service_label_cap; serv_prompt = spx_service_prompt; } else if (chosen_protocol == nmp_protocol) { tmp_protocol = "NMP"; comm_label = small_nmp; serv_label = server_label; dlog_serv_label = dlg_server_label;/* daleh */ serv_label_cap = server_label_cap; serv_prompt = nmp_server_prompt; } else if (chosen_protocol == tcp_protocol) { tmp_protocol = "TCP"; comm_label = small_tcp; serv_label = host_label; dlog_serv_label = dlg_host_label;/* daleh */ serv_label_cap = host_label_cap; serv_prompt = tcp_host_prompt; } else if (chosen_protocol == beq_protocol) { prog_name = "oracle73"; /* This is Easy! */ tmp_protocol = "BEQ"; comm_label = small_beq; /* This field is not meaningful for bequeath--we'll just ask for Computer name Local */ serv_label = computer_label; dlog_serv_label = dlg_computer_label;/* daleh */ serv_label_cap = computer_label_cap; serv_prompt = beq_computer_prompt; } level = 3; mark { while(TRUE) { if (level == 3) { alias_name = target_alias; service_name = tmp_name; default_sid = translate("%target_alias%.%domain%_SID",sqlnetv2_cfg,"="); { default_sid = stringify(default_sid, TRUE); } ['TYPE_MISMATCH: continue();] } else { alias_name = first(triple_list); service_name = first(rest(triple_list)); default_sid = first(rest(rest(triple_list))); } alias_name_entry = list('label,database_alias_label, 'prompt,modification_prompt, 'default,alias_name); if (chosen_protocol == nmp_protocol) serv_name_entry = list('label,instantiate(serv_label_entry), 'prompt,serv_prompt, 'default,service_name); else if (chosen_protocol == beq_protocol) serv_name_entry = list('label,instantiate(serv_label_entry), 'prompt,serv_prompt, 'default,"localhost"); else serv_name_entry = list('label,instantiate(serv_label_entry_name), 'prompt,serv_prompt, 'default,service_name); sid_entry = list('label,sid_label, 'prompt,sid_instance_prompt, 'default,default_sid); modify_settings_list = list(alias_name_entry, serv_name_entry, sid_entry); triple_list = multiple_text_dialog(modification_prompt, modify_settings_list, enter_modification, instantiate(server_modify_settings_help)); database_alias = first(triple_list); serv_name = first(rest(triple_list)); data_inst = first(rest(rest(triple_list))); { level = 4; if ((database_alias == "") || (serv_name == "") || (data_inst == "")) { mark { information_dialog(instantiate(any_blank_entry), info_label, return_to_serv, 'NO_CANCEL); } } else if ((count(database_alias, " ") > 0) || (count(database_alias, ".") > 0)) { mark { information_dialog(db_space_entry, info_label, return_to_serv, 'NO_CANCEL); } } else if (count(serv_name, " ") > 0) { mark { information_dialog(instantiate(serv_space_entry), info_label, return_to_serv, 'NO_CANCEL); } } else if ((count(data_inst, " ") > 0) || (count(data_inst, ".") > 0)) { mark { information_dialog(db_inst_space_entry, info_label, return_to_serv, 'NO_CANCEL); } } else if ((member(current_alias_list, database_alias)) && (database_alias != target_alias)) { mark { information_dialog(instantiate(same_alias_mod), same_alias_mod_label, instantiate(same_alias_mod_help), 'NO_CANCEL); } } else { mark { ans = yesno_dialog(instantiate(confirm_modify), TRUE, confirm_modify_label, instantiate(confirm_modify_help)); if (ans == TRUE) { confirm = TRUE; } else { confirm = FALSE; } breakout = TRUE; break(); } } } } /* while(TRUE) */ } /* mark level 3 */ } /* while (breakout == FALSE) (mark level 2) */ } /* mark level 1*/ } /* if empty() */ if (confirm) { modified_flag = TRUE; /* look for ALIAS_%i% in order to delete it */ i = 0; while (i < highest_number) { tmp_string = translate(instantiate("ALIAS_%i%"),sqlnetv2_cfg, "="); tmp_parts = explode(tmp_string, ".",'STRINGSONLY); tmp_alias = first(tmp_parts); tmp_domain_parts = rest(tmp_parts); tmp_domain = implode(tmp_domain_parts, "."); { tmp_alias = stringify(tmp_alias, TRUE); } [ 'TYPE_MISMATCH: continue(); ] if ((tmp_alias == target_alias) && (domain == tmp_domain)) { saved_addendum = addendum; addendum = i; modify(instantiate("ALIAS_%i%"),"",sqlnetv2_cfg); break(); } i = i + 1; } ['UNBOUND_ENVIRONMENT_VARIABLE, 'READ_ERROR: { i = i + 1; continue(); } ] modify("%target_alias%.%domain%_PROTOCOL","", sqlnetv2_cfg); modify("%target_alias%.%domain%_COMMUNITY","", sqlnetv2_cfg); modify("%target_alias%.%domain%_SID","", sqlnetv2_cfg); if (original_protocol == tcp_protocol) { modify("%target_alias%.%domain%_HOST","", sqlnetv2_cfg); port_number = translate("%target_alias%.%domain%_PORT", sqlnetv2_cfg); modify("%target_alias%.%domain%_PORT","", sqlnetv2_cfg); } ['UNBOUND_ENVIRONMENT_VARIABLE: continue();] else if (original_protocol == spx_protocol) { modify("%target_alias%.%domain%_SERVICE","", sqlnetv2_cfg); } else if (original_protocol == nmp_protocol) { modify("%target_alias%.%domain%_SERVER","", sqlnetv2_cfg); modify("%target_alias%.%domain%_PIPE","", sqlnetv2_cfg); } else if (original_protocol == beq_protocol) { modify("%target_alias%.%domain%_PROGRAM","", sqlnetv2_cfg); modify("%target_alias%.%domain%_ARGV0","", sqlnetv2_cfg); } if (chosen_protocol == tcp_protocol) { port_number = translate("%target_alias%.%domain%_PORT", sqlnetv2_cfg); copy(template, "tcpd"); } ['UNBOUND_ENVIRONMENT_VARIABLE: { copy(template,"tcp"); continue();}] else if (chosen_protocol == spx_protocol) { copy(template,"spx"); } else if (chosen_protocol == nmp_protocol) { copy(template,"nmp"); } else if (chosen_protocol == beq_protocol) { copy(template,"beq"); } append_file(tmp_template, sqlnetv2_cfg); addendum = saved_addendum; extract(current_alias_list, target_alias); add(current_alias_list, database_alias); sort(current_alias_list); } } /* if (config_type == config_type_modify) */ ['CANCEL: signal('EXIT_CONFIG);] /*******************************************************************\ * * * DELETE DATABASE ALIAS * * * \*******************************************************************/ if (config_type == config_type_delete) { if (empty(current_alias_list)) { mark { information_dialog(no_alias_delete, 'NO_CANCEL); } } else { level = 1; mark { if (level == 1) { target_alias = single_selection_dialog(delete_option_prompt, current_alias_list, delete_option_label, delete_option_help, 'NORADIO); } else { target_alias = single_selection_dialog(delete_option_prompt, current_alias_list, target_alias, delete_option_label, delete_option_help, 'NORADIO); } tmp_protocol = translate(instantiate("%%target_alias%%.%domain%_PROTOCOL"), sqlnetv2_cfg); if (tmp_protocol == "SPX") { comm_label = small_spx; serv_label = service_label; dlog_serv_label = dlg_service_label;/* daleh */ serv_label_cap = service_label_cap; serv_prompt = spx_service_prompt; chosen_protocol = spx_protocol; } else if (tmp_protocol == "NMP") { comm_label = small_nmp; serv_label = server_label; dlog_serv_label = dlg_server_label;/* daleh */ serv_label_cap = server_label_cap; serv_prompt = nmp_server_prompt; chosen_protocol = nmp_protocol; } else if (tmp_protocol == "TCP") { comm_label = small_tcp; serv_label = host_label; dlog_serv_label = dlg_host_label;/* daleh */ serv_label_cap = host_label_cap; serv_prompt = tcp_host_prompt; chosen_protocol = tcp_protocol; } else if (tmp_protocol == "BEQ") { comm_label = small_beq; /* This field is not meaningful for bequeath--we'll just ask for Computer name Local */ serv_label = computer_label; dlog_serv_label = dlg_computer_label;/* daleh */ serv_label_cap = computer_label_cap; serv_prompt = beq_computer_prompt; chosen_protocol = beq_protocol; } level = 2; database_alias = target_alias; { data_inst = translate("%database_alias%.%domain%_SID", sqlnetv2_cfg, "="); serv_name = translate("%database_alias%.%domain%_%serv_label_cap%", sqlnetv2_cfg, "="); } ['UNBOUND_ENVIRONMENT_VARIABLE: { serv_name = "localhost"; continue();} ] /* Note: Bequeath doesn't need to know server name */ { mark { ans = yesno_dialog(instantiate(confirm_delete), FALSE, confirm_delete_label, instantiate(confirm_delete_help)); } } if (ans == TRUE) { modified_flag = TRUE; /* look for ALIAS_%i% in order to delete it */ i = 0; while (i < highest_number) { tmp_string = translate(instantiate("ALIAS_%i%"),sqlnetv2_cfg, "="); tmp_parts = explode(tmp_string, ".",'STRINGSONLY); tmp_alias = first(tmp_parts); tmp_domain_parts = rest(tmp_parts); tmp_domain = implode(tmp_domain_parts, "."); if ((tmp_alias == target_alias) && (tmp_domain == domain)) { modify(instantiate("ALIAS_%i%"),"",sqlnetv2_cfg); break(); } i = i + 1; } ['UNBOUND_ENVIRONMENT_VARIABLE, 'READ_ERROR: { i = i + 1; continue(); } ] modify("%target_alias%.%domain%_PROTOCOL","", sqlnetv2_cfg); modify("%target_alias%.%domain%_COMMUNITY","", sqlnetv2_cfg); modify("%target_alias%.%domain%_SID","", sqlnetv2_cfg); if (chosen_protocol == tcp_protocol) { modify("%target_alias%.%domain%_HOST","", sqlnetv2_cfg); dummy = translate("%target_alias%.%domain%_PORT", sqlnetv2_cfg); modify("%target_alias%.%domain%_PORT","", sqlnetv2_cfg); } ['UNBOUND_ENVIRONMENT_VARIABLE: continue();] else if (chosen_protocol == spx_protocol) { modify("%target_alias%.%domain%_SERVICE","", sqlnetv2_cfg); } else if (chosen_protocol == nmp_protocol) { modify("%target_alias%.%domain%_PIPE","", sqlnetv2_cfg); modify("%target_alias%.%domain%_SERVER","", sqlnetv2_cfg); } else if (chosen_protocol == beq_protocol) { modify("%target_alias%.%domain%_PROGRAM","", sqlnetv2_cfg); modify("%target_alias%.%domain%_ARGV0","", sqlnetv2_cfg); } extract(current_alias_list, database_alias); } } } /* elseif empty */ } ['CANCEL: signal('EXIT_CONFIG);] /*******************************************************************\ * * * SEE DATABASE ALIAS * * * \*******************************************************************/ if (config_type == config_type_see) { if (empty(current_alias_list)) { mark { information_dialog(no_alias_see, 'NO_CANCEL); } } else { level = 1; mark { if (level == 1) { target_alias = single_selection_dialog(see_option_prompt, current_alias_list, see_option_label, see_option_help, 'NORADIO); } else { target_alias = single_selection_dialog(see_option_prompt, current_alias_list, target_alias, see_option_label, see_option_help, 'NORADIO); } tmp_protocol = translate(instantiate("%%target_alias%%.%domain%_PROTOCOL"), sqlnetv2_cfg); if (tmp_protocol == "SPX") { comm_label = small_spx; serv_label = service_label; dlog_serv_label = dlg_service_label;/* daleh */ serv_label_cap = service_label_cap; serv_prompt = spx_service_prompt; chosen_protocol = spx_protocol; } else if (tmp_protocol == "NMP") { comm_label = small_nmp; serv_label = server_label; dlog_serv_label = dlg_server_label;/* daleh */ serv_label_cap = server_label_cap; serv_prompt = nmp_server_prompt; chosen_protocol = nmp_protocol; } else if (tmp_protocol == "TCP") { comm_label = small_tcp; serv_label = host_label; dlog_serv_label = dlg_host_label;/* daleh */ serv_label_cap = host_label_cap; serv_prompt = tcp_host_prompt; chosen_protocol = tcp_protocol; } else if (tmp_protocol == "BEQ") { comm_label = small_beq; /* This field is not meaningful for bequeath--we'll just ask for Computer name Local */ serv_label = computer_label; dlog_serv_label = dlg_computer_label;/* daleh */ serv_label_cap = computer_label_cap; serv_prompt = beq_computer_prompt; chosen_protocol = beq_protocol; } level = 2; database_alias = target_alias; { data_inst = translate("%database_alias%.%domain%_SID", sqlnetv2_cfg, "="); serv_name = translate("%database_alias%.%domain%_%serv_label_cap%", sqlnetv2_cfg, "="); } ['UNBOUND_ENVIRONMENT_VARIABLE: { serv_name = "localhost"; continue();} ] /* Bequeath doesn't have a servic */ { mark { information_dialog(instantiate(see_configuration), see_configuration_label, instantiate(see_configuration_help), 'NO_CANCEL); } } } } } ['CANCEL: signal('EXIT_CONFIG);] /*******************************************************************\ * * * DELETE RPC ENTRY * * * \*******************************************************************/ if (config_type == delete_rpc) { if (empty(current_rpc_list)) { mark { information_dialog(no_rpc_delete, 'NO_CANCEL); } } else { level = 1; mark { if (level == 1) { target_rpc = single_selection_dialog(delete_rpc_prompt, current_rpc_list, delete_rpc_label, delete_rpc_help, 'NORADIO); } else { target_rpc = single_selection_dialog(delete_rpc_prompt, current_rpc_list, target_rpc, delete_rpc_label, delete_rpc_help, 'NORADIO); } level = 2; { dlog_serv_label = dlg_host_label;/* daleh */ serv_name = target_rpc; } ['UNBOUND_ENVIRONMENT_VARIABLE: { serv_name = "localhost"; continue();} ] /* Note: Bequeath doesn't need to know server name */ { mark { ans = yesno_dialog(instantiate(confirm_rpc_delete), FALSE, confirm_rpc_delete_label, instantiate(confirm_rpc_delete_help)); } } if (ans == TRUE) { modified_flag = TRUE; /* look for AGENT_%i% in order to delete it */ i = 0; while (i < highest_rpc_number) { tmp_string = translate(instantiate("AGENT_%i%"),sqlnetv2_cfg, "="); tmp_parts = explode(tmp_string, "."); tmp_rpc = first(tmp_parts); tmp_domain_parts = rest(tmp_parts); tmp_domain = implode(tmp_domain_parts, "."); if ((tmp_rpc == target_rpc) && (tmp_domain == domain)) { modify(instantiate("AGENT_%i%"),"", sqlnetv2_cfg); break(); } i = i + 1; } ['UNBOUND_ENVIRONMENT_VARIABLE, 'READ_ERROR: { i = i + 1; continue(); } ] modify("%target_rpc%_PROTOCOL","", sqlnetv2_cfg); modify("%target_rpc%_COMMUNITY","", sqlnetv2_cfg); modify("%target_rpc%_HOST","", sqlnetv2_cfg); extract(current_rpc_list, target_rpc); } } } /* elseif empty */ } ['CANCEL: signal('EXIT_CONFIG);] /*******************************************************************\ * * * EXIT DATABASE ALIAS * * * \*******************************************************************/ if (config_type == config_type_exit) { signal('EXIT_CONFIG); } } } ['EXIT_CONFIG: { tnsnames_work = instantiate("%oracle_home%\NETWORK\CFG\TNSNAMES.WRK"); new_temp_tnsnames = instantiate("%oracle_home%\NETWORK\CFG\TNSNAMES.TMP"); new_agent_tnsnames = instantiate("%oracle_home%\NETWORK\CFG\AGENT.TMP"); create_file(tnsnames_work); modify("",warning1,tnsnames_work); modify("",warning2,tnsnames_work); modify("",warning3,tnsnames_work); modify(""," ",tnsnames_work); if (modified_flag || (not(exists(tnsnames_ora)))) { ctr = 0; latest_number = 0; Done = FALSE; while(ctr < highest_number) { { /* get an alias */ found_alias = translate(instantiate("ALIAS_%ctr%"),sqlnetv2_cfg); its_protocol = translate(instantiate("%found_alias%_PROTOCOL"),sqlnetv2_cfg); its_community = translate(instantiate("%found_alias%_COMMUNITY"), sqlnetv2_cfg); its_sid = translate(instantiate("%found_alias%_SID"), sqlnetv2_cfg); if (its_protocol == "SPX") { its_service = translate( instantiate("%found_alias%_SERVICE"), sqlnetv2_cfg ); copy(tnsnames, "spx"); } else if (its_protocol == "TCP") { its_host = translate( instantiate("%found_alias%_HOST"), sqlnetv2_cfg ); { its_port = translate( instantiate("%found_alias%_PORT"), sqlnetv2_cfg ); copy(tnsnames, "tcp"); } [ 'UNBOUND_ENVIRONMENT_VARIABLE, 'READ_ERROR : copy(tnsnames, "tcpd"); ] } else if (its_protocol == "NMP") { its_server = translate( instantiate("%found_alias%_SERVER"), sqlnetv2_cfg ); its_pipe = translate( instantiate("%found_alias%_PIPE"), sqlnetv2_cfg ); copy(tnsnames, "nmp"); } else if (its_protocol == "BEQ") { its_prog = translate( instantiate("%found_alias%_PROGRAM"),sqlnetv2_cfg); copy(tnsnames, "beq"); } /* Create a new entry into TNSNAMES.ORA */ append_file(new_temp_tnsnames, tnsnames_work); ctr = ctr + 1; latest_number = ctr; } [ 'UNBOUND_ENVIRONMENT_VARIABLE, 'READ_ERROR: { ctr = ctr + 1; continue(); } ] } i = 0; latest_rpc_number=0; while(i < highest_rpc_number + 1) { { tmp_found_agent = translate(instantiate("AGENT_%i%"),sqlnetv2_cfg); tmp_agent_parts = explode(tmp_found_agent, "."); found_agent = first(tmp_agent_parts); rpc_protocol = translate(instantiate("%found_agent%_PROTOCOL"),sqlnetv2_cfg); rpc_community = translate(instantiate("%found_agent%_COMMUNITY"),sqlnetv2_cfg); rpc_host = translate(instantiate("%found_agent%_HOST"),sqlnetv2_cfg); copy(tnsnames, "rpc"); append_file(new_agent_tnsnames, tnsnames_work); i = i + 1; latest_rpc_number = i; } [ 'UNBOUND_ENVIRONMENT_VARIABLE, 'READ_ERROR: { i = i + 1; continue(); } ] } { move_file(tnsnames_ora, tnsnames_old); } ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: continue();] copy_file(tnsnames_work, tnsnames_ora); tns_size = size(tnsnames_ora); modify("next_addendum","%latest_number%", sqlnetv2_cfg,"="); modify("next_rpc_addendum","%latest_rpc_number%", sqlnetv2_cfg,"="); modify("tns_filesize","%tns_size%", sqlnetv2_cfg,"="); } remove_file(tnsnames_work); remove_file(new_temp_tnsnames); remove_file(new_agent_tnsnames); remove_file(tmp_template); signal('FAILURE, exit_easy_config); } /* 'DEFAULT: signal('FAILURE, exit_program);*/ ] } /* if (doit) */ else { refresh_map_file = FALSE; signal('FAILURE, exit_easy_config); } }