"Symfoware OPEN" creates an instance

Source: Internet
Author: User
Tags psql

Symfoware Open System

"Symfoware new instance--instance (each instance uses a folder directory, has its own profile, uses a separate port (default 26500, multiple instance can be configured in the postgresql.conf file))
There are several table spaces under each instance, default space is used (the database is a logical level and the table space belongs to the physical level);

A table space can hold multiple databases, and the database can be placed in multiple table spaces;
There are multiple schemas in each database;
There are multiple table, functions, triggers, views, and so on under each schame.

PKG Installation
Fool-type installation, one click (if you change the default settings, you can modify the installation).
PKG Unload
1, close the service;
2, uninstall.

"Initdb"
Create instance, DB, SCHEMA, TABLE Insert Data
1, edit the kernel parameters;
2. Add operating system user (the new instance username and instance are the same);
3. Create database storage folder;
4. Set Environment variables (add bin directory to path Path);
5. Create an instance:
initdb-d C:\DATA_BASE--locale=c--encoding=utf8--xlogdir=c:\data_base_log
D: Database Storage folder,--locale=c,encoding: Encoding, XLOGIDR: log;
6, port and number of connections settings
Database files directory under Postgresql.conf file: port,max_connections;
7, コアファイル output first set
Symfoware Serverが often finally beauty field of the survey of the report of the occupies えて, コアファイルの output first specify します.
Postgresql.confのcore_directory, core_contentsパラメタで designation します;
8. SYMF Server Startup
1) "Postgres"-D "c:/data_base"
2) "Pg_ctl"-D "c:/data_base"-l logfile Start
3) Pg_ctl Start-w-D c:/data_base
(It is recommended to add the-w parameter at startup, return the operation result after the operation completes, and stop to close the service, restart Restart service)

Connecting to the database server
Psql-u postgres-h 127.0.0.1-p 26500 postgres (postgres for DB instance instance)

Create a database
postgres=# CREATE DATABASE db1 owner Postgres;
Create database: DB1;
Belongs to-->postgres.

Create schema
Create schema DBMS_DB1;

Create a new table
CREATE TABLE user_tbl (name VARCHAR (), signup_date date);
When specifying the schema of the table
CREATE TABLE dbms_asd.user_tbl (name VARCHAR (), signup_date date);

Inserting data
INSERT into USER_TBL (name, signup_date) VALUES (' Zhang San ', ' 2013-12-22 ');

Select Record
SELECT * from USER_TBL;

Update data
UPDATE user_tbl Set name = ' John Doe ' WHERE name = ' Zhang San ';

Deleting records
DELETE from user_tbl WHERE name = ' John Doe ';

Add Field
ALTER TABLE user_tbl ADD email VARCHAR (40);

Delete Field
ALTER TABLE user_tbl DROP COLUMN email;

Update structure
Alter TABLE USER_TBL ALTER COLUMN signup_date SET not NULL;

Delete a table
DROP TABLE IF EXISTS backup_tbl;

Supplemental: Console Commands
\password Setting a password
\q exit
\h: View an explanation of the SQL command, such as \h Select.
\?: View the list of PSQL commands.
\l: Lists all databases.
\c [database_name]: Connect to a different database.
\d: Lists all tables for the current database.
\d [table_name]: Lists the structure of a table.
\DU: Lists all users.
\e: Opens a text editor.
\conninfo: Lists the current database and connection information.

"Creating an instance with WebAdmin"
Initdbコマンドで made into したインスタンスは, Webadminでは management できません.
Webadminで したインスタンスを cut able field, must ずwebadminを use 前転して開脚座り to remove してください.

Browser settings
1. Allow the use of cookies;
2, encoding, Nicode (UTF-8) outside the code can not be expressed, select "Express"-"Encoding"-"automatic selection";
3, for the best display, set the font
"Denotes"-"Text Size"-"medium";
Tools-Internet Options-font: Web font select mspゴシック, plain text font select mspゴシック.


WebAdmin's setup
1. Click the Webadminsetup icon in the Start menu;
2, run C:\Program Files\fujitsu\symfoserver64\gui\sbin\webadminsetup.exe.
Settings (with default values):
Enter Web server ' s port number of HTTP (default:26515): Web Service port
Enter port number of Tomcat ' s shutdown used port (default:26516): Use port when Tomcat is stopped
Start WebAdmin automatically when system starting? [Y,n] (Default:
Y) is self-booting

Web Service default address: http://localhost:26515/
Default User name/password postgres/postgres;
Default address when Tomcat stops: http://localhost:26516/
Default User name/password postgres/postgres.

WebAdmin Web service Startup/shutdown (the following two programs mentioned in the official documentation were not found)
~\symfoserver64\gui\sbin\webadminstart.exe
~\symfoserver64\gui\sbin\webadminstop.exe

Create an instance
1, login http://ip:26515/(Default user name/password postgres/postgres)
2, instance new rules made
Instance Name: Inst1
Data storage folder: E:\postgres\inst1\data
Backup Data folder: H:\postgres\inst1\backup
Port number: 26502
Advanced Settings
Log folder: None
Code: UTF8
Auto start stop: Execute

Note
1, chcp Modify the code 65001 utf-8,932 Japanese.
2, because Pgadmin will eventually invoke the SQL command,
So when you want to know the detailed commands, you can manipulate them in the image interface, and then view them in the SQL window and manipulate the commands.

This article is from the "Night" blog, be sure to keep this source http://icyore.blog.51cto.com/8486958/1596288

"Symfoware OPEN" creates an instance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.