赞
踩
下面是自己考巨杉SCDP证书时整理的命令
#edit by lzl
#
第一讲:
sudo su
tar -xvf sequoiadb-3.4-linux_x86_64.tar.gz
cd sequoiadb-3.4
chmod +x se*.run
./setup.sh
#[仅回车,sdbadmin/sdbadmin,会重复几次]
su - sdbadmin
cd /opt/sequoiadb/tools/deploy/
./quickDeploy.sh
sdblist
/opt/sequoiasql/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root
CREATE DATABASE company;
USE company;
CREATE TABLE employee
(
empno INT AUTO_INCREMENT PRIMARY KEY,
ename VARCHAR(128),
age INT
);
INSERT INTO employee (empno,ename, age) VALUES (1,"Bob", 29);
exit;
sdb
var db = new Sdb("localhost", 11810);
db.company.employee.insert( { ename: "Abe", age: 18 } );
db.company.employee.insert( { ename: "Alice", age: 47 } );
db.company.employee.insert( { ename: "Jane", age: 29 } );
db.company.employee.find();
db.company.employee.update( { $set: { ename: "Tom" } }, { empno: 2 } );
db.company.employee.remove( { empno: 4 } );
第二讲:
su - sdbadmin
#passwd:sdbadmin
sba
var db = new Sdb("localhost", 11810);
db.createDomain("company_domain", [ "group1", "group2", "group3" ], { AutoSplit: true } );
db.createCS("company", { Domain: "company_domain" } );
db.company.createCL("employee", { "ShardingKey": { "_id": 1 }, "ShardingType": "hash", "ReplSize": -1, "Compressed": true, "CompressionType": "lzw", "AutoSplit": true, "EnsureShardingIndex": false } );
db.updateConf( { transisolation: 1 }, { Global: true } );
db.transBegin();
db.company.employee.insert( { id: 10001, ename: "Jack", age: 48 } );
db.transRollback();
db.company.employee.find();
db.transBegin();
db.company.employee.insert( { id: 10001, ename: "Jack", age: 48 } );
db.transCommit();
db.company.employee.find();
for (var i = 0; i < 1000; i++) { db.company.employee.insert( { ename: "TEST", age: 20 } ) };
db.backup( { Name: "cluster_backup", Path: "/opt/sequoiadb/tmp/%g", Overwrite: true, Description: "full backup" } );
db.company.employee.insert( { id: 10002, ename: "Jane", age: 32 } );
db.backup( { Name: "cluster_backup", Path: "/opt/sequoiadb/tmp/%g", EnsureInc: true } );
db.dropCS("company");
quit;
sdbstop -t all
sdbrestore -p /opt/sequoiadb/tmp/SYSCatalogGroup/ -n cluster_backup -b 0 -i 0
sdbrestore -p /opt/sequoiadb/tmp/group1/ -n cluster_backup -b 0 -i 0
sdbrestore -p /opt/sequoiadb/tmp/group2/ -n cluster_backup -b 0 -i 0
sdbrestore -p /opt/sequoiadb/tmp/group3/ -n cluster_backup -b 0 -i 0
sdbstart -t all
sdb
var db = new Sdb("localhost", 11810);
db.createRG("group4");
db.getRG("group4").createNode("sdbserver1", 11850, "/opt/sequoiadb/database/data/11850/",{logfilenum:5});
db.getRG("group4").start();
db.getDomain("company_domain").addGroups( { Groups: [ 'group4' ] } );
db.company.employee.split("group1", "group4", 25);
db.company.employee.split("group2", "group4", 25);
db.company.employee.split("group3", "group4", 25);
第三讲:
su - sdbadmin
cd /opt/sequoiasql/mysql
bin/sdb_sql_ctl addinst myinst -D database/3306/
/opt/sequoiasql/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root
CREATE DATABASE company;
USE company;
CREATE TABLE employee
(
empno INT ,
ename VARCHAR(128),
age INT
);
INSERT INTO employee (empno,ename, age) VALUES (10001,"Georgi", 48);
select * from employee;
CREATE USER 'metauser'@'%' IDENTIFIED BY 'metauser';
GRANT ALL ON *.* TO 'metauser'@'%';
FLUSH PRIVILEGES;
CREATE DATABASE metastore CHARACTER SET 'latin1' COLLATE 'latin1_bin';
\q
================
cd /home/sdbadmin/soft
tar -zxvf spark-2.4.4-bin-hadoop2.7.tar.gz -C /home/sdbadmin
cd
ssh-keygen -t rsa
ssh-copy-id sdbadmin@sdbserver1
cp /opt/sequoiadb/spark/spark-sequoiadb_2.11-3.4.jar /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/jars/
cp /opt/sequoiadb/java/sequoiadb-driver-3.4.jar /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/jars/
cp /home/sdbadmin/soft/mysql-jdbc.jar /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/jars/
cat > /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/conf/hive-site.xml << EOF
<configuration>
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/metastore?useSSL=false</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>metauser</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>metauser</value>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>true</value>
<description>creates necessary schema on a startup if one doesn't exist. set this to false, after creating it once</description>
</property>
</configuration>
EOF
cd /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/conf
cp log4j.properties.template /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/conf/log4j.properties
cd /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/conf
sed -i 's/log4j.rootCategory=INFO, console/log4j.rootCategory=ERROR, console/g' log4j.properties
cd /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/conf
cp spark-env.sh.template /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/conf/spark-env.sh
cd /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/conf
echo "SPARK_MASTER_HOST=sdbserver1" >> spark-env.sh
cd /home/sdbadmin/spark-2.4.4-bin-hadoop2.7/
sbin/start-all.sh
jps
bin/spark-sql
CREATE DATABASE company;
USE company;
CREATE TABLE company.employee
(
empno INT,
ename STRING,
age INT
) USING com.sequoiadb.spark OPTIONS (host 'localhost:11810', collectionspace 'company', collection 'employee', username '', password '');
SELECT AVG(age) FROM company.employee;
cd /opt/sequoiasql/postgresql
bin/sdb_sql_ctl addinst myinst -D database/5432/
bin/sdb_sql_ctl start myinst
bin/sdb_sql_ctl createdb company myinst
bin/psql -p 5432 company
CREATE EXTENSION sdb_fdw;
CREATE SERVER sdb_server FOREIGN DATA WRAPPER sdb_fdw
OPTIONS (address '127.0.0.1', service '11810', preferedinstance 'A', transaction 'on');
CREATE FOREIGN TABLE employee
(
empno INTEGER,
ename TEXT,
age INTEGER
) SERVER sdb_server
OPTIONS (collectionspace 'company', collection 'employee', decimal 'on');
第四讲:
su - sdbadmin
cd /opt/sequoiasql/mysql
bin/sdb_sql_ctl addinst myinst -D database/3306/
/opt/sequoiasql/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root
CREATE DATABASE company;
USE company;
CREATE TABLE employee
(
id INT,
name VARCHAR(128),
age INT,
) ;
CREATE TABLE employee
(
id INT,
name VARCHAR(128),
age INT
) ;
create index name_Index on employee(name);
INSERT INTO employee VALUES (10001, 'Georgi', 48);
BEGIN;
INSERT INTO employee VALUES (10002, 'Bezalel', 21);
SELECT * FROM employee;
COMMIT;
BEGIN;
INSERT INTO employee VALUES (10003, 'lazhu', 22);
SELECT * FROM employee;
ROLLBACK;
SELECT * FROM employee;
exit;
mkdir -p /opt/sequoiasql/tmp/
cat >> /opt/sequoiasql/mysql/database/3306/auto.cnf << EOF
secure_file_priv = "/opt/sequoiasql/tmp/"
EOF
/opt/sequoiasql/mysql/bin/sdb_sql_ctl restart myinst
/opt/sequoiasql/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root
use company;
SELECT * FROM employee
INTO OUTFILE '/opt/sequoiasql/tmp/employee_export.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
CREATE TABLE employee_import_test
(
id INT ,
name VARCHAR(128),
age INT
);
LOAD DATA INFILE '/opt/sequoiasql/tmp/employee_export.csv'
INTO TABLE employee_import_test
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
exit;
/opt/sequoiasql/mysql/bin/mysqldump -h 127.0.0.1 -u root company employee > /opt/sequoiasql/tmp/employee.sql
/opt/sequoiasql/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root
use company;
drop table employee;
SOURCE /opt/sequoiasql/tmp/employee.sql;
第五讲:
su - sdbadmin
cd /opt/sequoiasql/postgresql
bin/sdb_sql_ctl addinst myinst -D database/5432/
bin/sdb_sql_ctl start myinst
sdb
var db = new Sdb("localhost", 11810);
db.createDomain("company_domain", [ "group1", "group2", "group3" ], { AutoSplit: true } );
db.createCS("company", { Domain: "company_domain" } );
db.company.createCL("employee", { "ShardingKey": { "_id": 1 }, "ShardingType": "hash", "ReplSize": -1, "Compressed": true, "CompressionType": "lzw", "AutoSplit": true, "EnsureShardingIndex": false } );
quit;
/opt/sequoiasql/postgresql/bin/sdb_sql_ctl createdb company myinst
/opt/sequoiasql/postgresql/bin/psql -p 5432 company
CREATE EXTENSION sdb_fdw;
CREATE SERVER sdb_server FOREIGN DATA WRAPPER sdb_fdw
OPTIONS
(
address '127.0.0.1',
service '11810',
user '',
password '',
preferedinstance 'A',
transaction 'on'
);
CREATE FOREIGN TABLE employee
(
id INT,
name VARCHAR(128),
age INT
)
SERVER sdb_server
OPTIONS ( collectionspace 'company', collection 'employee', decimal 'on' );
INSERT INTO employee VALUES (10001, 'Jerry', 18);
begin;
INSERT INTO employee VALUES (10002, 'Tom', 20);
rollback;
select * from employee;
COPY (SELECT * FROM employee) TO '/opt/sequoiasql/postgresql/employee.csv' with delimiter ',' csv;
\! more /opt/sequoiasql/postgresql/employee.csv
\q
sdb
var db = new Sdb("localhost", 11810);
db.company.createCL("employee_bak", { "ShardingKey": { "_id": 1 }, "ShardingType": "hash", "ReplSize": -1, "Compressed": true, "CompressionType": "lzw", "AutoSplit": true, "EnsureShardingIndex": false } );
quit;
sdbimprt --hosts=localhost:11810 --type=csv --file=/opt/sequoiasql/postgresql/employee.csv --fields="id int, name string, age int" -c company -l employee_bak
第六讲:#####################
2)在 SequoiaDB 数据库上创建集合空间 company,集合 employee,写入如下数据:
su - sdbadmin
sdb
var db = new Sdb("localhost", 11810);
db.createDomain("company_domain", [ "group1" ], { AutoSplit: true } );
db.createCS("company", { Domain: "company_domain" } );
db.company.createCL("employee", { "ShardingKey": { "_id": 1 }, "ShardingType": "hash", "ReplSize": -1, "Compressed": true, "CompressionType": "lzw", "AutoSplit": true, "EnsureShardingIndex": false } );
db.company.employee.insert( { empno: 10001, ename: "Georgi", age: 48 } );
db.company.employee.insert( { empno: 10002, ename: "Bezalei", age: 21 } );
db.company.employee.insert( { empno: 10003, ename: "Parto", age: 33 } );
3)在 MySQL 实例创建数据库 company 和 数据表 employee 与 SequoiaDB 巨杉数据库存储引擎的 employee 集合映射;
/opt/sequoiasql/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root
CREATE DATABASE company;
USE company;
CREATE TABLE employee
(
empno int,
ename VARCHAR(128),
age INT
);
###########
GRANT ALL ON *.* TO 'metauser'@'%';
FLUSH PRIVILEGES;
CREATE DATABASE metastore CHARACTER SET 'latin1' COLLATE 'latin1_bin';
exit;
sdblist -l | grep -E "Name|coord"
/opt/sequoiasql/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root -e "SHOW VARIABLES LIKE 'sequoiadb_conn%';"
/opt/spark/bin/beeline -u 'jdbc:hive2://localhost:10000'
create database company;
use company;
CREATE TABLE employee
(
empno INT,
ename VARCHAR(128),
age INT
)
USING com.sequoiadb.spark OPTIONS
(
host 'localhost:21810',
collectionspace 'company',
collection 'employee',
preferredinstance 'S',
preferredinstancemode 'random',
preferredinstancestrict true
);
CREATE TABLE result USING com.sequoiadb.spark OPTIONS
(
host 'localhost:11810',
domain 'company_domain',
collectionspace 'company',
collection 'result',
autosplit true,
shardingkey '{_id:1}',
shardingtype 'hash',
compressiontype 'lzw'
) AS SELECT * FROM employee where age=(select min(age) from employee);
第七讲:
sdb
var db = new Sdb("localhost", 11810);
db.createDomain("company_domain", [ "group1", "group2", "group3" ], { AutoSplit: true });
db.createCS("company", { Domain: "company_domain" });
db.company.createCL("employee", {"ShardingKey": { "_id": 1 }, "ShardingType": "hash", "ReplSize": -1, "Compressed": true, "CompressionType": "lzw", "AutoSplit": true, "EnsureShardingIndex": false });
db.company.employee.insert( { "empno": 10001, "ename": "Georgi", "age": 48 } );
db.company.employee.insert( { "empno": 10002, "ename": "Bezalel", "age": 21 } );
db.company.employee.insert( { "empno": 10003, "ename": "Parto", "age": 33 } );
db.company.employee.insert( { "empno": 10004, "ename": "Chirstian", "age": 40 } );
db.company.employee.insert( { "empno": 10005, "ename": "Kyoichi", "age": 23 } );
db.company.employee.insert( { "empno": 10006, "ename": "Anneke", "age": 19 } );
db.company.employee.find( { "age": { "$gt": 20, "$lt": 30 } } );
db.company.employee.update( { "$set": { "age": 34 } }, { "empno": 10001 } );
db.company.employee.remove( { "empno": 10006 } );
db.createDomain("fs_domain", [ "group1", "group2", "group3" ], { AutoSplit: true } );db.createCS("fscs", { Domain: "fs_domain" } );
db.fscs.createCL("fscl", { "ShardingKey": { "_id": 1}, "ShardingType": "hash", "ReplSize": -1, "Compressed": true, "CompressionType": "lzw", "AutoSplit": true, "EnsureShardingIndex": false } );
quit;
mkdir -p /opt/sequoiadb/sequoiafs/mountpoint
mkdir -p /opt/sequoiadb/sequoiafs/conf/fscs_fscl/001/
mkdir -p /opt/sequoiadb/sequoiafs/log/fscs_fscl/001/
touch /opt/sequoiadb/sequoiafs/conf/fscs_fscl/001/sequoiafs.conf
sequoiafs /opt/sequoiadb/sequoiafs/mountpoint -i localhost:11810 -l fscs.fscl --autocreate -c /opt/sequoiadb/sequoiafs/conf/fscs_fscl/001/ --diagpath /opt/sequoiadb/sequoiafs/log/fscs_fscl/001/ -o big_writes -o max_write=131072 -o max_read=131072
cd /opt/sequoiadb/sequoiafs/mountpoint/
mkdir fsdir
ls -trl
cd /opt/sequoiadb/sequoiafs/mountpoint/fsdir
echo 'hello, this is a fsfile!' >> fsfile.txt
sdb
var db = new Sdb("localhost", 11810);
db.sequoiafs.fscl_file142361856883863522.find();
db.updateConf( { transactionon: true, transisolation: 1, translockwait: true } );
db.createDomain("metaDomain", [ "group1", "group2", "group3" ], { AutoSplit: true} );
db.createDomain("dataDomain", [ "group1", "group2", "group3" ], { AutoSplit: true} );
quit;
cd /opt/sequoiadb/tools/sequoias3
echo 'server.port=8002' >> config/application.properties
echo 'sdbs3.sequoiadb.url=sequoiadb://localhost:11810' >> config/application.properties
echo 'sdbs3.sequoiadb.meta.domain=metaDomain' >> config/application.properties
echo 'sdbs3.sequoiadb.data.domain=dataDomain' >> config/application.properties
/opt/sequoiadb/tools/sequoias3/sequoias3.sh start
curl -v -X POST "http://localhost:8002/users/?Action=CreateUser&UserName=s3user&role=admin" -H "Host: localhost:8002" -H "Authorization: AWS ABCDEFGHIJKLMNOPQRST:abcdefghijklmnopqrstuvwxyz0123456789ABCD"
curl -v -X POST "http://localhost:8002/users/?Action=GetAccessKey&UserName=s3user" -H "Host: localhost:8002" -H "Authorization: AWS ABCDEFGHIJKLMNOPQRST:abcdefghijklmnopqrstuvwxyz0123456789ABCD"
curl -v -X PUT "http://localhost:8002/sdbbucket" -H "Host: localhost:8002" -H "Authorization: AWS ABCDEFGHIJKLMNOPQRST:abcdefghijklmnopqrstuvwxyz0123456789ABCD"
curl -v -X GET "http://localhost:8002" -H "Host: localhost:8002" -H "Authorization: AWS ABCDEFGHIJKLMNOPQRST:abcdefghijklmnopqrstuvwxyz0123456789ABCD"
ls /opt/sequoiadb/version.conf
curl -X PUT -T "/opt/sequoiadb/version.conf" "http://localhost:8002/sdbbucket/version.conf" -H "Host: localhost:8002" -H "Authorization: AWS ABCDEFGHIJKLMNOPQRST:abcdefghijklmnopqrstuvwxyz0123456789ABCD" -H "Content-Type: text/plain"
curl -o /home/sdbadmin/version.conf -X GET "http://localhost:8002/sdbbucket/version.conf" -H "Host: localhost:8002" -H "Authorization: AWS ABCDEFGHIJKLMNOPQRST:abcdefghijklmnopqrstuvwxyz0123456789ABCD" -H "Content-Type: text/plain"
第八讲:
exam1:
1)新增数据节点组 group4 并在该数据组中创建 11850 数据节点:
sdb
var db = new Sdb("localhost", 11810);
var dataRG = db.createRG("group4");
dataRG.createNode("sdbserver1", 11850, "/opt/sequoiadb/database/data/11850/", { logfilenum: 5, transactionon: true } );
dataRG.start();
2)创建域 company_domain,其中域包含有 group1,group2,group3:
db.createDomain("company_domain", [ "group1", "group2", "group3" ], { AutoSplit: true } );
3)创建集合空间 company,存放于 company_domain 域中:
db.createCS("company", { Domain: "company_domain" } );
4)在集合空间 company 创建 ReplSize 为 0 的强一致集合 employee;
db.company.createCL("employee", { "ShardingKey": { "_id": 1 }, "ShardingType": "hash", "Compressed": true, "CompressionType": "lzw", "ReplSize": 1, "AutoSplit": true, "EnsureShardingIndex": false } );
db.snapshot(SDB_SNAP_CATALOG, { "Name": "company.employee" }, { "ReplSize": "" } );
db.company.employee.alter( { ReplSize: 0 } );
5)在 company.employee 表中插入数据为(empno:10001, ename:'Georgi', age:48);
db.company.employee.insert( { empno: 10001, ename: "Georgi", age: 48 } );
6)在 company 集合空间中创建以 tx_time 为分区键,字段类型为 date 的主集合 log;
db.company.createCL("log", { "IsMainCL": true, "ShardingKey": {"tx_time": 1 }, "ShardingType": "range" } );
7)分别创建 year2020.log 和 year2021.log 子集合,year2020 和year2021 为集合空间名。
两个子集合的 hash 分区键字段为 serial_no(log表中的主键字段,为序列号)。
db.createCS("year2020", { "Domain": "company_domain" } );
db.createCS("year2021", { "Domain": "company_domain" } );
db.year2020.createCL("log", { "ShardingKey": { "serial_no": 1 }, "ShardingType": "hash", "ReplSize": -1, "Compressed": true, "CompressionType": "lzw", "AutoSplit": true, "EnsureShardingIndex": false } );
db.year2021.createCL("log", { "ShardingKey": { "serial_no": 1 }, "ShardingType": "hash", "ReplSize": -1, "Compressed": true, "CompressionType": "lzw", "AutoSplit": true, "EnsureShardingIndex": false } );
并将两个子集合挂载到主集合 company.log,子集合 year2020.log 保存小于 2021年的数据,
而子集合 year2021.log 保存大于等于 2021 年的数据:
db.company.log.attachCL("year2020.log", { "LowBound": { "tx_time": MinKey() }, UpBound: { tx_time: { "$date": "2021-01-01" } } } );
db.company.log.attachCL("year2021.log", { LowBound: { "tx_time": { "$date": "2021-01-01" } }, "UpBound": { "tx_time": MaxKey() } } );
8)用 snapshot 中的集合快照查看 company.employee 的集合并输出查询结果到 /home/sdbadmin/snap_collection.log 文件中;
sdb 'var db=new Sdb("localhost", 11810)'
sdb 'db.snapshot(SDB_SNAP_COLLECTIONS, { Name: "company.employee" } )' > /home/sdbadmin/snap_collection.log
sdb 'db.close();'
cat /home/sdbadmin/snap_collection.log
9)用 snapshot 中的配置快照查看集群中所有协调节点、编目节点和数据节点的诊断日志路径并输出查询结果到 /home/sdbadmin/snap_diagpath.log 文件中;
sdb 'db = new Sdb("localhost", 11810)'
sdb 'db.snapshot(SDB_SNAP_CONFIGS)' > /home/sdbadmin/snap_diagpath.log
考试2:
1)通过 SequoiaSQL-MySQL 实例创建 company 数据库以及数据表 employee,字段为(empno INT, ename VARCHAR(128), age INT),其中 empno 为主键自增;
/opt/sequoiasql/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root
CREATE DATABASE company;
USE company;
CREATE TABLE employee
(
empno INT AUTO_INCREMENT PRIMARY KEY,
ename VARCHAR(128),
age INT
);
INSERT INTO employee (empno,ename, age) VALUES (10001,"Jacky", 36);
sdb
var db=new Sdb("localhost", 11810);
db.updateConf( { transisolation: 1 }, { Global: true } );
/opt/sequoiasql/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root
USE company;
begin;
INSERT INTO employee (ename, age) VALUES ("lazhu", 22);
commit;
begin;
update employee set age=20 where empno=10002;
commit;
sdbstop -p 31820
/opt/sequoiasql/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root
USE company;
begin;
INSERT INTO employee (ename, age) VALUES ("Susan", 32);
commit;
sdbstart -p 31820
sdb
var db = new Sdb("localhost", 11810);
db.updateConf( { instanceid: 1 }, { svcname: { "$in": [ "11820" ] } } );
sdbstop -r data
sdbstart -r data
sdb
var db = new Sdb("localhost", 11810);
db.updateConf( { instanceid: 2 }, { svcname: { "$in": [ "21820" ] } } );
db.updateConf( { preferedinstance: "2,1", preferedinstancemode: "ordered", preferedstrict: true }, { GroupName: "SYSCoord", svcname: "11810" } );
sdbstop -r data
sdbstart -r data
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。