oracle 查看用户创建了的表的数据量

select table_name,num_rows from dba_tables where owner=upper('username');

oracle查看用户属于哪个role


'查看username属于哪个role
select * from dba_role_privs where grantee=upper('username');
'查看rolename拥有哪些权限
select * from dba_sys_privs where grantee=upper('rolename');

Rails2.2错误 500 Internal Server Error

只需将route.rb文件中的map.root :controller => :products 改为 map.root :controller => "products",重启服务即可.

Rails2.2.2创建数据库时utf8_general_ci错误

最近将Rails的版本更新到了2.2.2,顺利更新完成之后准备做一个Demo,然后当执行rake db:create命令创建数据库时,却报了如下错误:

Couldn't create database for {"encoding"=>"utf8", "username"=>"root", "adapter"=
>"mysql", "host"=>"localhost", "password"=>nil, "database"=>"atod_development",
"pool"=>5}, charset: utf8, collation: utf8_general_ci (if you set the charset ma
nually, make sure you have a matching collation)

乍一看好像和什么字符集有关,弄了一下午也没解决.昨天不经意间将database.yml中的localhost换成127.0.0.1,竟然成功创建了,具体就不知道是什么原因了.只记得更新以前曾安装了windows版的Oracle11g,那时新建了一个"loopback adapter"网络连接,不知道和这有没有关系...