「YashanDB个人版体验」快速直观可视化安装个人版初体验
只需1-5步即可快速完成安装使用体验。
安装yashandb数据库基本步骤:
1.准备系统,比如centos7.9,基本系统参数配置等等
系统准备主要包括如下内容:
- 服务器准备
- 操作系统参数调整
- 安装初始环境调整
- 目录划分
2.创建用户yashan,并设置密码
不一定是yashan当然也可以用自己喜欢的用户名字。
密码可以这么快速设置:
echo "yashandb-good"|passwd --stdin yashan
3.上传安装包到指定目录,比如/home/yashan/install,自行创建目录
介质下载:https://download.yashandb.com/download
我的个人笔记本电脑intel cpu架构的,所以就选X86了
4.可视化安装数据库,傻瓜式,基本是下一步下一步,太简单就不过多截图了,可参看官方文档:http://doc.yashandb.com/yashandb/23.1/zh/%E5%AE%89%E8%A3%85%E5%92%8C%E5%8D%87%E7%BA%A7/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2/YashanDB%E5%8F%AF%E8%A7%86%E5%8C%96%E5%AE%89%E8%A3%85/%E5%90%AF%E5%8A%A8web%E6%9C%8D%E5%8A%A1.html
注意点:端口可以任意,不一定要9001,确认不冲突被占用即可。
通过命令行启动web服务如下:
[yashan@11g bin]$ ./yasom --web --listen 192.168.52.171:9001
参看下图:打开浏览器192.168.52.171:9001,输入用户组、用户、密码等测试连接,确认连接成功即可。
5.数据库其它操作:设置密码,启停库,查询视图等操作
主要注意密码复杂度合规性,否则密码修改失败。如果涉及特殊字符,则需加转义字符。
6.完整安装的操作日志如下:
建用户:
[root@11g yashandb]# useradd yashan
[root@11g yashandb]# passwd yashan
Changing password for user yashan.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@11g bin]# su - yashan
Last login: Tue Oct 31 13:46:57 CST 2023 on pts/0
Last failed login: Tue Oct 31 13:59:32 CST 2023 from 11g on ssh:notty
There was 1 failed login attempt since the last successful login.
[yashan@11g ~]$ pwd
/home/yashan
[yashan@11g ~]$ exit
logout
[root@11g bin]# pwd
/root/yashandb/bin
[root@11g bin]# cd ..
[root@11g yashandb]# ll
total 249728
drwxrwxr-x 6 yashan yashan 70 Oct 19 15:59 admin
drwxrwxr-x 2 yashan yashan 312 Oct 19 15:59 bin
drwxrwxr-x 3 yashan yashan 162 Oct 31 14:01 conf
drwxrwxr-x 5 yashan yashan 60 Oct 19 15:59 ext
-rw-rw-r-- 1 yashan yashan 11632 Oct 19 15:59 gitmoduleversion.dat
-rw------- 1 root root 497 Oct 31 13:59 hosts.toml
drwxrwxr-x 2 yashan yashan 65 Oct 19 15:59 include
drwxrwxr-x 3 yashan yashan 17 Oct 19 15:59 java
drwxr-xr-x 2 yashan yashan 4096 Oct 19 15:59 lib
-rw-r----- 1 yashan yashan 14989 Oct 19 15:38 LICENSE
drwxr-xr-x 2 root root 25 Oct 31 13:59 om
drwxrwxr-x 3 yashan yashan 21 Oct 19 15:59 plug-in
drwxrwxr-x 2 yashan yashan 187 Oct 31 13:32 scripts
-rw-r--r-- 1 yashan yashan 255673923 Oct 31 12:27 yashandb-personal-23.1.1.100-linux-x86_64.tar.gz
-rw------- 1 root root 727 Oct 31 13:59 yashandb.toml
[root@11g yashandb]# pwd
/root/yashandb
[root@11g yashandb]# su - yashan
Last login: Tue Oct 31 14:02:25 CST 2023 on pts/0
[yashan@11g ~]$ mkdir install
[yashan@11g ~]$ exit
logout
[root@11g yashandb]# mv yashandb-personal-23.1.1.100-linux-x86_64.tar.gz /home/yashan/install/
[root@11g yashandb]# chown -R yashan:yashan /home/yashan/install/
[root@11g yashandb]# su - yashan
Last login: Tue Oct 31 14:03:11 CST 2023 on pts/0
[yashan@11g ~]$ ll
total 0
drwxrwxr-x 2 yashan yashan 62 Oct 31 14:03 install
[yashan@11g ~]$ cd install/
[yashan@11g install]$ ll
total 249684
-rw-r--r-- 1 yashan yashan 255673923 Oct 31 12:27 yashandb-personal-23.1.1.100-linux-x86_64.tar.gz
[yashan@11g install]$ tar -zxvf yashandb-personal-23.1.1.100-linux-x86_64.tar.gz
admin/
省略输出...
scripts/install.ini
[yashan@11g install]$ ll
total 249720
drwxrwxr-x 6 yashan yashan 70 Oct 19 15:59 admin
drwxrwxr-x 2 yashan yashan 312 Oct 19 15:59 bin
drwxrwxr-x 2 yashan yashan 152 Oct 19 15:59 conf
drwxrwxr-x 5 yashan yashan 60 Oct 19 15:59 ext
-rw-rw-r-- 1 yashan yashan 11632 Oct 19 15:59 gitmoduleversion.dat
drwxrwxr-x 2 yashan yashan 65 Oct 19 15:59 include
drwxrwxr-x 3 yashan yashan 17 Oct 19 15:59 java
drwxr-xr-x 2 yashan yashan 4096 Oct 19 15:59 lib
-rw-r----- 1 yashan yashan 14989 Oct 19 15:38 LICENSE
drwxrwxr-x 3 yashan yashan 21 Oct 19 15:59 plug-in
drwxrwxr-x 2 yashan yashan 170 Oct 19 15:59 scripts
-rw-r--r-- 1 yashan yashan 255673923 Oct 31 12:27 yashandb-personal-23.1.1.100-linux-x86_64.tar.gz
[yashan@11g install]$ pwd
/home/yashan/install
[yashan@11g install]$ cd bin
[yashan@11g bin]$ ls
exp imp yasagent yasbak yasboot yascs yasdb yasldr yasminer yasom yaspwd yasql yasrepair yasrman yaswrap ycsctl yex_server yfsbenchmark yfscmd yfsminer yfssrv
启动web安装界面:
[yashan@11g bin]$ ./yasom --web --listen 192.168.52.171:9001
此时打开浏览器输入http://192.168.52.171:9001
不考虑优化的情况下默认下一步下一步即可。
2023-10-31 14:04:30 INFO [console] yasom.go:125 Version: 23.1.1.100
2023-10-31 14:04:30 INFO [console] deploy.go:60 deploy manager starting...
2023-10-31 14:04:30 INFO [console] convert.go:112 opt.GroupConfig: map[]
2023-10-31 14:04:30 INFO [console] static.go:20 routing vue app
2023-10-31 14:04:30 INFO [console] web.go:21 Server listen on: 192.168.52.171:9001
[YASRPC] 2023/10/31 - 14:04:33 | 200 | 180.742μs | 192.168.52.1 | GET "/"
[YASRPC] 2023/10/31 - 14:04:33 | 200 | 2.657259ms | 192.168.52.1 | GET "/assets/favicon.c096f8ac.ico"
[YASRPC] 2023/10/31 - 14:04:33 | 200 | 79.416μs | 192.168.52.1 | GET "/api/task/deploy"
[YASRPC] 2023/10/31 - 14:04:33 | 200 | 7.360589ms | 192.168.52.1 | GET "/api/initial/info"
2023-10-31 14:04:55 INFO [console] check.go:26 start scan host: 192.168.52.171
[YASRPC] 2023/10/31 - 14:04:55 | 200 | 111.781847ms | 192.168.52.1 | POST "/api/host/check"
[YASRPC] 2023/10/31 - 14:06:19 | 200 | 116.819μs | 192.168.52.1 | POST "/api/cluster/sql/database"
[YASRPC] 2023/10/31 - 14:06:52 | 200 | 1.091758ms | 192.168.52.1 | PUT "/api/cluster/config"
[YASRPC] 2023/10/31 - 14:06:52 | 200 | 102.723μs | 192.168.52.1 | GET "/api/cluster/config?cluster=yashandb&yas_type=SE"
2023-10-31 14:07:06 INFO [console] client.go:131 [192.168.52.171:22] mkdir -p /tmp/yashan.1698732426.6540998a2e5e/bin begin
2023-10-31 14:07:06 INFO [console] client.go:146 [192.168.52.171:22] mkdir -p /tmp/yashan.1698732426.6540998a2e5e/bin success
2023-10-31 14:07:06 INFO [console] client.go:104 [192.168.52.171:22] ls -l /tmp/yashan.1698732426.6540998a2e5e/bin begin
2023-10-31 14:07:06 INFO [console] client.go:116 [192.168.52.171:22] ls -l /tmp/yashan.1698732426.6540998a2e5e/bin success
2023-10-31 14:07:06 INFO [console] client.go:207 copy file from [192.168.52.171:56560]:/home/yashan/install/bin/yasboot to [192.168.52.171:22]:/tmp/yashan.1698732426.6540998a2e5e/bin/yasboot begin
2023-10-31 14:07:06 INFO [console] client.go:213 copy file from [192.168.52.171:56560]:/home/yashan/install/bin/yasboot to [192.168.52.171:22]:/tmp/yashan.1698732426.6540998a2e5e/bin/yasboot success
2023-10-31 14:07:06 INFO [console] client.go:131 [192.168.52.171:22] /tmp/yashan.1698732426.6540998a2e5e/bin/yasboot host info -a begin
2023-10-31 14:07:06 INFO [console] client.go:146 [192.168.52.171:22] /tmp/yashan.1698732426.6540998a2e5e/bin/yasboot host info -a success
2023-10-31 14:07:06 INFO [console] client.go:131 [192.168.52.171:22] /tmp/yashan.1698732426.6540998a2e5e/bin/yasboot host check -c yashandb --host-id host0001 begin
2023-10-31 14:07:06 INFO [console] client.go:146 [192.168.52.171:22] /tmp/yashan.1698732426.6540998a2e5e/bin/yasboot host check -c yashandb --host-id host0001 success
2023-10-31 14:07:06 INFO [console] client.go:104 [192.168.52.171:22] rm -rf /tmp/yashan.1698732426.6540998a2e5e begin
2023-10-31 14:07:06 INFO [console] client.go:116 [192.168.52.171:22] rm -rf /tmp/yashan.1698732426.6540998a2e5e success
install version: yashandb 23.1.1.100
2023-10-31 14:07:07 INFO [console] client.go:104 [192.168.52.171:22] if [ -d /home/yashan/yasdb_home/yashandb/23.1.1.100/conf ];then exit 1;fi begin
2023-10-31 14:07:07 INFO [console] client.go:116 [192.168.52.171:22] if [ -d /home/yashan/yasdb_home/yashandb/23.1.1.100/conf ];then exit 1;fi success
[YASRPC] 2023/10/31 - 14:07:07 | 200 | 1.082127623s | 192.168.52.1 | POST "/api/cluster/deploy"
[YASRPC] 2023/10/31 - 14:07:07 | 200 | 15.388μs | 192.168.52.1 | GET "/api/task/deploy"
[YASRPC] 2023/10/31 - 14:07:12 | 200 | 13.663μs | 192.168.52.1 | GET "/api/task/deploy"
[YASRPC] 2023/10/31 - 14:07:17 | 200 | 15.002μs | 192.168.52.1 | GET "/api/task/deploy"
[YASRPC] 2023/10/31 - 14:07:22 | 200 | 14.472μs | 192.168.52.1 | GET "/api/task/deploy"
[YASRPC] 2023/10/31 - 14:07:27 | 200 | 17.904μs | 192.168.52.1 | GET "/api/task/deploy"
2023-10-31 14:07:28 INFO [console] deploy.go:244 deploy cluster success
[YASRPC] 2023/10/31 - 14:07:32 | 200 | 13.376μs | 192.168.52.1 | GET "/api/task/deploy"
[YASRPC] 2023/10/31 - 14:07:36 | 200 | 12.713μs | 192.168.52.1 | POST "/api/exit"
2023-10-31 14:07:36 INFO [console] deploy.go:154 deploy manager stopped
2023-10-31 14:07:41 INFO [console] yasom.go:134 shutdown server...
2023-10-31 14:07:41 INFO [console] web.go:52 server exiting...
[yashan@11g bin]$
[yashan@11g bin]$ pwd
/home/yashan/install/bin
修改密码:注意必须符合密码策略否则失败
检查安装成功:
[yashan@11g run]$ yasboot cluster status -c yashandb -d
hostid | node_type | nodeid | pid | instance_status | database_status | database_role | listen_address | data_path
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
host0001 | db | 1-1:1 | 6811 | open | normal | primary | 192.168.52.171:1688 | /home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1
----------+-----------+--------+------+-----------------+-----------------+---------------+---------------------+-------------------------------------------------------
修改密码看看:
[yashan@11g bin]$ ./yasboot cluster password set -n newpasswd -c yashandb
type | uuid | name | hostid | index | status | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
task | 5a3d6d6712ab22b7 | YasdbPasswordSet | - | yashandb | WAITING | - | 0 | -
------+------------------+------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
---------------------------------------------------------------------------------------------------------
task | 5a3d6d6712ab22b7 | YasdbPasswordSet | - | yashandb | FAILED | 1 | 100 | 1
------+------------------+------------------+--------+----------+--------+-------------+----------+------
task completed, status: FAILED
retcode: 1
stdout: generate password file
stderr: generate yaspwd file failed, YASPW-00002 password complexity failed for SYS user : password must contain at least 1 digit
err:
[yashan@11g bin]$ ./yasboot cluster password set -n "abcd1234!" -c yashandb
-bash: !": event not found
[yashan@11g bin]$ ./yasboot cluster password set -n newpasswd$ -c yashandb
type | uuid | name | hostid | index | status | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
task | 7ab72e5c2c1db917 | YasdbPasswordSet | - | yashandb | WAITING | - | 0 | -
------+------------------+------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
---------------------------------------------------------------------------------------------------------
task | 7ab72e5c2c1db917 | YasdbPasswordSet | - | yashandb | FAILED | 1 | 100 | 1
------+------------------+------------------+--------+----------+--------+-------------+----------+------
task completed, status: FAILED
retcode: 1
stdout: generate password file
stderr: generate yaspwd file failed, YASPW-00002 password complexity failed for SYS user : password must contain at least 1 digit
err:
[yashan@11g bin]$ ./yasboot cluster password set -n abcd1234$ -c yashandb
type | uuid | name | hostid | index | status | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
task | fb61304717fad691 | YasdbPasswordSet | - | yashandb | WAITING | - | 0 | -
------+------------------+------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
task | fb61304717fad691 | YasdbPasswordSet | - | yashandb | RUNNING | - | 66 | -
------+------------------+------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
task | fb61304717fad691 | YasdbPasswordSet | - | yashandb | SUCCESS | 0 | 100 | 2
------+------------------+------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS
将环境变量生效:
[yashan@11g bin]$ cd /home/yashan/yasdb_home/yashandb/
[yashan@11g yashandb]$ ll
total 0
drwxrwxr-x 14 yashan yashan 255 Oct 31 14:07 23.1.1.100
drwxr----- 3 yashan yashan 22 Oct 31 14:07 data
[yashan@11g yashandb]$ cd 23.1.1.100/conf/
[yashan@11g conf]$ ll
total 724
-rw-rw-r-- 1 yashan yashan 100845 Oct 19 15:59 database_options.json
drwxrwxr-x 2 yashan yashan 73 Oct 31 14:07 monit
-rw-rw-r-- 1 yashan yashan 297 Oct 19 15:59 profile.toml
-rw-rw-r-- 1 yashan yashan 6837 Oct 19 15:59 sqlcollect.toml
-rw-rw-r-- 1 yashan yashan 23577 Oct 19 15:59 sqlhtml.template
-rwx------ 1 yashan yashan 304 Oct 31 14:07 yashandb.bashrc
-rw-rw-r-- 1 yashan yashan 590524 Oct 19 15:59 yasreport.template
-rw-rw-r-- 1 yashan yashan 3071 Oct 19 15:59 yfs_options.json
[yashan@11g conf]$ cat yashandb.bashrc >> ~/.bashrc
[yashan@11g conf]$ source ~/.bashrc
连接数据库,注意密码特殊字符时需要使用引号或转义字符\才能正常连接。
[yashan@11g conf]$ yasql sys/abcd1234$@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
YAS-02143 invalid username/password, login denied
please input user name: ^C
YASQL-00007 invalid username/password; logon denied
please input user name: sys
please input password:
YAS-02143 invalid username/password, login denied
YASQL-00007 unable to CONNECT to Server after 3 attempts
[yashan@11g conf]$ yasql sys/"abcd1234$"@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> select status from v$Instance;
STATUS
-------------
OPEN
1 row fetched.
SQL> select * from v$database;
DATABASE_ID DATABASE_NAME CREATE_TIME LOG_MODE OPEN_MODE PROTECTION_MODE PROTECTION_LEVEL DATABASE_ROLE BLOCK_SIZE CURRENT_SCN STATUS RCY_POINT FLUSH_POINT RESET_POINT PLATFORM_NAME HOST_NAME RESTORE_TIME SWITCHOVER_STATUS
--------------------- ---------------------------------------------------------------- -------------------------------- ----------------- ----------------- --------------------------------- --------------------------------- ----------------- ------------ --------------------- --------------------------------- --------------------------------- --------------------------------- --------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- -------------------------------- ---------------------------------
2963783994 yashandb 2023-10-31 ARCHIVELOG READ_WRITE MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE PRIMARY 8192 495189946846183424 NORMAL 0-2-5720-2152 0-2-5726-2158 0-0-0-0 Linux x86_64 11g NOT ALLOWED
1 row fetched.
SQL> select * from v$instance;
STATUS VERSION STARTUP_TIME HOST_NAME DATA_HOME INSTANCE_NUMBER INSTANCE_NAME PARALLEL INSTANCE_ROLE IN_REFORM
------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- --------------- ---------------------------------------------------------------- -------------------- ---------------------------------------------------------------- ---------
OPEN Personal Edition Release 23.1.1.100 x86_64 2023-10-31 14:07:16.960293 11g /home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1 1 yasdb false MASTER_ROLE NO
1 row fetched.
SQL> show parameter name;
NAME VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
DB_FILE_NAME_CONVERT
REDO_FILE_NAME_CONVERT
DB_BUCKET_NAME_CONVERT
INSTANCE_NAME yasdb
SLOW_LOG_FILE_NAME slow.log
5 rows fetched.
SQL> set time on
YASQL-00008 unknown SET option
SQL> set timing on
SQL> select count(*) from v$session;
COUNT(*)
---------------------
24
1 row fetched.
Elapsed: 00:00:00.000
SQL> create user jyc identified by jyc;
Succeed.
Elapsed: 00:00:00.002
SQL> grant dba to jyc;
Succeed.
Elapsed: 00:00:00.000
SQL> conn jyc/jyc
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> show user;
YASQL-00010 unknown SHOW option
SQL> select table_name from user_tables;
TABLE_NAME
----------------------------------------------------------------
0 rows fetched.
Elapsed: 00:00:00.001
SQL> create table test (id int);
Succeed.
Elapsed: 00:00:00.000
SQL> insert into test values(1);
1 row affected.
Elapsed: 00:00:00.000
SQL> commit;
Succeed.
Elapsed: 00:00:00.000
SQL> select * from test;
ID
------------
1
1 row fetched.
Elapsed: 00:00:00.000
SQL> exit
[yashan@11g conf]$ yasql jyc/jyc
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> select count(*) from test;
COUNT(*)
---------------------
1
1 row fetched.
SQL> exit
[yashan@11g conf]$ yasql jyc/jyc@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> exit
[yashan@11g conf]$ yasql sys/"abcd1234!"@192.168.52.171:1688
-bash: !"@192.168.52.171: event not found
[yashan@11g conf]$ yasql sys/"abcd1234$"@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> exit
[yashan@11g conf]$ yasql sys/abcd1234$@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
YAS-02143 invalid username/password, login denied
please input user name: ^C
YASQL-00007 invalid username/password; logon denied
please input user name: [yashan@11g conf]$
[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> select * from dba_users;
USERNAME USER_ID PASSWORD ACCOUNT_STATUS LOCK_DATE EXPIRY_DATE DEFAULT_TABLESPACE CREATED AUTHENTICATION_TYPE LAST_LOGIN PASSWORD_CHANGE_DATE DATABASE_MAINTAINED PROFILE
---------------------------------------------------------------- ------------ ---------------------------------------------------------------- --------------------------------- -------------------------------- -------------------------------- ---------------------------------------------------------------- -------------------------------- ------------------- -------------------------------- -------------------------------- ------------------- ----------------------------------------------------------------
SYS 0 S:6494CB2C0EF69ED6DBBF1B60BCF86507D3C3865C86BED35EEB18500233EA7CE7A5BD6272C85D12468643 OPEN SYSTEM 2023-10-31 PASSWORD 2023-10-31 Y DEFAULT
JYC 3 S:7D8FE353C40ABB1F12B80627B49FC58B7530D0CFA42C80F4EB389DFE876F53E2C49C4EBFB970FBAE3537 OPEN USERS 2023-10-31 PASSWORD 2023-10-31 N DEFAULT
MDSYS 10240 LOCKED USERS 2023-10-31 PASSWORD 2023-10-31 Y DEFAULT
3 rows fetched.
SQL> desc dba_users;
NAME NULL? DATATYPE
---------------------------------------------------------------- --------- ---------------------------------
USERNAME NOT NULL VARCHAR(64)
USER_ID NOT NULL INTEGER
PASSWORD VARCHAR(4000)
ACCOUNT_STATUS VARCHAR(30)
LOCK_DATE DATE
EXPIRY_DATE DATE
DEFAULT_TABLESPACE VARCHAR(64)
CREATED NOT NULL DATE
AUTHENTICATION_TYPE VARCHAR(8)
LAST_LOGIN DATE
PASSWORD_CHANGE_DATE DATE
DATABASE_MAINTAINED VARCHAR(1)
PROFILE NOT NULL VARCHAR(128)
SQL> select username,default_tablespace,expiry_date from dba_users;
USERNAME DEFAULT_TABLESPACE EXPIRY_DATE
---------------------------------------------------------------- ---------------------------------------------------------------- --------------------------------
SYS SYSTEM
JYC USERS
MDSYS USERS
3 rows fetched.
SQL> select * from v$tablespace;
ID NAME STATUS EXTENT_BLOCKS CONTENTS ALLOCATION_TYPE MEMORY_MAPPED ENCRYPTED TEMPORARY COMPRESSED
------------ ---------------------------------------------------------------- ----------------- ------------- ----------------- --------------- ------------- --------- --------- ----------
0 SYSTEM ONLINE 8 PERMANENT AUTO FALSE FALSE FALSE FALSE
1 SYSAUX ONLINE 8 PERMANENT AUTO FALSE FALSE FALSE FALSE
2 TEMP ONLINE 8 TEMPORARY UNIFORM FALSE FALSE TRUE FALSE
3 SWAP ONLINE 8 SWAP UNIFORM FALSE FALSE TRUE FALSE
4 USERS ONLINE 8 PERMANENT AUTO FALSE FALSE FALSE FALSE
5 UNDO ONLINE 1 UNDO UNIFORM FALSE FALSE FALSE FALSE
6 rows fetched.
SQL> select * from dba_tablespaces;
ID TABLESPACE_NAME BLOCK_SIZE MAX_SIZE TOTAL_BYTES USER_BYTES USER_BLOCKS STATUS CONTENTS LOGGING ALLOCATION_TYPE SEGMENT_SPACE_MANAGEMENT ENCRYPTED COMPRESSED
------------ ---------------------------------------------------------------- ------------ ----------- ----------- ----------- ----------- ----------------- ----------------- ------------- --------------- ------------------------ --------- ----------
0 SYSTEM 8192 5.4976E+11 67108864 47120384 5752 ONLINE PERMANENT LOGGING AUTO BITMAP N N
1 SYSAUX 8192 5.4976E+11 67108864 64880640 7920 ONLINE PERMANENT LOGGING AUTO BITMAP N N
2 TEMP 8192 5.4976E+11 67108864 61865984 7552 ONLINE TEMPORARY NOLOGGING UNIFORM BITMAP N N
3 SWAP 8192 5.4976E+11 67108864 66060288 8064 ONLINE SWAP NOLOGGING UNIFORM BITMAP N N
4 USERS 8192 5.4976E+11 67108864 65994752 8056 ONLINE PERMANENT LOGGING AUTO BITMAP N N
5 UNDO 8192 6.8719E+10 134217728 58195968 7104 ONLINE UNDO LOGGING UNIFORM BITMAP N N
6 rows fetched.
SQL> select name from v$datafile;
NAME
----------------------------------------------------------------
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/system
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/sysaux
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/temp
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/swap
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/users
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/undo
6 rows fetched.
SQL> select * from v$Log;
[1:15]YAS-02012 table or view does not exist
SQL> select * from v$Logfile;
THREAD# ID NAME BLOCK_SIZE BLOCK_COUNT USED_BLOCKS SEQUENCE# STATUS
------- ------------ ---------------------------------------------------------------- ------------ ------------ ------------ ------------ ---------
1 0 /home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/redo1 4096 32768 9 1 INACTIVE
1 1 /home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/redo2 4096 32768 5738 2 CURRENT
1 2 /home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/redo3 4096 32768 0 0 INACTIVE
1 3 /home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/redo4 4096 32768 0 0 INACTIVE
4 rows fetched.
SQL> select * from v$tempfile;
[1:15]YAS-02012 table or view does not exist
SQL> desc dba_objects;
NAME NULL? DATATYPE
---------------------------------------------------------------- --------- ---------------------------------
OWNER VARCHAR(64)
OBJECT_NAME NOT NULL VARCHAR(64)
SUBOBJECT_NAME VARCHAR(64)
OBJECT_ID NOT NULL BIGINT
DATA_OBJECT_ID BIGINT
OBJECT_TYPE VARCHAR(18)
CREATED NOT NULL DATE
LAST_DDL_TIME NOT NULL DATE
TIMESTAMP CHAR(1)
STATUS VARCHAR(7)
TEMPORARY VARCHAR(1)
GENERATED CHAR(1)
SECONDARY CHAR(1)
NAMESPACE NOT NULL INTEGER
SHARING CHAR(4)
EDITIONABLE CHAR(1)
DATABASE_MAINTAINED VARCHAR(1)
APPLICATION CHAR(1)
DUPLICATED CHAR(1)
SHARDED CHAR(1)
SQL> select object_name,object_type from dba_objects where object_name like '%FILE%';
OBJECT_NAME OBJECT_TYPE
---------------------------------------------------------------- ---------------------
DBA_DATA_FILES SYNONYM
DBA_PROFILES SYNONYM
DBA_TEMP_FILES SYNONYM
DV$CONTROLFILE SYNONYM
DV$DATAFILE SYNONYM
DV$LOGFILE SYNONYM
GV$DATAFILE SYNONYM
V$CONTROLFILE SYNONYM
V$DATAFILE SYNONYM
V$LOGFILE SYNONYM
V$YFS_FILE SYNONYM
DBA_DATA_FILES VIEW
DBA_PROFILES VIEW
DBA_TEMP_FILES VIEW
GV_$DATAFILE VIEW
I_PROFILE INDEX
LSC_FILE_ID$ SEQUENCE
PROFILE$ TABLE
V_$CONTROLFILE VIEW
V_$DATAFILE VIEW
V_$LOGFILE VIEW
V_$YFS_FILE VIEW
22 rows fetched.
SQL> select * from DBA_TEMP_FILES;
FILE_ID FILE_NAME STATUS BYTES BLOCKS RELATIVE_FNO AUTOEXTENSIBLE TABLESPACE_NAME MAXBYTES MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS
------------ ---------------------------------------------------------------- --------- --------------------- ------------ ------------ -------------- ---------------------------------------------------------------- --------------------- ----------- ------------ --------------------- ------------
2 /home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/temp ONLINE 67108864 8192 0 ON TEMP 549755813888 67108864 8192 61865984 7552
3 /home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/swap ONLINE 67108864 8192 0 ON SWAP 549755813888 67108864 8192 66060288 8064
2 rows fetched.
SQL> select * from DBA_DATA_FILES;
FILE_NAME FILE_ID TABLESPACE_NAME BYTES BLOCKS STATUS MAXBYTES MAXBLOCKS AUTO_EXTEND NEXT_SIZE USER_BYTES USER_BLOCKS
---------------------------------------------------------------- ------------ ---------------------------------------------------------------- --------------------- ------------ --------- --------------------- ----------- ----------- --------------------- --------------------- ------------
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/system 0 SYSTEM 67108864 8192 ONLINE 549755813888 67108864 ON 67108864 46989312 5736
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/sysaux 1 SYSAUX 67108864 8192 ONLINE 549755813888 67108864 ON 67108864 64880640 7920
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/temp 2 TEMP 67108864 8192 ONLINE 549755813888 67108864 ON 67108864 61865984 7552
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/swap 3 SWAP 67108864 8192 ONLINE 549755813888 67108864 ON 67108864 66060288 8064
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/users 4 USERS 67108864 8192 ONLINE 549755813888 67108864 ON 67108864 65994752 8056
/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/undo 5 UNDO 134217728 16384 ONLINE 68719476736 8388608 ON 67108864 58195968 7104
6 rows fetched.
SQL> exit
[yashan@11g conf]$ ss -antpl | grep yas
LISTEN 0 128 192.168.52.171:1675 *:* users:(("yasom",pid=4436,fd=9))
LISTEN 0 128 192.168.52.171:1676 *:* users:(("yasagent",pid=4403,fd=8))
LISTEN 0 128 192.168.52.171:1688 *:* users:(("yasdb",pid=4619,fd=16))
LISTEN 0 128 192.168.52.171:1689 *:* users:(("yasdb",pid=4619,fd=14))
[yashan@11g conf]$ cat ~/.bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
[ -f /home/yashan/.yasboot/yasboot.completion.bash ] && source /home/yashan/.yasboot/yasboot.completion.bash
export YASDB_HOME=/home/yashan/yasdb_home/yashandb/23.1.1.100
export PATH=${YASDB_HOME}/bin:$PATH
export LD_LIBRARY_PATH=${YASDB_HOME}/lib:$LD_LIBRARY_PATH
if command -v rlwrap >/dev/null 2>&1; then
alias yasql="rlwrap yasql"
fi
export YASDB_DATA=/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1
[yashan@11g conf]$ yasboot sql -d sys/abcd1234\$@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> select * from v$database;
select * from v$database;
DATABASE_ID DATABASE_NAME CREATE_TIME LOG_MODE OPEN_MODE PROTECTION_MODE PROTECTION_LEVEL DATABASE_ROLE BLOCK_SIZE CURRENT_SCN STATUS RCY_POINT FLUSH_POINT RESET_POINT PLATFORM_NAME HOST_NAME RESTORE_TIME SWITCHOVER_STATUS
--------------------- ---------------------------------------------------------------- -------------------------------- ----------------- ----------------- --------------------------------- --------------------------------- ----------------- ------------ --------------------- --------------------------------- --------------------------------- --------------------------------- --------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- -------------------------------- ---------------------------------
2963783994 yashandb 2023-10-31 ARCHIVELOG READ_WRITE MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE PRIMARY 8192 495192251201437696 NORMAL 0-2-5744-2176 0-2-5744-2176 0-0-0-0 Linux x86_64 11g NOT ALLOWED
1 row fetched.
SQL> select database_name from v$database;
select database_name from v$database;
DATABASE_NAME
----------------------------------------------------------------
yashandb
1 row fetched.
SQL> select * from v$instance;
select * from v$instance;
STATUS VERSION STARTUP_TIME HOST_NAME DATA_HOME INSTANCE_NUMBER INSTANCE_NAME PARALLEL INSTANCE_ROLE IN_REFORM
------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- --------------- ---------------------------------------------------------------- -------------------- ---------------------------------------------------------------- ---------
OPEN Personal Edition Release 23.1.1.100 x86_64 2023-10-31 14:07:16.960293 11g /home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1 1 yasdb false MASTER_ROLE NO
1 row fetched.
SQL> exit
exit
[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> show parameter name;
NAME VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
DB_FILE_NAME_CONVERT
REDO_FILE_NAME_CONVERT
DB_BUCKET_NAME_CONVERT
INSTANCE_NAME yasdb
SLOW_LOG_FILE_NAME slow.log
5 rows fetched.
SQL> archive log list;
[1:1]YAS-04231 keyword expected
SQL> show parameter arch;
NAME VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
ARCHIVE_LOCAL_DEST ?/archive
ARCHIVE_DEST_1
ARCHIVE_DEST_2
ARCHIVE_DEST_3
ARCHIVE_DEST_4
ARCHIVE_DEST_5
ARCHIVE_DEST_6
ARCHIVE_DEST_7
ARCHIVE_DEST_8
ARCHIVE_DEST_9
ARCHIVE_DEST_10
ARCHIVE_DEST_11
ARCHIVE_DEST_12
ARCHIVE_DEST_13
ARCHIVE_DEST_14
ARCHIVE_DEST_15
ARCHIVE_DEST_16
ARCHIVE_DEST_17
ARCHIVE_DEST_18
ARCHIVE_DEST_19
ARCHIVE_DEST_20
ARCHIVE_DEST_21
ARCHIVE_DEST_22
ARCHIVE_DEST_23
ARCHIVE_DEST_24
ARCHIVE_DEST_25
ARCHIVE_DEST_26
ARCHIVE_DEST_27
ARCHIVE_DEST_28
ARCHIVE_DEST_29
ARCHIVE_DEST_30
ARCHIVE_DEST_31
ARCHIVE_DEST_32
ARCH_CLEAN_UPPER_THRESHOLD 16G
ARCH_CLEAN_LOWER_THRESHOLD 12G
ARCH_CLEAN_IGNORE_MODE NONE
ENABLE_ARCH_DATA_IGNORE_BACKUP FALSE
37 rows fetched.
SQL> show parameter file;
NAME VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
RUN_LOG_FILE_COUNT 10
RUN_LOG_FILE_SIZE 20M
RUN_LOG_FILE_PATH /home/yashan/yasdb_home/yashandb/23.1.1.100/log/yashandb/db-1-1/run
CONTROL_FILES ('/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/ctrl1', '/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/ctrl2', '/home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1/dbfiles/ctrl3')
DB_FILE_NAME_CONVERT
REDO_FILE_NAME_CONVERT
DATAFILE_IO_MODE DEFAULT
REDOFILE_IO_MODE DSYNC
PASSWORD_FILE ?/instance/yasdb.pwd
SESSION_MAX_OPEN_FILES 50
SSL_CERT_FILE
SSL_KEY_FILE
SSL_DH_PARAM_FILE
SLOW_LOG_FILE_NAME slow.log
SLOW_LOG_FILE_PATH /home/yashan/yasdb_home/yashandb/23.1.1.100/log/yashandb/db-1-1/slow
15 rows fetched.
SQL> select * from v$version;
BANNER VERSION_NUMBER
---------------------------------------------------------------- -----------------
Personal Edition Release 23.1.1.100 x86_64 23.1.1.100
1 row fetched.
SQL> exit
检查yashandb的端口启用情况,1675、1676,1688、1689:
[yashan@11g conf]$ ss -antpl | grep yas
LISTEN 0 128 192.168.52.171:1675 *:* users:(("yasom",pid=4436,fd=9))
LISTEN 0 128 192.168.52.171:1676 *:* users:(("yasagent",pid=4403,fd=8))
LISTEN 0 128 192.168.52.171:1688 *:* users:(("yasdb",pid=4619,fd=16))
LISTEN 0 128 192.168.52.171:1689 *:* users:(("yasdb",pid=4619,fd=14))
尝试不通端口的连接测试?:
[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1689
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
YAS-00407 failed to send, errno 104, error message "Connection reset by peer"
please input user name: ^C
YASQL-00007 invalid username/password; logon denied
please input user name: ^[[A
please input password:
YASQL-00015 null password given; logon denied
YASQL-00007 unable to CONNECT to Server after 3 attempts
[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1675
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
^C
^C
YAS-00413 wait for receive timeout
please input user name: [yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1676
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
^C
YAS-00413 wait for receive timeout
please input user name: YASQL-00007 invalid username/password; logon denied
please input user name: sys
please input password:
YAS-00413 wait for receive timeout
YASQL-00007 unable to CONNECT to Server after 3 attempts
[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1678
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
YAS-00402 failed to connect socket, errno 111, error message "Connection refused"
1688这个端口才是数据库的连接端口,可连接如下:
please input user name: ^C[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> exit
启停数据库实例方法:
[yashan@11g conf]$ yasboot cluster stop -c yashandb
type | uuid | name | hostid | index | status | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
task | 10bbc08200c6b5b2 | StopYasdbCluster | - | yashandb | WAITING | - | 0 | -
------+------------------+------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
task | 10bbc08200c6b5b2 | StopYasdbCluster | - | yashandb | RUNNING | - | 50 | -
------+------------------+------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
----------------------------------------------------------------------------------------------------------
task | 10bbc08200c6b5b2 | StopYasdbCluster | - | yashandb | SUCCESS | 0 | 100 | 2
------+------------------+------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS
[yashan@11g conf]$ yasboot cluster status
yasboot error: required flag --cluster not provided
[yashan@11g conf]$ ss -antpl | grep yas
LISTEN 0 128 192.168.52.171:1675 *:* users:(("yasom",pid=4436,fd=9))
LISTEN 0 128 192.168.52.171:1676 *:* users:(("yasagent",pid=4403,fd=8))
[yashan@11g conf]$ ss -antpl | grep yas
LISTEN 0 128 192.168.52.171:1675 *:* users:(("yasom",pid=4436,fd=9))
LISTEN 0 128 192.168.52.171:1676 *:* users:(("yasagent",pid=4403,fd=8))
[yashan@11g conf]$ yasboot cluster start -c yashandb
type | uuid | name | hostid | index | status | return_code | progress | cost
-----------------------------------------------------------------------------------------------------------
task | 55c6da733e9e1acb | StartYasdbCluster | - | yashandb | WAITING | - | 0 | -
------+------------------+-------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
-----------------------------------------------------------------------------------------------------------
task | 55c6da733e9e1acb | StartYasdbCluster | - | yashandb | RUNNING | - | 50 | -
------+------------------+-------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
-----------------------------------------------------------------------------------------------------------
task | 55c6da733e9e1acb | StartYasdbCluster | - | yashandb | SUCCESS | 0 | 100 | 2
------+------------------+-------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS
对比端口对应的服务进程:
[yashan@11g conf]$ ss -antpl | grep yas
LISTEN 0 128 192.168.52.171:1675 *:* users:(("yasom",pid=4436,fd=9))
LISTEN 0 128 192.168.52.171:1676 *:* users:(("yasagent",pid=4403,fd=8))
LISTEN 0 128 192.168.52.171:1688 *:* users:(("yasdb",pid=6503,fd=16))
LISTEN 0 128 192.168.52.171:1689 *:* users:(("yasdb",pid=6503,fd=14))
根据pid看相应的进程名称
[yashan@11g run]$ ps -ef|grep yas
root 3814 1396 0 14:03 pts/0 00:00:00 su - yashan
yashan 3815 3814 0 14:03 pts/0 00:00:00 -bash
yashan 4403 1 0 14:07 ? 00:00:00 /home/yashan/yasdb_home/yashandb/23.1.1.100/bin/yasagent --init -c yashandb -l 192.168.52.171:1676 --host-id host0001 -k fe443ce37ba87c54 -d
yashan 4436 1 0 14:07 ? 00:00:02 /home/yashan/yasdb_home/yashandb/23.1.1.100/bin/yasom --init -c yashandb -l 192.168.52.171:1675 -k fe443ce37ba87c54 -d
yashan 6811 1 5 14:38 ? 00:02:31 /home/yashan/yasdb_home/yashandb/23.1.1.100/bin/yasdb nomount -D /home/yashan/yasdb_home/yashandb/data/yashandb/db-1-1
yashan 9255 3815 0 15:25 pts/0 00:00:00 ps -ef
yashan 9256 3815 0 15:25 pts/0 00:00:00 grep --color=auto yas
[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> shutdown immediate
2 ;
Succeed.
SQL> exit
[yashan@11g conf]$ ss -antpl | grep yas
LISTEN 0 128 192.168.52.171:1675 *:* users:(("yasom",pid=4436,fd=9))
LISTEN 0 128 192.168.52.171:1676 *:* users:(("yasagent",pid=4403,fd=8))
[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
YAS-00402 failed to connect socket, errno 111, error message "Connection refused"
please input user nyasboot cluster start -c yashandb
type | uuid | name | hostid | index | status | return_code | progress | cost
-----------------------------------------------------------------------------------------------------------
task | dac24e73411c7bfc | StartYasdbCluster | - | yashandb | WAITING | - | 0 | -
------+------------------+-------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
-----------------------------------------------------------------------------------------------------------
task | dac24e73411c7bfc | StartYasdbCluster | - | yashandb | RUNNING | - | 50 | -
------+------------------+-------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
-----------------------------------------------------------------------------------------------------------
task | dac24e73411c7bfc | StartYasdbCluster | - | yashandb | SUCCESS | 0 | 100 | 2
------+------------------+-------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS
[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1688 as sysdba
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
YAS-02143 invalid username/password, login denied
please input user name: ^C\^H
please input password:
YASQL-00015 null password given; logon denied
please input user name: [yashan@11g conf]$
[yashan@11g conf]$
[yashan@11g conf]$
[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> shutdown;
Succeed.
SQL> exit
[yashan@11g conf]$ yasboot cluster start -c yashandb -m nomount
type | uuid | name | hostid | index | status | return_code | progress | cost
-----------------------------------------------------------------------------------------------------------
task | 12945f95f43d11b5 | StartYasdbCluster | - | yashandb | WAITING | - | 0 | -
------+------------------+-------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
-----------------------------------------------------------------------------------------------------------
task | 12945f95f43d11b5 | StartYasdbCluster | - | yashandb | RUNNING | - | 50 | -
------+------------------+-------------------+--------+----------+---------+-------------+----------+------
type | uuid | name | hostid | index | status | return_code | progress | cost
-----------------------------------------------------------------------------------------------------------
task | 12945f95f43d11b5 | StartYasdbCluster | - | yashandb | SUCCESS | 0 | 100 | 2
------+------------------+-------------------+--------+----------+---------+-------------+----------+------
task completed, status: SUCCESS
[yashan@11g conf]$ yasql sys/abcd1234\$@192.168.52.171:1688
YashanDB SQL Personal Edition Release 23.1.1.100 x86_64
Connected to:
YashanDB Server Personal Edition Release 23.1.1.100 x86_64 - X86 64bit Linux
SQL> select status from v$Intance;
[1:20]YAS-02078 the database is not open
SQL> SELECT status FROM V$INSTANCE;
STATUS
-------------
STARTED
1 row fetched.
SQL> alter database mount;
Succeed.
SQL> select status from v$instance;
STATUS
-------------
MOUNTED
1 row fetched.
SQL> alter database open;
Succeed.
SQL> select status from v$instance;
STATUS
-------------
OPEN
1 row fetched.
小结:
崖山yashandb数据库的web可视化安装过程超级简单方便,比oracle方便多了。
常用的相关视图和操作命令几乎一样,如果是oracle dba,对于yashandb的学习毫无压力。对oracle的兼容性相当不错!
比较关心yashandb的实际业务场景稳定性、可靠性以及高性能等方面的表现。
可惜的是,个人版无法体验分布式集群和共享存储集群的表现。
个人愚见:为何不学习oracle的市场策略,paper license?不设置企业版试用门槛,用的人自然就会越来越多了,用的人多了,市场机会还会差吗?
从发布会看,做技术的比较实在,有干货,哈哈。。。祝Yashandb越来越好!
最后修改时间:2023-11-10 12:35:53
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。