Coder Social home page Coder Social logo

coco's People

Contributors

feiflyv avatar

Stargazers

 avatar

Watchers

 avatar

coco's Issues

jVisualVM 远程监控

要使用jmx链接到远程机器步骤
1.修改远程机器jdk的配置文件
a.进入JAVA_HOME\jre\lib\management\目录
b.拷贝jmxremote.password.template这个文件到当前目录, 并改名为jmxremote.password
c.打开jmxremote.password文件,去掉 # monitorRole QED 和 # controlRole R&D 这两行前面的注释符号
2.修改远程机器上需要被监控的程序的配置文件
a.添加启动参数
JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=192.168.0.237
-Dcom.sun.management.jmxremote.port=18999
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false"

关于oracle的一些简单的操作

查看表空间的用户表信息

  1. select t1.username as "username", t1.default_tablespace as "tablespace", t1.temporary_tablespace as "temporary_tablespace", to_char(t1.created,'YYYY-MM-DD hh24:mi:ss') as "create_time", round((select tt1. bytes from dba_data_files tt1 where tt1.tablespace_name=t1.default_tablespace)/1024/1024) as "tablespace_total(M)", (select round(sum(tt1.bytes)/1024/1024) from dba_free_space tt1 where tt1.TABLESPACE_NAME=t1.default_tablespace) "tablespace_free(M)", (select tt1.file_name from dba_data_files tt1 where tt1.tablespace_name=t1.default_tablespace) as "tablespace_file", (select tt1.file_name from dba_temp_files tt1 where tt1.tablespace_name=t1.temporary_tablespace) as "temporary_tablespace_file" from dba_users t1 where t1.default_tablespace not in ( 'SYSTEM', 'SYSAUX', 'EXAMPLE') --and t1.username like '%WST%' order by t1.default_tablespace asc, t1.username asc;

创建表空间和用户

  1. 一、oracle的启动与关闭
    1.切换到oracle用户
    su - oracle
    2.以DBA身份连接到sys用户
    sqlplus /nolog;
    conn / as sysdba;
    3.启动与关闭
    startup --启动
    shutdown immediate --关闭oracle
    shutdown abort--强制关闭oracle
    4.监听的启动与关闭(切换到oracle用户下)
    lsnrctl start (启动监听器)
    lsnrctl stop(停止)
    lstatrc status(查看监听状态)
    二、建库
    --以sys用户登录
  2. 创建表空间。
    create temporary tablespace ump_temp
    tempfile '/home/oracle/oradata/orcl/ump_temp.dbf'
    size 1000m
    autoextend on
    next 1000m maxsize unlimited
    extent management local;
    create tablespace ump
    logging
    datafile '/home/oracle/oradata/orcl/ump.dbf'
    size 2000m
    autoextend on
    next 2000m maxsize unlimited
    extent management local;
    2.创建用户
    create user ump_gsms identified by ump_gsms
    default tablespace ump
    temporary tablespace ump_temp;
    create user ump_list identified by ump_list
    default tablespace ump
    temporary tablespace ump_temp;
    3.授权.
    grant all privileges to ump_gsms,ump_list;
    4.以ump_gsms用户登录依次执行gsms_init.sql,gsms_init-trigger.sql,gsms_init_data.sql
    5.以ump_list用户登录依次执行list_init.sql,list_init-trigger.sql
    注:表空间可以创建在磁盘任何目录:也可创建在oracle默认目录,通过以下SQL可查询
    select a.tablespace_name,b.file_name,a.block_size,a.block_size,b.bytes/1024/1024 "Sum MB" from dba_tablespaces a,dba_data_files b where a.tablespace_name=b.tablespace_name;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.