转载地址:http://blog.163.com/stonedb_supports/blog/static/2403732172014823103341523/
windows平台快速安装
1、首先从产品 安装包下载地址获取到对应的安装包(如:stonedb-9.2.4-windows-binaries-0921.zip); 2、选定数据库在windows系统中的安装路径(如:C:\Program Files),在该目录下对下载的安装包进行解压,解压后会生成一个名为StoneDB的目录; 3、进入StoneDB目录,点击运行该目录下的install.bat脚本; 4、如果在安装最后输出类似“StoneDB installation completed.”的字样,那么恭喜您,安装已经顺利完成。接下来,您就可以正常的使用StoneDB提供的服务了。 注意: StoneDB安装完成后,初始数据库名为postgres,数据库中的初始帐号为postgres,该帐号为管理员帐号,密码为空。所以,请您在安装完成后立即设置管理员帐号的密码,以确保数据库系统的安全。
访问数据库 右键点击“开始菜单”——“运行”窗口输入“cmd”,进入windows的命令行窗口。然后就可以运行StoneDB交互式命令行程序psql访问数据库了。 下面使用psql命令以postgres用户连接到postgres数据库,同时在连接时指定了使用数据库的兼容类型为oracle。在连接后创建存储过程my_proc,然后以匿名块的方式调用了该存储过程: C:\Users\Administrator>psql -U postgres -d postgres -C oraclepsql (9.2.4)Type "help" for help. postgres=# CALL DBMS_OUTPUT.SERVEROUTPUT ('t'); serveroutput -------------- (1 row) postgres=# create or replace procedure my_proc as
postgres-# begin
postgres-# dbms_output.put_line( 'Hello World' );postgres-# end my_proc;postgres-# /CREATE FUNCTIONpostgres=# beginpostgres-# my_proc;postgres-# end;postgres-# /Hello WorldDOpostgres=#
|