WHERE
clause which should contain at least a primary key field. If there are multiple primary keys, separate them with and
.tar -xf TcaplusPbApi3.46.0.199033.x86_64_release_20201210.tar.gz -C tcaplus
bin
directory in tcaplus
and grant the tool executable permission:cd tcaplus/release/x86_64/binchmod +x tcaplus_client
./tcaplus_client
command, and the system will prompt you to enter the parameter information required for database connection. You can enter it based on your cluster information.app_id
indicates the cluster access ID, App
indicates the cluster, and zone
indicates the table group.## ./tcaplus_client--------------------------------------------------------------------------------invalid parameters, please start the client as following:./tcaplus_client -a app_id -z zone_id -s signature -d dir_server_url [-t table_name] [-l log_file.xml] [-T tdr_file.tdr] [-e execute_command]the params in [] are optional, and their order is not important.-a(--ap_id) APP ID-z(--zone_id) ZONE ID-s(--signature) PASSWORD-d(--dir) dir server addr-t(--table) table to add-l(--log) log file name that must be client_log.xml, and log class name be client-T(--tdr) tdr filename-e(--execute) SQL command need to execute, the content should be in quotes.e.g. ./tcaplus_client -a 2 -z 3 -s "FE6533875C8385C3" -d 172.25.40.181:9999 -T table_test.tdr -e "select a, b from table where key = 1;"--------------------------------------------------------------------------------
tb_online
has been created in the table group whose ID is 1:./tcaplus_client -a 2 -z 1 -s "test@Password1" -d 10.125.32.21:9999+------------------------------------------------------------------------------+| tcaplus_client x86_64 build at Wed Jan 18 22:08:38 CST 2017 || || Welcome! |+------------------------------------------------------------------------------+tcaplus>
help
after the prompt, and you can see detailed help information. Enter > help
to view how to use related commands.tcaplus>help--------------------------------------------------------------------------------help: show usage of commands, example: "help select;".show: get server status related information. executing "help show;" for details.exit/quit: exit the client.count: print record number in the database.desc: print table field name and type.select: query records from database.insert: insert a new record into database.replace: replace a record into the database.update: update a record in the database.delete: delete record(s) from database.dump: dump records from database.load: load records into the database.--------------------------------------------------------------------------------
Parameter | Description | Required |
-a | Access ID | Yes |
-z | Table group ID | Yes |
-s | Cluster password | Yes |
-d | Cluster IP and port | Yes |
-t | Table name | No |
-l | The output setting of log files. The file name must be "client_log.xml". | No |
-T | TDR file path | No |
-e | The SQL statements to execute | No |
-v | The version to query | No |
< | Redirect SQL statements to client to execute. | No |
[root@test-PC0 /opt]# ./tcaplus_client -a 2 -z 3 -s C12901752D0D3347 -d 8.x.x.8:9999 -T /mnt/e/tdr/2.3.table_list.tdr====== Welcome to use tcaplus_client, use "help" to show usage ======tcaplus > exit[root@test-PC0 /opt]# ./tcaplus_client -a 2 -z 3 -s C12901752D0D3347 -d 8.x.x.8:9999 -T /mnt/e/tdr/2.3.table_list.tdr -e "show tables;"-------------------------------------------| Table Name Type |-------------------------------------------| MTownRoleInfo GENERIC || table_generic GENERIC || table_generic_xiahuaxian GENERIC || table_list LIST || test_table GENERIC |-------------------------------------------
tdr -B -o ov_res.tdr ov_res.xml# Convert XML metadatabases to TDR binary databases.tdr -C -o ov_res.c --old_xml_tagset ov_res.xml# Convert metadatabases in old XML format (using the old tag set) to .c files.tdr -H -O "include" --add_custom_prefix="m_" --no_type_prefix# Convert XML metadatabases to .h files which are saved in the "include" directory.# Add the prefix "m_" to the member name of struct/union, but not add a type prefix.tdr -G -m Pkg -x ATTR -o Pkg.xml net_protocol.xml# Generate a configuration file in XML format through package (a data structure package customized by user).tdr -T -u prefixfile# Export the prefix table of the data member used when generating the .h file to the file "prefixfile".tdr -A --indent-size=8 net_protocol.xml# Generate ActionScript3 class files according to the protocol described in "net_protocol.xml". The generated class files are all indented with 8 spaces.tdr -P --indent-size=8 net_protocol.xml# Generate C++ class files according to the protocol described in "net_protocol.xml". The generated class files are all indented with 8 spaces.tdr -S --indent-size=8 net_protocol.xml# Generate C# class files according to the protocol described in "net_protocol.xml". The generated class files are all indented with 8 spaces.tdr -E 0x83010404# Query the error information of error code 0x83010404.
tdr2xml [-o --out_file=FILE] [-h --help] [-v --version] DRFILEThe description of each parameter is as follows:-o, --out_file=FILE: specify the name of the output file. Default value: a.xml.-h, --help: output help.-v, --version: output the version information.
tdr2xml –o net_cs.xml net_cs.tdr
Was this page helpful?