### Installer output example Source: https://docs.oracle.com/en-us/iaas/management-agents/doc/install-management-agent-chapter.html Example output from running installer.sh, showing the installation and configuration steps and the final success message. ```bash Checking pre-requisites Checking if any previous agent service exists Checking if OS has systemd or initd Checking available disk space for agent install Checking if /opt/oracle/mgmt_agent directory exists Checking if 'mgmt_agent' user exists 'mgmt_agent' user already exists, the agent will proceed installation without creating a new one. Checking Java version Trying /opt/jre21 Java version: found at /opt/jre21/bin/java Checking agent version Executing install Unpacking oracle.mgmt_agent-260722.4208.aix.zip using custom utility Java environment validated: /opt/jre21 Copying files to destination dir (/opt/oracle/mgmt_agent) Initializing software from template Checking if JavaScript engine is available to use Creating mgmt_agent daemon Agent Install Logs: /opt/oracle/mgmt_agent/installer-logs/installer.log.0 Agent install successful Executing configure Parsing input response file Validating install key Generating communication wallet Generating security artifacts Registering Management Agent Starting agent... Agent started successfully Agent setup completed and the agent is running. In the future agent can be started by directly running: sudo startsrc -s mgmt_agent Please use OCI CLI or OCI Management Agent console to validate the successful activation of your agent. Please make sure that you delete /full/path/to/input.rsp or store it in secure location. ``` -------------------------------- ### Install and start PostgreSQL server Source: https://docs.oracle.com/en/cloud/paas/goldengate-service/ocigg/quickstarts/replicate-data-from-postgresql-to-mysql.html Commands to install PostgreSQL server and required modules, create a database cluster, and enable/start the PostgreSQL service. Run these in order during environment setup. ```bash sudo yum install postgresql-server ``` ```bash sudo yum install postgresql-contrib ``` ```bash sudo postgresql-setup --initdb ``` ```bash sudo systemctl enable postgresql.service ``` ```bash sudo systemctl start postgresql.service ``` -------------------------------- ### Start full-tier installation with psft-dpk-setup.sh Source: https://docs.oracle.com/en/engineered-systems/oracle-database-appliance/19.32/odavm/index.html Starts the full-tier installation in silent mode using the configured response file. The installer automatically installs all required components and extracts additional ZIP files as needed. ```bash cd /root/soft/setup ./psft-dpk-setup.sh --silent --response_file=/root/soft/setup/fulltier.rsp ``` -------------------------------- ### Install PostgreSQL server Source: https://docs.oracle.com/en/cloud/paas/goldengate-service/ocigg/quickstarts/replicate-data-from-postgresql-to-atp.html Command to install the PostgreSQL server as part of the environment setup for this quickstart. Run this before configuring the source database. ```bash sudo yum install -y postgresql-server ``` -------------------------------- ### START_SERVICE Example Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/arpls/DBMS_SERVICE.html Example call to START_SERVICE that starts the service named 'ernie.example.com' on the local instance. ```sql DBMS_SERVICE.START_SERVICE('ernie.example.com'); ``` -------------------------------- ### Example 12-24 Starting a Destination Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adque/jms-basic-operation.html Example 12-24: Starting a destination. Shows how to start both a topic and a queue using the AQjmsDestination start method. ```java TopicSession t_sess; QueueSession q_sess; Topic topic; Queue queue; (AQjmsDestination)topic.start(t_sess, true, true); (AQjmsDestination)queue.start(q_sess, true, true); ``` -------------------------------- ### Connect from Windows Start menu with SYS or / AS SYSDBA Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/admqs/getting-started-with-database-administration.html Example prompts shown when starting SQL*Plus from the Windows Start menu. Enter SYS or / as the user name followed by AS SYSDBA, then provide the password set up during installation. ```sqlplus Enter user-name: SYS AS SYSDBA Enter password: password or Enter user-name: / AS SYSDBA ``` -------------------------------- ### List install steps with install.sh Source: https://docs.oracle.com/en/engineered-systems/zero-data-loss-recovery-appliance/19.2/amogd/software.html List the steps that need to be run using the install utility. This example uses an XML file named ExadataConfigurations/Example_Inc-ra01.xml. ```bash $ ./install.sh -cf ExadataConfigurations/Example_Inc-ra01.xml -l ``` -------------------------------- ### Kickstart File Example Source: https://docs.oracle.com/en/engineered-systems/oracle-database-appliance/19.32/odavm/index.html Example kickstart file from an earlier manual installation with updated network information and a different root password. ```text # Network information network --bootproto=static --device=eth0 --gateway=ww.xx.yy.1 --ip=ww.xx.yy.zz --nameserver=aa.bb.cc.dd ``` -------------------------------- ### Run a specific install step with install.sh Source: https://docs.oracle.com/en/engineered-systems/zero-data-loss-recovery-appliance/19.2/amogd/software.html Run a specific step (step 1) using the install utility. This example uses an XML file named ExadataConfigurations/Example_Inc-ra01.xml. ```bash $ ./install.sh -cf ExadataConfigurations/Example_Inc-ra01.xml -s 1 ``` -------------------------------- ### Example kickstart file with network and root password Source: https://docs.oracle.com/en/engineered-systems/oracle-database-appliance/19.25/odavm/index.html A sample kickstart file based on an existing Oracle Linux installation, with updated network information and a different root password. Store it as /var/www/html/ks.txt on the HTTP server. ```kickstart # Network information network --bootproto=static --device=eth0 --gateway=ww.xx.yy.1 --ip=ww.xx.yy.zz --nameserver=aa.bb.cc.dd --netmask=iii.iii.iii.iii --noipv6 --activate network --hostname=mykvmhost # Root password rootpw welcome1 ``` -------------------------------- ### Cleanup Full-Tier Installation Source: https://docs.oracle.com/en/engineered-systems/oracle-database-appliance/19.32/odavm/index.html Clean up the full-tier installation by running the setup script with the --cleanup flag. This removes temporary files and prepares for mid-tier setup. ```bash cd /root/soft/setup ./psft-dpk-setup.sh --cleanup ``` -------------------------------- ### Example Get Data Guide in Hierarchical Pretty Format Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/arpls/DBMS_JSON.html Example call to GET_INDEX_DATAGUIDE that returns the data guide in hierarchical format with pretty-printing. It uses table T1 and JSON column PO. ```sql SELECT DBMS_JSON.GET_INDEX_DATAGUIDE(‘T1’, ‘PO’, DBMS_JSON.FORMAT_HIERARCHICAL, DBMS_JSON.PRETTY) FROM DUAL; ``` -------------------------------- ### Example Log4j properties files included with installation Source: https://docs.oracle.com/en/database/goldengate/big-data/26/gadbd/configure-articles.html Lists the three example Log4j properties files included with the installation and included in the classpath. These files can be enabled by editing the bootoptions property in the Java Adapter Properties file. ```text log4j-default.properties log4j-debug.properites log4j-trace.properties ``` -------------------------------- ### setup-root-ssh example Source: https://docs.oracle.com/en/bigdata/big-data-appliance/5.1/bigog/utilities.html Example of running setup-root-ssh without parameters, prompting for the root password and showing the output of adding SSH keys to servers. ```bash # setup-root-ssh Enter root password: password spawn /opt/oracle/bda/bin/dcli -c 192.168.42.37,192.168.42.38... -k root@192.168.42.37's password: root@192.168.42.38's password: . . . 192.168.42.37: ssh key added 192.168.42.38: ssh key added . . . setup-root-ssh succeeded ``` -------------------------------- ### get kv with prefix key path Source: https://docs.oracle.com/en/database/other-databases/nosql-database/24.4/admin/get.html Example of get kv with a prefix part of the major key path (/group) and -all -keyonly, returning all keys that start with that prefix. ```text kv -> get kv -key /group -all -keyonly /group/TC/-/user/bob /group/TC/-/user/john /group/TC/-/dep/IT /group/SZ/-/user/steve /group/SZ/-/user/diana ``` -------------------------------- ### Installer output for configure step Source: https://docs.oracle.com/en-us/iaas/management-agents/doc/install-management-agent-chapter.html Output when running the installer with a response file, showing configuration steps and successful agent start. ```text Executing configure Parsing input response file Validating install key Generating communication wallet Generating security artifacts Registering Management Agent Starting agent... Agent started successfully Agent setup completed and the agent is running. In the future agent can be started by directly running: sudo systemctl start mgmt_agent Please use OCI CLI or OCI Management Agent console to validate the successful activation of your agent. Please make sure that you delete /full/path/to/input.rsp or store it in secure location. ``` -------------------------------- ### Example installer.sh command Source: https://docs.oracle.com/en-us/iaas/management-agents/doc/install-management-agent-chapter.html Example of running installer.sh with a response file and a specific service identifier. ```bash sudo ./installer.sh /tmp/input.rsp mgmt_agent-oc1_phx-abc123 ``` -------------------------------- ### Get public link information with GET /documents/wcc/api/v1.1/publiclinks/{dLinkID} Source: https://docs.oracle.com/en/cloud/paas/webcenter-content/webcenter-content-api/index.html Request the public link information for a specific dLinkID using the GET /documents/wcc/api/v1.1/publiclinks/{dLinkID} endpoint. The response includes the link details such as dLinkID, dLinkType, dLinkName, and access code. The example uses the GUID LDC52C7174798C6814B965C92EE76E200DEE6410B78B. ```HTTP GET …/documents/wcc/api/v1.1/publiclinks/LDC52C7174798C6814B965C92EE76E200DEE6410B78B ``` ```JSON Status = 200 Body { “dLinkID”: “LDC52C7174798C6814B965C92EE76E200DEE6410B78B”, “dLinkType”: “fFileGUID”, “dLinkName”: “external_review”, “dLinkDesc”: “a link for external review”, “fItemGUID”: “29504F74B07E6AC3F5B01002007ACE90”, “fOwner”: “adminUser”, “dLinkPrivilege”: “R”, “dAssignedUsers”: “@everybody”, “dAccessCode”: “myaccesscode”, “dCreatedDate”: “2024-07-11 21:40:27Z”, “dLastModifiedDate”: “2024-07-11 23:09:30Z”, “dExpirationDate”: “2024-10-01 07:00:00Z”, “dCreator”: “adminUser” } ``` -------------------------------- ### List install steps Source: https://docs.oracle.com/en/engineered-systems/zero-data-loss-recovery-appliance/19.2/amogd/software.html Command and output listing all steps for the install utility. ```bash $ ./install.sh -cf ExadataConfigurations/Example_Inc-ra01.xml -l 1. Validate Configuration File 2. Setup Required Files 3. Create Users 4. Setup Cell Connectivity 5. Verify Infiniband 6. Calibrate Cells 7. Create Cell Disks 8. Create Grid Disks 9. Configure Alerting 10. Install Cluster Software 11. Initialize Cluster Software 12. Install Database Software 13. Relink Database with RDS 14. Create ASM Diskgroups 15. Create Databases 16. Apply Security Fixes 17. Install Exachk 18. Setup ASR Alerting 19. Create Installation Summary 20. Resecure Machine ``` -------------------------------- ### Example: start the SQL shell Source: https://docs.oracle.com/en/database/other-databases/nosql-database/26.1/sqlfornosql/running-sql-shell.html Starts the SQL shell connecting to a store named kvstore at host node01 port 5000. After startup, the shell prompt sql-> appears. ```bash java -jar KVHOME/lib/sql.jar -helper-hosts node01:5000 -store kvstore sql-> ``` -------------------------------- ### Setup Environment for Running JMS Types Examples Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adque/jms-service-types-examples.html SQL script to create the JMS user, queue tables, queues, and start them. Includes a utility procedure to display RAW data. ```sql connect sys; enter password: password Rem Rem Create the JMS user: jmsuser Rem DROP USER jmsuser CASCADE; CREATE USER jmsuser IDENTIFIED BY jmsuser; GRANT EXECUTE ON DBMS_AQADM TO jmsuser; GRANT EXECUTE ON DBMS_AQ TO jmsuser; GRANT EXECUTE ON DBMS_LOB TO jmsuser; GRANT EXECUTE ON DBMS_JMS_PLSQL TO jmsuser; set echo offset verify offconnect sysDROP USER jmsuser CASCADE;ACCEPT password CHAR PROMPT 'Enter the password for JMSUSER: ' HIDECREATE USER jmsuser IDENTIFIED BY &password;GRANT DBA, AQ_ADMINISTRATOR_ROLE, AQ_USER_ROLE to jmsuser;GRANT EXECUTE ON DBMS_AQADM TO jmsuser;GRANT EXECUTE ON DBMS_AQ TO jmsuser;GRANT EXECUTE ON DBMS_LOB TO jmsuser;GRANT EXECUTE ON DBMS_JMS_PLSQL TO jmsuser;connect jmsuser/&password Rem Rem Creating five AQ queue tables and five queues for five payloads: Rem SYS.AQ$_JMS_TEXT_MESSAGE Rem SYS.AQ$_JMS_BYTES_MESSAGE Rem SYS.AQ$_JMS_STREAM_MESSAG Rem SYS.AQ$_JMS_MAP_MESSAGE Rem SYS.AQ$_JMS_MESSAGE Rem EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE (Queue_table => 'jmsuser.jms_qtt_text', Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE', compatible => '8.1.0'); EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE (Queue_table => 'jmsuser.jms_qtt_bytes', Queue_payload_type => 'SYS.AQ$_JMS_BYTES_MESSAGE', compatible => '8.1.0'); EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE (Queue_table => 'jmsuser.jms_qtt_stream', Queue_payload_type => 'SYS.AQ$_JMS_STREAM_MESSAGE', compatible => '8.1.0'); EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE (Queue_table => 'jmsuser.jms_qtt_map', Queue_payload_type => 'SYS.AQ$_JMS_MAP_MESSAGE', compatible => '8.1.0'); EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE (Queue_table => 'jmsuser.jms_qtt_general', Queue_payload_type => 'SYS.AQ$_JMS_MESSAGE', compatible => '8.1.0'); EXECUTE DBMS_AQADM.CREATE_QUEUE (Queue_name => 'jmsuser.jms_text_que', Queue_table => 'jmsuser.jms_qtt_text'); EXECUTE DBMS_AQADM.CREATE_QUEUE (Queue_name => 'jmsuser.jms_bytes_que', Queue_table => 'jmsuser.jms_qtt_bytes'); EXECUTE DBMS_AQADM.CREATE_QUEUE (Queue_name => 'jmsuser.jms_stream_que', Queue_table => 'jmsuser.jms_qtt_stream'); EXECUTE DBMS_AQADM.CREATE_QUEUE (Queue_name => 'jmsuser.jms_map_que', Queue_table => 'jmsuser.jms_qtt_map'); EXECUTE DBMS_AQADM.CREATE_QUEUE (Queue_name => 'jmsuser.jms_general_que', Queue_table => 'jmsuser.jms_qtt_general'); Rem Rem Starting the queues and enable both enqueue and dequeue Rem EXECUTE DBMS_AQADM.START_QUEUE (Queue_name => 'jmsuser.jms_text_que'); EXECUTE DBMS_AQADM.START_QUEUE (Queue_name => 'jmsuser.jms_bytes_que'); EXECUTE DBMS_AQADM.START_QUEUE (Queue_name => 'jmsuser.jms_stream_que'); EXECUTE DBMS_AQADM.START_QUEUE (Queue_name => 'jmsuser.jms_map_que'); EXECUTE DBMS_AQADM.START_QUEUE (Queue_name => 'jmsuser.jms_general_que'); Rem The supporting utility used in the example to help display results in SQLPLUS enviroment Rem Rem Display a RAW data in SQLPLUS Rem create or replace procedure display_raw(rdata raw) IS pos pls_integer; length pls_integer; BEGIN pos := 1; length := UTL_RAW.LENGTH(rdata); ``` -------------------------------- ### Example output of installed kernels Source: https://docs.oracle.com/en/database/oracle/key-vault/21.15/okvig/upgrading-oracle-key-vault-earlier-21-x-release-multi-master-cluster-environment1.html Example output showing two installed kernels. ```text kernel-uek-4.14.35-2047.504.2.el7uek.x86_64 kernel-uek-5.4.17-2136.329.3.1.el8uek.x86_64 ``` -------------------------------- ### Create VM with kickstart installation Source: https://docs.oracle.com/en-us/iaas/oracle-linux/oci/index.htm Performs a kickstart installation by injecting the kickstart file /root/kvm_vm_002_ks.cfg and passing ks=file:kvm_vm_002_ks.cfg in extra-args. Uses a storage pool and VNIC. ```bash oci-kvm create --domain kvm_vm_002 --pool vm_pool_001 --disk-size=24 --net ens5 \ --virt --vcpus 2 --memory 8192 --boot cdrom,hd --location /isos/OracleLinux.iso --nographics \ --console pty,target_type=serial --console pty,target_type=virtio --noautoconsole --os-variant=ol7.9 \ --initrd-inject /root/kvm_vm_002_ks.cfg --extra-args="ks=file:kvm_vm_002_ks.cfg console=ttyS0,115200n8" ``` -------------------------------- ### COUNT example with START and END Source: https://docs.oracle.com/en/database/goldengate/core/26/logdump-ref/logdump-commands.html Example of COUNT with START and END time options. ```logdump COUNT START 2011-01-11 12:00:00 , END 2011-01-12 12:00:00 ``` -------------------------------- ### curl GET example Source: https://docs.oracle.com/en-us/iaas/Content/APIGateway/Tasks/apigatewayinvokingdeployedapi.htm Example curl command using the GET method to call a deployed API. ```bash curl -k -X GET https://lak...sjd.apigateway.us-phoenix-1.oci.customer-oci.com/marketing/hello/ ``` -------------------------------- ### Run the Go SDK example Source: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cloudshellquickstart_go.htm Runs the main.go file to execute the Go SDK example. ```bash go run main.go ``` -------------------------------- ### Installer output for successful agent setup Source: https://docs.oracle.com/en-us/iaas/management-agents/doc/install-management-agent-chapter.html Sample output from a successful installation and configuration. Shows pre-requisite checks, installation steps, and final confirmation. Also notes that the response file should be deleted or stored securely. ```text sudo ./installer.sh /input.rsp mgmt_agent-oc1_phx-abc123 Checking pre-requisites Checking if any previous agent service exists Checking if OS has systemd or initd Checking available disk space for agent install Checking if /opt/oracle/mgmt_agent-oc1_phx-abc123 directory exists Checking if 'mgmt_agent' user exists Checking Java version JAVA_HOME is not set or not readable to root Trying default path /usr/bin/java Java version: 1.8.0_282 found at /usr/bin/java Checking agent version Executing install Unpacking software zip Copying files to destination dir (/opt/oracle/mgmt_agent-oc1_phx-abc123) Initializing software from template Checking if JavaScript engine is available to use Creating mgmt_agent-oc1_phx-abc123 daemon Agent Install Logs: /opt/oracle/mgmt_agent-oc1_phx-abc123/installer-logs/installer.log.0 Agent install successful Executing configure Parsing input response file Validating install key Generating communication wallet Generating security artifacts Registering Management Agent Starting agent... Agent started successfully Agent setup completed and the agent is running. In the future agent can be started by directly running: sudo systemctl start mgmt_agent-oc1_phx-abc123 Please make sure that you delete /input.rsp or store it in secure location. ``` -------------------------------- ### GET /DrConfig/drConfigStartStandby Source: https://docs.oracle.com/en/engineered-systems/private-cloud-appliance/3.0-latest/seapi/api-admin.html Start the standby DR configuration. ```APIDOC ## GET /DrConfig/drConfigStartStandby ### Description Start the standby DR configuration. ### Method GET ### Endpoint `https://{host}:{port}/{basePath}/DrConfig/drConfigStartStandby` ``` -------------------------------- ### Ingest and retrieve document with k-NN index Source: https://docs.oracle.com/en-us/iaas/Content/search-opensearch/Concepts/ocigenaiconnector.htm Ingests a document into the index using the ingestion pipeline, then retrieves it with a GET request and starts ingesting a second document. The document text is an example passage about antibiotic resistance. ```json PUT /conversation-demo-index-knn/_doc/1 { "text": "The emergence of resistance of bacteria to antibiotics is a common phenomenon. Emergence of resistance often reflects evolutionary processes that take place during antibiotic therapy. The antibiotic treatment may select for bacterial strains with physiologically or genetically enhanced capacity to survive high doses of antibiotics. Under certain conditions, it may result in preferential growth of resistant bacteria, while growth of susceptible bacteria is inhibited by the drug. For example, antibacterial selection for strains having previously acquired antibacterial-resistance genes was demonstrated in 1943 by the Luria–Delbrück experiment. Antibiotics such as penicillin and erythromycin, which used to have a high efficacy against many bacterial species and strains, have become less effective, due to the increased resistance of many bacterial strains." } GET /conversation-demo-index-knn/_doc/1 PUT /conversation-demo-index-knn/_doc/2 ``` -------------------------------- ### Example Configuration (Windows) Source: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm Example configuration file for Windows. Uses %HOMEPATH% for the key file path and backslashes in the ADMIN_USER key_file. ```ini [DEFAULT] user=ocid1.user.oc1.. fingerprint= key_file=%HOMEPATH%\.oci\oci_api_key.pem tenancy=ocid1.tenancy.oc1.. region=us-ashburn-1 [ADMIN_USER] user=ocid1.user.oc1.. fingerprint= key_file=keys\admin_key.pem pass_phrase= ``` -------------------------------- ### Example 12-12: Getting a Queue or Topic in LDAP Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adque/jms-basic-operation.html Example 12-12: Gets a topic from LDAP using JNDI. Sets the same environment properties as the QueueConnectionFactory example, then looks up the topic. ```java Hashtable env = new Hashtable(5, 0.75f); DirContext ctx; topic topic_1; /* the following statements set in hashtable env: * service provider package * the URL of the ldap server * the distinguished name of the database server * the authentication method (simple) * the LDAP username * the LDAP user password */ env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://sun-456:389"); env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, "cn=db1aquser1,cn=acme,cn=com"); env.put(Context.SECURITY_CREDENTIALS, "welcome"); ctx = new InitialDirContext(env); ctx = (DirContext)ctx.lookup("cn=OracleDBQueues,cn=db1,cn=Oraclecontext,cn=acme,cn=com"); topic_1 = (topic)ctx.lookup("cn=topic_1"); ``` -------------------------------- ### Set JAVA_HOME Example for Ubuntu Source: https://docs.oracle.com/en-us/iaas/Content/developer/spring-on-k8s/01oci-spring-k8s-summary.htm Example of setting JAVA_HOME for Ubuntu. ```bash # set JAVA_HOME in Ubuntu export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 ``` -------------------------------- ### Create namespace and table, then show and describe Source: https://docs.oracle.com/en/database/other-databases/nosql-database/25.3/java-driver-table/showing-and-describing-namespace-information.html Use this SQL CLI sequence to create a namespace 'ns1' and a table 'ns1:foo', then verify the namespace hierarchy with SHOW namespaces and SHOW table ns1:foo, and inspect table details with DESCRIBE table ns1:foo. The output shows the expected results for each command. ```sql sql-> create namespace ns1; Statement completed successfully sql-> create table ns1:foo (id integer, primary key (id)); Statement completed successfully sql-> show namespaces; namespaces ns1 sysdefault sql-> show table ns1:foo; tableHierarchy(namespace ns1) foo sql-> describe table ns1:foo; === Information === +-----------+------+-----+-------+----------+----------+--------+----------+---------+-------------+ | namespace | name | ttl | owner | sysTable | r2compat | parent | children | indexes | description | +-----------+------+-----+-------+----------+----------+--------+----------+---------+-------------+ | ns1 | foo | | | N | N | | | | | +-----------+------+-----+-------+----------+----------+--------+----------+---------+-------------+ === Fields === +----+------+---------+----------+-----------+----------+------------+----------+ | id | name | type | nullable | default | shardKey | primaryKey | identity | +----+------+---------+----------+-----------+----------+------------+----------+ | 1 | id | Integer | N | NullValue | Y | Y | | +----+------+---------+----------+-----------+----------+------------+----------+ ``` -------------------------------- ### Deploy the Hello World Helidon example application Source: https://docs.oracle.com/en/cloud/iaas/verrazzano/vzdoc/docs/setup/quickstart Deploy the Hello World Helidon example application: create and label a namespace, apply the component and application resources, wait for pods to be ready, save the load balancer host, and get the default message. The expected response is {"message":"Hello World!"}. ```bash $ kubectl create namespace hello-helidon $ kubectl label namespace hello-helidon verrazzano-managed=true istio-injection=enabled ``` ```bash $ kubectl apply -f https://raw.githubusercontent.com/verrazzano/verrazzano/v1.7.1/examples/hello-helidon/hello-helidon-comp.yaml -n hello-helidon $ kubectl apply -f https://raw.githubusercontent.com/verrazzano/verrazzano/v1.7.1/examples/hello-helidon/hello-helidon-app.yaml -n hello-helidon ``` ```bash $ kubectl wait \ --for=condition=Ready pods \ --all -n hello-helidon \ --timeout=300s # Sample output pod/hello-helidon-deployment-78468f5f9c-czmp4 condition met ``` ```bash $ HOST=$(kubectl get gateways.networking.istio.io hello-helidon-hello-helidon-gw \ -n hello-helidon \ -o jsonpath='{.spec.servers[0].hosts[0]}') ``` ```bash $ curl -sk \ -X GET \ "https://${HOST}/greet" # Expected response {"message":"Hello World!"} ``` -------------------------------- ### Check disk space with df -h Source: https://docs.oracle.com/en/engineered-systems/oracle-database-appliance/19.32/odavm/index.html Run `df -h` as root on the Oracle Database Appliance KVM guest VM to verify at least 200GB of available disk space in the installation directory (commonly under /root) before starting the full-tier installation. The example output shows the filesystem layout and available space. ```bash [root@dbserver ~]# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 16G 0 16G 0% /dev tmpfs 16G 0 16G 0% /dev/shm tmpfs 16G 9.2M 16G 1% /run tmpfs 16G 0 16G 0% /sys/fs/cgroup /dev/mapper/ol-root 270G 142G 129G 53% / /dev/mapper/ol-home 64G 491M 64G 1% /home /dev/vda1 1014M 563M 452M 56% /boot tmpfs 3.2G 12K 3.2G 1% /run/user/42 tmpfs 3.2G 0 3.2G 0% /run/user/0 ``` -------------------------------- ### Start and Enable libvirt Daemons Source: https://docs.oracle.com/en/operating-systems/oracle-linux/9/kvm-user/kvm-ManageLibvirtdDaemons.html Commands to start and enable the libvirt daemons on an Oracle Linux 9 KVM host. Requires virtualization packages installed and administrator privileges. ```bash systemctl start libvirtd systemctl enable libvirtd ``` -------------------------------- ### Example 15-2 Getting Underlying OracleOCIConnectionPool from JMS Connection Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adque/jms-shared-interfaces.html Example showing how to get the underlying OracleOCIConnectionPool from a JMS connection using AQjmsConnection.getOCIConnectionPool(). ```java oracle.jdbc.pool.OracleOCIConnectionPool cpool; QueueConnection jms_conn; cpool = ((AQjmsConnection)jms_conn).getOCIConnectionPool(); ``` -------------------------------- ### Create working directory and move to it Source: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cloudshellquickstart_java.htm Creates a directory named java_demo and changes into it. This is the first step in the quick start workflow. ```bash mkdir java_demo cd java_demo ``` -------------------------------- ### CLI: Get image details using OCID (example) Source: https://docs.oracle.com/en-us/iaas/Content/Registry/Tasks/registryviewingimagedetails.htm Example of the oci artifacts container image get command with a sample OCID. ```bash oci artifacts container image get --image-id ocid1.containerimage.oc1.phx.0.ansh81vru1zp.aaaaaaaalqzjyks... ``` -------------------------------- ### Run setup.sh with response file Source: https://docs.oracle.com/en-us/iaas/osmh/doc/register-non-oci-instance.htm Runs the setup script with the response file to configure the Management Agent. A successful setup returns the message 'Agent setup completed and the agent is running'; the OS Management Hub plugin setup can take a few more minutes in the background. ```bash sudo /opt/oracle/mgmt_agent/agent_inst/bin/setup.sh opts=/tmp/input.rsp ``` -------------------------------- ### Example 12-17 Getting a Queue Table Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adque/jms-basic-operation.html Example 12-17: Gets a queue table named 'bol_ship_queue_table' owned by 'boluser' using the AQjmsSession.getQueueTable method. ```java QueueSession q_sess; AQQueueTable q_table; q_table = ((AQjmsSession)q_sess).getQueueTable( "boluser", "bol_ship_queue_table"); ``` -------------------------------- ### Verify hardware and OS with cluvfy stage -post hwos Source: https://docs.oracle.com/en/engineered-systems/zero-data-loss-recovery-appliance/19.2/amogd/maintenance.html Run this command as root on a working compute server to verify hardware and operating system installation for the replacement server. The output should end with 'Post-check for hardware and operating system setup was successful'. ```bash $ cluvfy stage -post hwos -n replacement_server,working_server –verbose ``` -------------------------------- ### Set up Hive client: download config, unzip, download software, set HIVE_HOME and HIVE_CONF_DIR Source: https://docs.oracle.com/en/bigdata/big-data-appliance/5.1/bigug/users.html Steps to set up a Hive client: download the client configuration from Cloudera Manager (default port 7180), unzip it into the Hive configuration directory, download and decompress the Hive software, and set environment variables. Replace hive-home-dir and hive-conf-dir with the directories created in steps 3 and 5. ```bash $ wget -O hive-conf.zip http://bda01node03.example.com:7180/cmf/services/5/client-config Length: 1283 (1.3K) [application/zip] Saving to: 'hive-conf.zip' 100%[======================================>] 1,283 --.-K/s in 0.001s 2016-05-15 08:19:06 (2.17 MB/s) - `hive-conf.zip' saved [1283/1283] ``` ```bash $ unzip hive-conf.zip Archive: hive-conf.zip inflating: hive-conf/hive-env.sh inflating: hive-conf/hive-site.xml ``` ```bash $ wget http://archive.cloudera.com/cdh5/cdh/5/hive--cdh5..tar.gz Length: 49637596 (47M) [application/x-gzip] Saving to: 'hive--cdh5..tar.gz' 100%[======================================>] 49,637,596 839K/s in 47s 2016-05-15 08:22:18 (1.02 MB/s) - `hive--cdh5..tar.gz' saved [49637596/49637596] ``` ```bash $ tar -xvzf hive--cdh5..tar.gz hive--cdh5./ hive--cdh5./examples/ . . . ``` ```bash export HIVE_HOME=hive-home-dir export HIVE_CONF_DIR=hive-conf-dir alias hive=$HIVE_HOME/bin/hive ``` -------------------------------- ### Example 15-1 Getting Underlying JDBC Connection from JMS Session Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adque/jms-shared-interfaces.html Example showing how to get the underlying JDBC connection from a JMS session using AQjmsSession.getDBConnection(). ```java java.sql.Connection db_conn; QueueSession jms_sess; db_conn = ((AQjmsSession)jms_sess).getDBConnection(); ``` -------------------------------- ### Get Permission Information - Example Response Source: https://docs.oracle.com/en/cloud/paas/webcenter-content/webcenter-content-api/index.html Example response body for the GET /documents/wcc/api/v1.1/users/permissions endpoint, showing the user's security groups and security flags. ```json { "dName": "weblogic", "securityGroups": [ { "dGroupName": "Public", "privilege": "15" }, { "dGroupName": "RecordsGroup", "privilege": "15" }, { "dGroupName": "Reservation", "privilege": "15" }, { "dGroupName": "Secure", "privilege": "15" } ], "userSecurityFlags": [ { "flag": "IsAdmin", "value": "1" }, { "flag": "AdminAtLeastOneGroup", "value": "1" }, { "flag": "IsSubAdmin", "value": "1" }, { "flag": "IsSysManager", "value": "1" }, { "flag": "IsContributor", "value": "1" }, { "flag": "ActAsAnonymous", "value": "0" } ] } ``` -------------------------------- ### Example: Using CREATE_REQUEST_CONTEXT with BEGIN_REQUEST Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/arpls/UTL_HTTP.html Example showing how to create a request context with a wallet, enable cookies, and begin an HTTP request using that context. Uses a file-based wallet path and automatically begins the request to example.com. ```plsql DECLARE request_context UTL_HTTP.REQUEST_CONTEXT_KEY; req utl_http.req; BEGIN request_context := UTL_HTTP.CREATE_REQUEST_CONTEXT( wallet_path => 'file:/oracle/wallets/test_wallets', wallet_password => NULL, enable_cookies => TRUE, max_cookies => 300, max_cookies_per_site => 20); req := UTL_HTTP.BEGIN_REQUEST( url => 'http://www.example.com/', request_context => request_context); END; ``` -------------------------------- ### Example script.txt for data store configuration Source: https://docs.oracle.com/en/database/other-databases/nosql-database/25.3/admin/create-script-configure-data-store.html Example script file (script.txt) that configures a data store named mystore. It deploys a zone, storage nodes, and an admin, creates a pool, joins storage nodes, creates a topology, and deploys it, then exits. ```bash ### Begin Script ### configure -name mystore plan deploy-zone -name "Boston" -rf 3 -wait plan deploy-sn -zn zn1 -host -port 5000 -wait plan deploy-admin -sn sn1 -wait pool create -name BostonPool pool join -name BostonPool -sn sn1 plan deploy-sn -zn zn1 -host -port 5000 -wait pool join -name BostonPool -sn sn2 plan deploy-sn -zn zn1 -host -port 5000 -wait pool join -name BostonPool -sn sn3 topology create -name topo -pool BostonPool -partitions 300 plan deploy-topology -name topo -wait exit ### End Script ### ``` -------------------------------- ### Example 12-7 Getting a QueueConnectionFactory with JDBC URL Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adque/jms-basic-operation.html Example showing how to get a QueueConnectionFactory using a JDBC URL and properties, including setting the internal_logon property to sysdba. ```java String url = "jdbc:oracle:oci10:internal/oracle" Properties info = new Properties(); QueueConnectionFactory qc_fact; info.put("internal_logon", "sysdba"); qc_fact = AQjmsFactory.getQueueConnectionFactory(url, info); ``` -------------------------------- ### Example script.txt for data store configuration Source: https://docs.oracle.com/en/database/other-databases/nosql-database/24.4/admin/create-script-configure-data-store.html Example script file (script.txt) that configures a data store named `mystore`. It deploys a zone, storage nodes, and an admin, creates a pool, and deploys a topology with 300 partitions. ```bash ### Begin Script ### configure -name mystore plan deploy-zone -name "Boston" -rf 3 -wait plan deploy-sn -zn zn1 -host -port 5000 -wait plan deploy-admin -sn sn1 -wait pool create -name BostonPool pool join -name BostonPool -sn sn1 plan deploy-sn -zn zn1 -host -port 5000 -wait pool join -name BostonPool -sn sn2 plan deploy-sn -zn zn1 -host -port 5000 -wait pool join -name BostonPool -sn sn3 topology create -name topo -pool BostonPool -partitions 300 plan deploy-topology -name topo -wait exit ### End Script ### ``` -------------------------------- ### GET file information request Source: https://docs.oracle.com/en/cloud/paas/webcenter-content/webcenter-content-api/index.html Retrieves information about a file in a folder using its GUID. The request is a GET to the file resource path with the file GUID as a path parameter. ```http GET …/documents/wcc/api/v1.1/folders/files/D7B229794E0E9A57985D771CD070C750 ``` -------------------------------- ### Example pip3 Output Source: https://docs.oracle.com/en-us/iaas/Content/developer/spring-on-k8s/01oci-spring-k8s-summary.htm Example output when pip for Python 3 is installed. ```text pip from xxx/lib/python3.x/site-packages/pip **(python 3.x)** ``` -------------------------------- ### Example output of fn init --help | grep runtime Source: https://docs.oracle.com/en-us/iaas/Content/Functions/Tasks/functionssupportedlanguageversions.htm Shows the expected output from the command, listing the supported runtime versions. This example output is provided for reference. ```bash fn init --help | grep runtime --runtime value Choose an existing runtime - dotnet, dotnet8.0, dotnet9.0, go, go1.23, go1.24, java, java11, java17, java21, java8, kotlin, node, node22, node24, python, python3.12, python3.9, ruby, ruby3.3 ``` -------------------------------- ### Expected root.sh output with listener failure Source: https://docs.oracle.com/en/engineered-systems/zero-data-loss-recovery-appliance/19.2/amogd/maintenance.html Example output from root.sh showing that the listener resource failed to start on the replaced server. This is expected and the rootcrs.pl execution failure is noted. ```text /u01/app/12.1.0/grid/bin/srvctl start listener -n ra01db01 \ ...Failed /u01/app/12.1.0/grid/perl/bin/perl \ -I/u01/app/12.1.0/grid/perl/lib \ -I/u01/app/12.1.0/grid/crs/install \ /u01/app/12.1.0/grid/crs/install/rootcrs.pl execution failed ``` -------------------------------- ### Example 12-11: Getting a QueueConnectionFactory in LDAP Source: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adque/jms-basic-operation.html Example 12-11: Gets a QueueConnectionFactory from LDAP using JNDI. Sets environment properties for the LDAP server and authentication, then looks up the factory. ```java Hashtable env = new Hashtable(5, 0.75f); DirContext ctx; queueConnectionFactory qc_fact; /* the following statements set in hashtable env: * service provider package * the URL of the ldap server * the distinguished name of the database server * the authentication method (simple) * the LDAP username * the LDAP user password */ env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://sun-456:389"); env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, "cn=db1aquser1,cn=acme,cn=com"); env.put(Context.SECURITY_CREDENTIALS, "welcome"); ctx = new InitialDirContext(env); ctx = (DirContext)ctx.lookup("cn=OracleDBConnections,cn=db1,cn=Oraclecontext,cn=acme,cn=com"); qc_fact = (queueConnectionFactory)ctx.lookup("cn=queue_conn1"); ``` -------------------------------- ### show versions example output Source: https://docs.oracle.com/en/database/other-databases/nosql-database/25.3/admin/show.html Example of running 'show versions' and 'show versions -json' in the KVStore CLI, showing client and server versions. ```bash kv-> show versions Client version: 12.1.3.4.0 Server version: 12.1.3.4.0 kv-> show versions -json { "operation" : "show version", "returnCode" : 5000, "description" : "Operation ends successfully", "returnValue" : { "clientVersion" : "12.2.4.6.0", "serverVersion" : "12.2.4.6.0" } } ``` -------------------------------- ### Search folders response body Source: https://docs.oracle.com/en/cloud/paas/webcenter-content/webcenter-content-api/index.html Example response body for the GET /documents/wcc/api/v1.1/folders/search/items endpoint when searching for 4 folders in the Secure security group with fields=fFolderGUID, fSecurityGroup, fCreateDate and limit=4. Shows the returned folder items with their GUIDs, creation dates, and security group. ```json { "itemType": "Folder", "q": " fSecurityGroup LIKE 'Secure' AND ((fLibraryType != '2' OR fLibraryType IS NULL)) AND ((fLibraryType != '3' OR fLibraryType IS NULL)) AND ((UPPER(fFolderName) != UPPER('Trash') OR (UPPER(fFolderName) IS NULL))) AND ((UPPER(fFolderName) != UPPER('_REAL_ITEMS') OR (UPPER(fFolderName) IS NULL))) AND ((fIsInTrash != '1' OR fIsInTrash IS NULL)) ", "count": 4, "hasMore": true, "totalCount": 16, "orderBy": "fFolderName:Asc", "offset": 0, "limit": 4, "startRow": 0, "nextRow": 4, "dataSource": "FldFolders", "searchEngineName": "DATABASE.METADATA.FOLDERS", "items": [ { "fFolderGUID": "802062EE2F5EC5A3E2DAAA27B72D14CD", "fCreateDate": "2024-07-07 12:08:50Z", "fSecurityGroup": "Secure" }, { "fFolderGUID": "81D398B26CCA513DD66AC0315F3949FD", "fCreateDate": "2024-07-07 12:08:52Z", "fSecurityGroup": "Secure" }, { "fFolderGUID": "4B8EB5A37E29FA7752A58EAE2D2C0236", "fCreateDate": "2024-07-24 06:39:40Z", "fSecurityGroup": "Secure" }, { "fFolderGUID": "8FD8B4C33F4C5ACB3A7B25820AA6CFBE", "fCreateDate": "2024-07-24 06:39:50Z", "fSecurityGroup": "Secure" } ] } ``` -------------------------------- ### Start an Instance Pool Source: https://docs.oracle.com/en/engineered-systems/private-cloud-appliance/3.0-latest/ceapi/api-container-engine.html Starts an instance pool. ```APIDOC ## Start an Instance Pool ### Description Starts an instance pool. ### Method POST ### Endpoint /instancePools/{instancePoolId}/actions/start ### Parameters #### Path Parameters - **instancePoolId** (string) - Required - The OCID of the instance pool. ### Response #### Success Response (200) OK #### Error Response (404) Not Found ``` -------------------------------- ### Example: Copy and Set Key Permissions Source: https://docs.oracle.com/en/cloud/paas/webcenter/webcenter-marketplace/index.html Example session showing copying the key, SSHing to the admin node, and setting permissions and ownership. ```bash [opc@wccdr-bastion-instance ~]$ scp -i key key opc@192.168.128.20:/tmp/key [opc@wccdr-bastion-instance ~]$ ssh -i key opc@192.168.128.20 [opc@wccdr-wls-1 ~]$ [opc@wccdr-wls-1 ~]$ chmod 600 /tmp/key [opc@wccdr-wls-1 ~]$ chown oracle:oracle /tmp/key ``` -------------------------------- ### configure command example Source: https://docs.oracle.com/en/database/other-databases/nosql-database/25.3/admin/configure1.html Example invocation of the configure command that names the store 'mystore'. ```text kv-> configure -name mystore ``` -------------------------------- ### Run installer.sh with response file Source: https://docs.oracle.com/en-us/iaas/management-agents/doc/install-management-agent-chapter.html Run the installer script with the full path to a response file. Example: sudo ./installer.sh /tmp/input.rsp. The output shows pre-requisite checks and successful installation. ```bash sudo ./installer.sh ``` ```bash sudo ./installer.sh /tmp/input.rsp ``` -------------------------------- ### Create password store file example Source: https://docs.oracle.com/en/database/other-databases/nosql-database/25.3/security/password-store-file.html Example of creating a password store file at $KVROOT/security/login.pwd. ```bash security-> pwdfile create -file $KVROOT/security/login.pwd Created ```