第三章 访问GREENPLUM数据库
这章主要讲各种客户端工具以及如何建立session;
- 建立连接的参数:$PGAPPNAME、$PGDATABASE、$PGPORT、$PGHOST、$PGUSER
- 支持的客户端程序:psql、pgadmin III、标准接口(如jdbc、odbc),以及使用标准接口的第三方程序,如BO,BI
- 数据库端应用程序,常用的如下:
- Name Usage
- createdb create a new database
- createlang define a new procedural language
- createuser define a new database role
- dropdb remove a database
- droplang remove a procedural language
- dropuser remove a role
- psql PostgreSQL interactive terminal
- reindexdb reindex a database
- vacuumdb garbage-collect and analyze a database
- psql连接方法
$ psql -d gpdatabase -h master_host -p 5432 -U gpadmin
$ psql gpdatabase
$ psql
- pgadmin III
pgadmin III是postgresql一个图形化界面工具,支持数据库可视化与管理工具,同样也支持Greenplum数据库,特别介绍2个功能:修改服务器配置与可视化执行计划;
- 修改服务器参数
a.连接到数据库
b.界面上操作:Select Tools > Server Configuration > postgresql.conf
c.输入或选择参数,然后Enabled & OK
d.使配置生效File > Reload,但是有些参数生效需要重启数据库系统
- 可视化执行计划
- 界面位置Tools > Query
- 输入SQL
- 选择Query > Explain,设置选项
- 执行生成执行计划Query > Explain
- 数据库接口与驱动
ODBC—pgodbc-- https://network.pivotal.io/products
JDBC—pgjdbc--https://network.pivotal.io/products
Perl DBI—pgperl--http://search.cpan.org/dist/DBD-Pg/
Python DBI—gresql--http://www.pygresql.org/
- 第三方工具
? Business Objects
? Microstrategy
? Informatica Power Center
? Microsoft SQL Server Integration Services (SSIS) and Reporting Services (SSRS)
? Ascential Datastage
? SAS
? IBM Cognos
- 连接失败常见错误
- pg_hba.conf配置问题
- 网络超时
- 连接数超过限制
- 数据库没有运行
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16976507/viewspace-1795848/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16976507/viewspace-1795848/