• Oracle与MySQL使用区别


    与MySQL通过创建不同的数据库来存储表

    Oracle提出表空间(tablespace)的概念作为逻辑上的存储区域来存储表,

    而不同的表空间由不同的用户来管理

    用户可以授予权限或角色

    举例:

    使用PL/SQL Developer远程登录,使用system用户

    create tablespace bosspace
    datafile 'c:os.dbf'
    size 300m
    autoextend on
    next 50m
    
    create user bos identified by bos default tablespace bosspace;
    --授予用户角色(不要授予dba角色),要在sys 和 system用户下操作
    grant connect,resource to bos
    --如果只是授予某些权限(要在sys 和 system用户下操作)
    grant create session to bos


    配置文件连接的区别

        <context:property-placeholder location="classpath:db.properties"/>
        <!-- dataSource数据源 -->
        <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
            <property name="driverClass" value="${driverClass}"></property>
            <property name="jdbcUrl" value="${jdbcUrl}"></property>
            <property name="user" value="${user}"></property>
            <property name="password" value="${password}"></property>
        </bean>

    applicationContext.xml中可以没有区别,可以把区别写在properties文件中

    driverClass = oracle.jdbc.driver.OracleDriver
    jdbcUrl=jdbc:oracle:thin:@192.168.189.101:1521:orcl
    user=bos
    password=bos
    #driverClass = com.mysql.jdbc.Driver
    #jdbcUrl=jdbc:mysql://localhost:3306/maven
    #user=root
    #password=root
  • 相关阅读:
    最简明的JavaScript闭包解释
    REST vs SOAP
    MAC Objective-C 开发经典书籍推荐
    测试word版博客文章
    Sitecore CMS中删除项目
    Sitecore CMS中如何命名项目名称
    Sitecore CMS中查看标准字段
    Sitecore CMS中配置项目图标
    如何在Sitecore CMS中创建项目
    如何在Sitecore CMS中管理桌面快捷方式
  • 原文地址:https://www.cnblogs.com/qingyundian/p/9169250.html
Copyright © 2020-2023  润新知