数据库的使用

来源:互联网 发布:电信网络卡贴 编辑:程序博客网 时间:2024/05/29 15:22
数据库的使用
1.创建用户
create user username identified by newpasswd;
alter user username identified by newpasswd;
alter user scott identified by newpasswd unlock;


2.使用数据库
sqlplus / as sysdba 用户登录数据库
start up 启动数据库
conn scott/passwd 连接到scott用户
conn / as sysdba   连接到sys用户
shutdown immediate 关闭数据库

3.OEM服务的使用
1.启动监听,克隆会话,在shell下
lsnrctl start
lsnrctl status
lsnrctl stop
2.启动OEM服务
emctl start dbconsole
http://localhost.localdomain:1158/em/console/aboutApplication
浏览器输入http://192.168.5.88:1158/em/ 输入账号和密码
3.OEM服务的关闭
emctl stop dbconsole
lsnrctl stop

4.表的建立
drop table table_name purge; 彻底删除,甚至从内存中删除
select * from tab;
0 0
原创粉丝点击