zoukankan      html  css  js  c++  java
  • 接口测试Oracle安装配置

    1,装Oracle的客户端,安装过程中不进行配置net configuration assistant,当安装提示需要配置该步骤的时候,直接取消该步骤的安装,然后结束客户端的安装过程。

    2,配置数据库的信息。找到tnsnames.ora文件,一般所在的目录是:E:\oracle\product\10.2.0\client_1\network\ADMIN\SAMPLE,这个目录下面。

    进入该目录将文件tnsnames.ora复制到如下目录:E:\oracle\product\10.2.0\client_1\network\ADMIN(也就是上一级目录),里面的内容如下:

    # This file contains the syntax information for 
    # the entries to be put in any tnsnames.ora file
    # The entries in this file are need based. 
    # There are no defaults for entries in this file
    # that Sqlnet/Net3 use that need to be overridden 
    #
    # Typically you could have two tnsnames.ora files
    # in the system, one that is set for the entire system
    # and is called the system tnsnames.ora file, and a
    # second file that is used by each user locally so that
    # he can override the definitions dictated by the system
    # tnsnames.ora file.
    
    # The entries in tnsnames.ora are an alternative to using
    # the names server with the onames adapter.
    # They are a collection of aliases for the addresses that 
    # the listener(s) is(are) listening for a database or 
    # several databases.
    
    # The following is the general syntax for any entry in 
    # a tnsnames.ora file. There could be several such entries 
    # tailored to the user's needs.
    
    <alias>= [ (DESCRIPTION_LIST =  # Optional depending on whether u have 
                    # one or more descriptions
                    # If there is just one description, unnecessary ]
          (DESCRIPTION=
            [ (SDU=2048) ]    # Optional, defaults to 2048
                    # Can take values between 512 and 32K
            [ (ADDRESS_LIST=    # Optional depending on whether u have
                    # one or more addresses
                    # If there is just one address, unnecessary ]
              (ADDRESS=
            [ (COMMUNITY=<community_name>) ] 
            (PROTOCOL=tcp)
            (HOST=<hostname>)
            (PORT=<portnumber (1521 is a standard port used)>)
              )
              [ (ADDRESS=
              (PROTOCOL=ipc)
              (KEY=<ipckey (PNPKEY is a standard key used)>)    
            )
              ]
              [ (ADDRESS=
              [ (COMMUNITY=<community_name>) ]
              (PROTOCOL=decnet)
              (NODE=<nodename>)
              (OBJECT=<objectname>)
            )
              ]
                  ... # More addresses
            [ ) ] # Optional depending on whether ADDRESS_LIST is used or not 
            [ (CONNECT_DATA=
            (SID=<oracle_sid>)
            [ (GLOBAL_NAME=<global_database_name>) ]
              )
            ]
            [ (SOURCE_ROUTE=yes) ]  
          )
          (DESCRIPTION=     
            [ (SDU=2048) ]    # Optional, defaults to 2048
                    # Can take values between 512 and 32K
            [ (ADDRESS_LIST= ]    # Optional depending on whether u have more
                    # than one address or not
                    # If there is just one address, unnecessary
              (ADDRESS
            [ (COMMUNITY=<community_name>) ]
            (PROTOCOL=tcp)
            (HOST=<hostname>)
            (PORT=<portnumber (1521 is a standard port used)>)
              )
              [ (ADDRESS=
              (PROTOCOL=ipc)
              (KEY=<ipckey (PNPKEY is a standard key used)>)
                 )
              ]
              ...         # More addresses
            [ ) ]         # Optional depending on whether ADDRESS_LIST  
                    # is being used
            [ (CONNECT_DATA=
            (SID=<oracle_sid>)
            [ (GLOBAL_NAME=<global_database_name>) ]
              )
            ]
            [ (SOURCE_ROUTE=yes) ]
          )
          [ (CONNECT_DATA=
              (SID=<oracle_sid>)
              [ (GLOBAL_NAME=<global_database_name>) ]
            )
          ]
          ...   # More descriptions 
        [ ) ]    # Optional depending on whether DESCRIPTION_LIST is used or not
    

    将其中的黑色的字体全部删除,复制成如下的内容到该文件中:

    juddhulocal =  
    (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.2.76)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = stock)
        )
      )

    ,以上配置完成后即可,然后你安装特定的Oracle的客户端工具即可,例如plsql developer等等。

    http://hi.baidu.com/xyshh/blog/item/20e1668dc0a0840fb21bbabc.html


    作者:高级测试开发网
    博客地址:https://seniortesting.club
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

  • 相关阅读:
    linux安装navicat全程记录
    MySQL5.7.20报错Access denied for user 'root'@'localhost' (using password: NO)
    java中的异步处理和Feature接口(一)
    @Autowired注解与@Resource注解的区别与用法
    超详细MySQL安装及基本使用教程
    linux下mysql开启远程访问权限及防火墙开放3306端口
    mysql之my.cnf详解
    centos7 mysql 启动mysqld.service
    linux系统安装mysql数据库
    ExecutorService 的理解与使用
  • 原文地址:https://www.cnblogs.com/seniortestingdev/p/2332166.html
Copyright © 2011-2022 走看看