Query Ocient
Quick Start Querying
this example demonstrates a quick start to begin querying an {{ocient}} system prerequisites to get started querying in ocient, the following are required a valid username and password for your ocient system — these credentials can be obtained from your database administrator or system administrator network access to the sql nodes and the ip address of the hostname of these nodes in the ocient system the port used for sql nodes by default, this is 4050 a sql client or sql driver — this example uses the ocient jdbc driver see connect using jdbc docid\ eql yafaxip4xpah rj90 run a query with these prerequisites, you can construct a connection string for your sql client of choice, connect, and begin querying ocient in a few minutes this example assumes the use of the jdbc driver and cli if using a different connection method, see connect to ocient docid 3ogdk ko9evjyfqgs6n5h to complete step 2 step 1 create a connection string a connection string follows a standard format for ocient jdbc\ ocient //\<hostname or ip address> \<port>/\<database> in this example, you are going to replace each of the placeholders with the following port 4050 hostname or ip address 10 10 1 1 database system some systems use a hostname like sql1 example com instead of an ip address additionally, if you have a database configured already, use that instead of system to access your tables the final connection string is jdbc\ ocient //10 10 1 1 4050/system step 2 connect start the jdbc cli according to the instructions in connect using jdbc docid\ eql yafaxip4xpah rj90 you need to specify a username and password the fully qualified username is specified as \<username>@\<database> , so in your case, for a username of example user , enter example user\@system next, you should see an ocient cli prompt ocient> enter the connect statement using your connection string connect to jdbc\ ocient //10 10 1 1 4050/system; you receive a response similar to connected to to jdbc\ ocient //10 10 1 1 4050/system indicating that you are now connected step 3 run a query you can now query any user tables or system catalog tables to which you have access in the database system catalog tables provide a wealth of information about the underlying system and configuration because you are connected to the system database, you can begin with a few catalog queries at the ocient prompt, enter this sql statement that displays information for all tables in the system ocient> select from information schema tables; to filter this information, use the like predicate ocient> select from information schema tables where table name like '%data%'; now that you are connected, you can run any sql queries or perform database administrator operations like data definition language (ddl) statement reference docid\ e36p0yk3fcwdnuiimxkn2 or data control language (dcl) statement reference docid\ cq7pzjpzxsakbbsqsumai where you have permission related links general sql syntax docid\ ijazgahmd u0x4gsmz8e1 sql reference docid\ eaohxmozywvukdfizfpel