diff --git a/select-ai/sql/README.md b/select-ai/sql/README.md
new file mode 100644
index 0000000..ba1ba67
--- /dev/null
+++ b/select-ai/sql/README.md
@@ -0,0 +1,79 @@
+# Oracle Autonomous Database: Sample SQL Scripts
+Numerous SQL scripts are available to help you get started using Autonomous Database.
+
+Prerequisites:
+* Create an Autonomous Database
+ * [On OCI](../../multicloud/oci-cli/README.md)
+ * [On Azure](../../multicloud/azure-cli/README.md)
+ * [On Google Cloud](../../multicloud/gcloud-cli/README.md)
+* Azure and Google Cloud support private endpoints only; a VM must be deployed on the same VCN as Autonomous Database (or on a network that can access your Autonomous Database). OCI supports both public and private endpoints; ADB is deployed using public endpoints in our sample which means you can use your computer to access the database.
+* Use these great VS Code extensions that help you develop and debug your database apps:
+ * SQL Developer for VS Code ([Learn More](https://www.oracle.com/database/sqldeveloper/vscode/) | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Oracle.sql-developer))
+ * Oracle Developer Tools for VS Code ([Learn More](https://docs.oracle.com/en/database/oracle/developer-tools-for-vscode/getting-started/gettingstarted.html) | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Oracle.oracledevtools))
+
+## Connect to Autonomous Database
+There are [numerous client tools](../../azure-cli/README.md#whats-next) that you can use to start working with Autonomous Database. This includes the built-in SQL Worksheet that's part of the Database Tools (and available from the linked OCI Console) or a tool like VS Code and one an Oracle Database extension.
+
+## Sample scripts
+Try out these scripts to learn how to get started using Autonomous Database. Simply update the [`config.sql`](#configuration-file) script prior to running the samples:
+
+|Script|Description|
+|----|---|
+|[credential-create.sql](credential-create.sql)|Autonomous Database credentials contain the secret keys used to connect to services - like Azure OpenAI. This script creates those credentials. It's called by multiple scripts listed below |
+|[data-create-sample-schema.sql](data-create-sample-schema.sql)|Create a sample user and install sample data|
+|[data-import-from-datalake.sql](data-create-synthetic-data.sql)|Import sample data from Azure Data Lake. Sample data was uploaded using the [`create-all-resources.sh`](../../azure-cli/create-all-resources.sh)and [`create-data-lake-storage.sh`](../../azure-cli/create-data-lake-storage.sh) scripts. You can run [`show-data-lake-storage-info.sh`](../../azure-cli/show-data-lake-storage-info.sh) to get connection information to the storage container.|
+|[data-export-to-datalake.sql](data-export-to-datalake.sql)|Export data from a table to your data lake storage|
+|[select-ai-admin-enable.sql](select-ai-admin-enable.sql)|Autonomous Database is secure by default. In order to access external services, you will need to enable connectivity. This script enables connectivity to your Azure OpenAI resource.|
+|[select-ai-create-profile.sql](select-ai-create-profile.sql)|A Select AI profile is used to connect to your AI provider. It includes information about your provider plus tables and view that you want to be targets for natural language queries|
+|[select-ai-create-synthetic-data.sql](select-ai-create-synthetic-data.sql)|Use AI to generate sample data sets. You will create tables and then populate them based on rules that you specify.|
+|[select-ai-nl2sql.sql](select-ai-nl2sql.sql)|Use natural language to query your data|
+|[select-ai-sql-function.sql](select-ai-sql-function.sql)|Use Select AI SQL functions to apply AI to your data. These examples summarize a support chat and make product recommendations based on info in your database|
+|[select-ai-transform-and-summarize.sql](select-ai-transform-and-summarize.sql)|This builds on the previous sample. This will use Select AI SQL functions to transform data, parsing unstructured text into structured fields. For example, derive an address from free-form text. Or, derive key phrases and sentiment and return the result in structured format. This is useful for then storing the data in a way that can be queried using SQL|
+|[select-ai-rag.sql](select-ai-rag.sql)|Select AI makes it easy to create AI vector management pipelines and then ask questions using AI and your organization's knowledge base|
+|[json-duality.sql](json-duality.sql)|Autonomous Database allows you to work with JSON in many different ways. JSON Collections stored your documents in tables. No changes are made to those documents. JSON Duality Views present relational data as JSON - allowing you to query and update that data using the JSON APIs (like MongoDB API) or SQL. Check out both approaches.|
+
+### Configuration file
+Many of the SQL scripts rely on information found in your [config.sql](config.sql) file. Update the config file prior to running any of the scripts.
+
+>**IMPORTANT:** This file will contain sensitive data that should be protected. Set the file's permissions so that only the file's owner can view its contents:
+```bash
+chmod 600 config.sql
+```
+
+|Setting|Description|Example|
+|----|----|----|
+|CONN|JDBC Connection. Run the script /multicloud/{oci-cli, azure-cli}/show-adb-info.sh to easily get the connection details.|jdbc:oracle:thin:@(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=your-host.oraclecloud.com))(connect_data=(service_name=my_quickstart_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))
+|USER_NAME|Database user that will contain sample data|'moviestream'|
+|USER_PASSWORD|Password for the sample database user|'watchS0meMovies#'
+|**Select AI and GenAI** |[See Select AI documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/sql-generation-ai-autonomous.html)
+|AI_PROVIDER|ADB can use different LLMs. Specify the AI provider that will be used by Select AI (oci, azure or google)|'oci'|
+|AI_PROFILE_NAME|The Select AI profile name that encapsulates the AI provider info + tables for NL2SQL. Enter a name using valid Oracle Database object naming rules.|'genai'|
+|AI_CREDENTIAL_NAME|This is a database credential that captures the secret key or other connection info. Enter a name using valid Oracle Database object naming rules.|'ai_cred'|
+|AI_ENDPOINT|The AI provider's endpoint. The endpoint should be the servername only. For example, myopenai.openai.azure.com. This is not required for OCI GenAI.|'ai_cred'|
+|AI_KEY|The API key for AI service. This is not required for OCI GenAI.|'3Cu9ABGBCwkyYI...'|
+|**Azure OpenAI settings**|
+|AZURE_OPENAI_RESOURCE_NAME|Name of the Azure OpenAI resource|'dev-adb-azure-openai'|
+|AZURE_OPENAI_DEPLOYMENT_NAME|Your Azure OpenAI deployment name. This is used for NL2SQL and AI SQLfunctions|'gpt-4o'|
+|AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME|The Azure OpenAI deployment that uses an embedding model. This is used for creating vector embeddings.|'text-embedding-ada-002'|
+|AI_KEY|Azure OpenAI secret key|'3Cu9AB...H53'|
+|AI_CREDENTIAL_NAME|The database credential that will be used to connect to Azure OpenAI|'azure_cred4o'|
+|**Data Lake/Object Storage**|
+|STORAGE_PROVIDER|Name of your storage provider. Valid values are oci, azure or google.|'oci'|
+|STORAGE_CREDENTIAL_NAME|The name of the Autonomous Database credential that's used to connect to your object storage service|'storage_cred'|
+|STORAGE_URL|The URL that points to your bucket or container. Run the script /multicloud/{oci-cli, azure-cli}/show-data-lake-storage-info.sh to easily get the storage details.|'https://abc.objectstorage.us-ashburn-1.oci.customer-oci.com/n/adwc4pm/b/adb-sample/o'
+|STORAGE_ACCOUNT_NAME|Name of your Azure Data Lake Storage Gen 2 account. Run the script /multicloud/{oci-cli, azure-cli}/show-data-lake-storage-info.sh to easily get the storage details.|'mysamplestorage'|
+|STORAGE_KEY|The secret key used to connecto Azure Data Lake Storage. Run the script /multicloud/{oci-cli, azure-cli}/show-data-lake-storage-info.sh to easily get the storage details.|'dJVNxq1YTT...jp/g=='
+|**OCI API user credentials**|[See Managing Native Credentials documentation](https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/autonomous-manage-credentials.html#GUID-863FAF80-AEDB-4128-89E7-3B93FED550E)|
+|OCI_USER_OCID|Your OCI user's identifier|'ocid1.user.oc1..aaaa...'|
+|OCI_TENANCY_OCID|Your tenancy's identifier|'ocid1.tenancy.oc1..aaaaaaa...'|
+|OCI_FINGERPRINT|Your signing key's fingerprint|'ocid1.tenancy.oc1..aaaaaaa...'|
+|OCI_PRIVATE_KEY|Your private key. Do not include -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----. Add "-" as a new line character at the end of each line (except the last)|'MIIEpAIBA....-'|
+
+
+You can find the Azure OpenAI settings in the Azure OpenAI Studio:
+
+
+
+
+Copyright (c) 2026 Oracle and/or its affiliates.
+Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
diff --git a/select-ai/sql/config-default.sql b/select-ai/sql/config-default.sql
new file mode 100644
index 0000000..589b9ce
--- /dev/null
+++ b/select-ai/sql/config-default.sql
@@ -0,0 +1,77 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+--
+-- Configuration information for Autonomous Database
+--
+-- Connect string
+-- you can get the ADB connection info by running /multicloud/{oci|azure|gcloud}-cli/show-adb-info.sh
+define CONN='jdbc:oracle:thin:@(description=...)'
+-- user name and password used for the sample data
+define USER_NAME='moviestream'
+-- # The password is for the sample user. It must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character
+-- example: watchS0meMovies#
+define USER_PASSWORD=''
+
+--
+-- GENAI
+-- Select AI LLM providers are pluggable. ADB will use the one specified below.
+--
+-- The AI provider: oci, azure or google
+define AI_PROVIDER='oci'
+-- The Select AI profile name that encapsulates the AI provider info + tables for NL2SQL
+define AI_PROFILE_NAME='genai'
+-- This is a database credential that captures the secret key or other connection info
+define AI_CREDENTIAL_NAME='AI_CRED'
+
+-- The endpoint should be the servername only. This is not required for OCI GenAI.
+-- Examples:
+-- myopenai.openai.azure.com
+-- us-east4-aiplatform.googleapis.com
+define AI_ENDPOINT=''
+-- API key for AI service. This is not required for OCI GenAI.
+define AI_KEY=''
+
+-- For Azure:
+-- Azure OpenAI resource name
+define AZURE_OPENAI_RESOURCE_NAME='your-openai-resource-name'
+-- Azure OpenAI deployment name
+define AZURE_OPENAI_DEPLOYMENT_NAME='your-openai-deployment-name'
+-- Azure OpenAI Embedding deployment name. This is used for creating embeddings for RAG
+define AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME='your-openai-emedding-deployment-name'
+
+--
+-- Data Lake Storage
+--
+-- valid values for storage provider: oci, azure, google
+-- you can get the storage info by running /multicloud/{oci|azure|gcloud}-cli/show-data-lake-storage-info.sh
+define STORAGE_PROVIDER='oci'
+-- The url is a pointer to the bucket that will be used for import/export to object storage
+-- Examples:
+-- google: https://storage.googleapis.com/adb-sample
+-- azure : https://devadbstorageacct.blob.core.windows.net/adb-sample
+-- oci : https://adwc4pm.objectstorage.us-ashburn-1.oci.customer-oci.com/n/adwc4pm/b/adb-sample/o
+define STORAGE_URL=''
+
+-- A database credential encapsulates the authentication details to the object store. Specify a name for the credential below
+define STORAGE_CREDENTIAL_NAME='storage_cred'
+
+--Azure storage properties
+define AZURE_STORAGE_ACCOUNT_NAME=''
+define AZURE_STORAGE_KEY=''
+-- Google storage properties
+define GOOGLE_STORAGE_ACCESS_KEY=''
+define GOOGLE_STORAGE_SECRET=''
+
+--
+-- OCI API credentials
+--
+-- One credential is used to access all services. You can get most of these settings from your ~/.oci/config file
+define OCI_USER_OCID=''
+define OCI_TENANCY_OCID=''
+define OCI_FINGERPRINT=''
+-- The private key requires a "-" continuation character at the end of the line.
+-- Do not include the private key's BEGIN and END lines
+define OCI_PRIVATE_KEY='example1-
+example2-
+example3'
\ No newline at end of file
diff --git a/select-ai/sql/config.sql b/select-ai/sql/config.sql
new file mode 100644
index 0000000..589b9ce
--- /dev/null
+++ b/select-ai/sql/config.sql
@@ -0,0 +1,77 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+--
+-- Configuration information for Autonomous Database
+--
+-- Connect string
+-- you can get the ADB connection info by running /multicloud/{oci|azure|gcloud}-cli/show-adb-info.sh
+define CONN='jdbc:oracle:thin:@(description=...)'
+-- user name and password used for the sample data
+define USER_NAME='moviestream'
+-- # The password is for the sample user. It must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character
+-- example: watchS0meMovies#
+define USER_PASSWORD=''
+
+--
+-- GENAI
+-- Select AI LLM providers are pluggable. ADB will use the one specified below.
+--
+-- The AI provider: oci, azure or google
+define AI_PROVIDER='oci'
+-- The Select AI profile name that encapsulates the AI provider info + tables for NL2SQL
+define AI_PROFILE_NAME='genai'
+-- This is a database credential that captures the secret key or other connection info
+define AI_CREDENTIAL_NAME='AI_CRED'
+
+-- The endpoint should be the servername only. This is not required for OCI GenAI.
+-- Examples:
+-- myopenai.openai.azure.com
+-- us-east4-aiplatform.googleapis.com
+define AI_ENDPOINT=''
+-- API key for AI service. This is not required for OCI GenAI.
+define AI_KEY=''
+
+-- For Azure:
+-- Azure OpenAI resource name
+define AZURE_OPENAI_RESOURCE_NAME='your-openai-resource-name'
+-- Azure OpenAI deployment name
+define AZURE_OPENAI_DEPLOYMENT_NAME='your-openai-deployment-name'
+-- Azure OpenAI Embedding deployment name. This is used for creating embeddings for RAG
+define AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME='your-openai-emedding-deployment-name'
+
+--
+-- Data Lake Storage
+--
+-- valid values for storage provider: oci, azure, google
+-- you can get the storage info by running /multicloud/{oci|azure|gcloud}-cli/show-data-lake-storage-info.sh
+define STORAGE_PROVIDER='oci'
+-- The url is a pointer to the bucket that will be used for import/export to object storage
+-- Examples:
+-- google: https://storage.googleapis.com/adb-sample
+-- azure : https://devadbstorageacct.blob.core.windows.net/adb-sample
+-- oci : https://adwc4pm.objectstorage.us-ashburn-1.oci.customer-oci.com/n/adwc4pm/b/adb-sample/o
+define STORAGE_URL=''
+
+-- A database credential encapsulates the authentication details to the object store. Specify a name for the credential below
+define STORAGE_CREDENTIAL_NAME='storage_cred'
+
+--Azure storage properties
+define AZURE_STORAGE_ACCOUNT_NAME=''
+define AZURE_STORAGE_KEY=''
+-- Google storage properties
+define GOOGLE_STORAGE_ACCESS_KEY=''
+define GOOGLE_STORAGE_SECRET=''
+
+--
+-- OCI API credentials
+--
+-- One credential is used to access all services. You can get most of these settings from your ~/.oci/config file
+define OCI_USER_OCID=''
+define OCI_TENANCY_OCID=''
+define OCI_FINGERPRINT=''
+-- The private key requires a "-" continuation character at the end of the line.
+-- Do not include the private key's BEGIN and END lines
+define OCI_PRIVATE_KEY='example1-
+example2-
+example3'
\ No newline at end of file
diff --git a/select-ai/sql/credential-create.sql b/select-ai/sql/credential-create.sql
new file mode 100644
index 0000000..d4edc51
--- /dev/null
+++ b/select-ai/sql/credential-create.sql
@@ -0,0 +1,99 @@
+ARGUMENT 1 DEFAULT 'ALL'
+
+define user_param=&1
+undefine 1
+
+prompt "Creating credential: &user_param"
+
+-- Get the config information
+@config.sql
+
+-- This procedure will recreate credentials. You can specify a credential type (storage, OpenAI)
+
+DECLARE
+ l_exists number := 0;
+ l_type varchar2(20) := nvl(upper('&user_param'),'ALL');
+ l_username varchar2(400);
+ l_password varchar2(400);
+BEGIN
+ -- AI provider. Note, they will have different syntax based on the provider
+ if l_type in ('AI','ALL') then
+ -- Create your credential. Replace it if already exists
+ select COUNT(*)
+ into l_exists
+ from user_credentials
+ where upper(credential_name)=upper('&AI_CREDENTIAL_NAME');
+
+ -- credential exists, so drop it
+ IF l_exists = 1 THEN
+ dbms_cloud.drop_credential (
+ credential_name => '&AI_CREDENTIAL_NAME'
+ );
+ END IF;
+
+ -- Check for OCI.
+ IF UPPER('&AI_PROVIDER') = 'OCI' THEN
+ dbms_cloud.create_credential(
+ credential_name => '&AI_CREDENTIAL_NAME',
+ user_ocid => '&OCI_USER_OCID',
+ tenancy_ocid => '&OCI_TENANCY_OCID',
+ fingerprint => '&OCI_FINGERPRINT',
+ private_key => '&OCI_PRIVATE_KEY'
+ );
+ ELSE
+ -- All other AI providers
+ dbms_cloud.create_credential (
+ credential_name => '&AI_CREDENTIAL_NAME',
+ username => UPPER('&AI_PROVIDER'),
+ password => '&AI_KEY'
+ );
+ END IF; -- OCI vs other AI services
+ END IF; -- AI Credential
+
+ -- Create Storage credential
+ if l_type in ('STORAGE','ALL') then
+ -- Create your credential. Replace it if already exists
+ select COUNT(*)
+ into l_exists
+ from user_credentials
+ where upper(credential_name)=upper('&STORAGE_CREDENTIAL_NAME');
+
+ -- drop existing credential
+ IF l_exists = 1 THEN
+ dbms_cloud.drop_credential (
+ credential_name => '&STORAGE_CREDENTIAL_NAME'
+ );
+ END IF;
+
+ -- Check for OCI
+ IF UPPER('&STORAGE_PROVIDER') = 'OCI' THEN
+ dbms_cloud.create_credential(
+ credential_name => '&STORAGE_CREDENTIAL_NAME',
+ user_ocid => '&OCI_USER_OCID',
+ tenancy_ocid => '&OCI_TENANCY_OCID',
+ fingerprint => '&OCI_FINGERPRINT',
+ private_key => '&OCI_PRIVATE_KEY'
+ );
+ ELSE
+ -- Google and Azure use different settings for username and password
+ l_username := CASE WHEN UPPER('&STORAGE_PROVIDER') = 'AZURE' THEN '&AZURE_STORAGE_ACCOUNT_NAME' ELSE '&GOOGLE_STORAGE_ACCESS_KEY' END;
+ l_password := CASE WHEN UPPER('&STORAGE_PROVIDER') = 'AZURE' THEN '&AZURE_STORAGE_KEY' ELSE '&GOOGLE_STORAGE_SECRET' END;
+
+ dbms_cloud.create_credential(
+ credential_name => '&STORAGE_CREDENTIAL_NAME',
+ username => l_username,
+ password => l_password
+ );
+ END IF; -- OCI vs other AI services
+ END IF; -- Storage
+END;
+/
+
+-- Review the credentials
+COLUMN credential_name FORMAT A40
+COLUMN username FORMAT A40
+
+select
+ credential_name,
+ username
+from user_credentials;
diff --git a/select-ai/sql/data-create-sample-schema.sql b/select-ai/sql/data-create-sample-schema.sql
new file mode 100644
index 0000000..02c1891
--- /dev/null
+++ b/select-ai/sql/data-create-sample-schema.sql
@@ -0,0 +1,74 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+--
+-- Use the Oracle LiveLabs has utilities for setting up sample data and schemas. Use this script to set up data
+-- used by the samples
+--
+-- run the config script to set up variables
+@config.sql
+
+-- add a database user that will own the sample data
+prompt Adding database user &USER_NAME
+-- USER SQL
+CREATE USER &USER_NAME IDENTIFIED BY &USER_PASSWORD;
+
+-- ADD ROLES
+GRANT CONNECT TO &USER_NAME;
+GRANT CONSOLE_DEVELOPER TO &USER_NAME;
+GRANT DWROLE TO &USER_NAME;
+GRANT GRAPH_DEVELOPER TO &USER_NAME;
+GRANT OML_DEVELOPER TO &USER_NAME;
+GRANT RESOURCE TO &USER_NAME;
+GRANT SODA_APP TO &USER_NAME;
+ALTER USER &USER_NAME DEFAULT ROLE CONSOLE_DEVELOPER,DWROLE,GRAPH_DEVELOPER,OML_DEVELOPER;
+ALTER USER &USER_NAME GRANT CONNECT THROUGH GRAPH$PROXY_USER;
+ALTER USER &USER_NAME GRANT CONNECT THROUGH OML$PROXY;
+ALTER USER &USER_NAME QUOTA UNLIMITED ON DATA;
+grant execute on dbms_cloud_ai to &USER_NAME;
+grant execute on dbms_cloud_repo to &USER_NAME;
+
+-- REST ENABLE
+BEGIN
+ ORDS_ADMIN.ENABLE_SCHEMA(
+ p_enabled => TRUE,
+ p_schema => '&USER_NAME',
+ p_url_mapping_type => 'BASE_PATH',
+ p_url_mapping_pattern => '&USER_NAME',
+ p_auto_rest_auth=> TRUE
+ );
+ -- ENABLE DATA SHARING
+ C##ADP$SERVICE.DBMS_SHARE.ENABLE_SCHEMA(
+ SCHEMA_NAME => '&USER_NAME',
+ ENABLED => TRUE
+ );
+ commit;
+END;
+/
+
+--
+-- Add sample data set
+--
+-- install the utilities
+prompt Installing workshop utilities
+set timing on
+
+declare
+ l_uri varchar2(500) := 'https://objectstorage.us-ashburn-1.oraclecloud.com/n/c4u04/b/building_blocks_utilities/o/setup/workshop-setup.sql';
+begin
+ dbms_cloud_repo.install_sql(
+ content => to_clob(dbms_cloud.get_object(object_uri => l_uri))
+ );
+end;
+/
+
+prompt Connecting as database user &USER_NAME
+conn &USER_NAME/&USER_PASSWORD@&CONN
+
+prompt Adding data sets. This will take a few minutes
+exec workshop.add_dataset(tag => 'gen-ai')
+
+prompt Done.
+
+
+
diff --git a/select-ai/sql/data-export-to-datalake.sql b/select-ai/sql/data-export-to-datalake.sql
new file mode 100644
index 0000000..ffcbdca
--- /dev/null
+++ b/select-ai/sql/data-export-to-datalake.sql
@@ -0,0 +1,58 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+/** Export data to cloud storage **/
+
+/* PREREQUISITES
+ Install the sample schema using script
+ @data-create-sample-schema.sql
+*/
+
+@config.sql
+
+-- Create a credential in order to connect to data lake storage
+@credential-create.sql storage
+
+-- List the files in that storage container
+SELECT object_name, bytes
+FROM dbms_cloud.list_objects(
+ credential_name => '&STORAGE_CREDENTIAL_NAME',
+ location_uri => '&STORAGE_URL'
+);
+
+--
+-- Export movie genre data to the data lake
+--
+-- Check out the data to be exported
+SELECT *
+FROM genre;
+
+-- Export in CSV format
+BEGIN
+ DBMS_CLOUD.EXPORT_DATA(
+ credential_name => '&STORAGE_CREDENTIAL_NAME',
+ file_uri_list => '&STORAGE_URL/data/genre/genre',
+ query => 'SELECT * FROM genre',
+ format => JSON_OBJECT('type' VALUE 'csv', 'delimiter' VALUE ',')
+ );
+END;
+/
+
+-- Export in parquet format
+BEGIN
+ DBMS_CLOUD.EXPORT_DATA(
+ credential_name => '&STORAGE_CREDENTIAL_NAME',
+ file_uri_list => '&STORAGE_URL/data/customer/customer',
+ query => 'SELECT * FROM genre',
+ format => JSON_OBJECT('type' VALUE 'parquet')
+ );
+END;
+/
+
+
+-- List the files in that storage container. Notice the new genre data.
+SELECT object_name, bytes
+FROM dbms_cloud.list_objects(
+ credential_name => '&STORAGE_CREDENTIAL_NAME',
+ location_uri => '&STORAGE_URL'
+);
\ No newline at end of file
diff --git a/select-ai/sql/data-import-from-datalake.sql b/select-ai/sql/data-import-from-datalake.sql
new file mode 100644
index 0000000..20cf624
--- /dev/null
+++ b/select-ai/sql/data-import-from-datalake.sql
@@ -0,0 +1,60 @@
+
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+/** Import data to Azure Data Lake **/
+@config.sql
+
+-- Create a credential in order to connect to data lake storage
+@credential-create.sql storage
+
+-- List the files
+SELECT object_name, bytes
+FROM dbms_cloud.list_objects(
+ credential_name => '&STORAGE_CREDENTIAL_NAME',
+ location_uri => '&STORAGE_URL'
+);
+
+-- Create a table for movies that were created from books
+drop table if exists movie_from_book;
+CREATE TABLE movie_from_book
+ (
+ movie_name VARCHAR2(4000)
+ ,movie_release_date DATE
+ ,book_name VARCHAR2(4000)
+ ,book_published_date DATE
+ ,description VARCHAR2(4000)
+ );
+
+-- Import data into that new table
+BEGIN
+ DBMS_CLOUD.COPY_DATA
+ ( table_name => 'MOVIE_FROM_BOOK',
+ credential_name => '&STORAGE_CREDENTIAL_NAME',
+ file_uri_list => '&STORAGE_URL/data/movie_from_book/*.csv',
+ field_list => 'MOVIE_NAME CHAR(4000),
+ MOVIE_RELEASE_DATE CHAR date_format DATE MASK "YYYY-MM-DD",
+ BOOK_NAME CHAR(4000),
+ BOOK_PUBLISHED_DATE CHAR date_format DATE MASK "YYYY-MM-DD",
+ DESCRIPTION CHAR(4000)',
+ format => '{
+ "delimiter" : ",",
+ "ignoremissingcolumns" : true,
+ "ignoreblanklines" : true,
+ "blankasnull" : true,
+ "trimspaces" : "lrtrim",
+ "quote" : "\"",
+ "characterset" : "AL32UTF8",
+ "skipheaders" : 1,
+ "logprefix" : "MOVIE_FROM_BOOK",
+ "logretention" : 7,
+ "rejectlimit" : 10000000,
+ "recorddelimiter" : "X''0A''"
+ }'
+ );
+END;
+/
+
+-- Review the results
+SELECT *
+FROM movie_from_book;
\ No newline at end of file
diff --git a/select-ai/sql/data/movie_from_book/movie_from_book.csv b/select-ai/sql/data/movie_from_book/movie_from_book.csv
new file mode 100644
index 0000000..58a1908
--- /dev/null
+++ b/select-ai/sql/data/movie_from_book/movie_from_book.csv
@@ -0,0 +1,11 @@
+movie_name,movie_release_date,book_name,book_published_date,description
+Dune,2021-10-22,Dune,1965-08-01,A young nobleman leads nomadic tribes in a battle to control a desert planet with a valuable spice.
+The Power of the Dog,2021-12-01,The Power of the Dog,1967-01-01,A rancher psychologically torments his brother's new wife and her son until long-hidden secrets come to light.
+House of Gucci,2021-11-24,The House of Gucci: A Sensational Story of Murder Madness Glamour and Greed,2001-10-09,The true story of how Patrizia Reggiani plotted to kill her husband Maurizio Gucci.
+The Last Duel,2021-10-15,The Last Duel: A True Story of Trial by Combat in Medieval France,2004-09-15,King Charles VI declares that Knight Jean de Carrouges settle his dispute with his squire by challenging him to a duel.
+Nightmare Alley,2021-12-17,Nightmare Alley,1946-09-01,A manipulative carnival worker teams up with a female psychiatrist to trick people into giving them money.
+Death on the Nile,2022-02-11,Death on the Nile,1937-11-01,Detective Hercule Poirot investigates the murder of a young heiress aboard a cruise ship on the Nile River.
+The Lost Daughter,2021-12-31,The Lost Daughter,2006-10-01,A woman's beach vacation takes a dark turn when she begins to confront the troubles of her past.
+The Dig,2021-01-29,The Dig,2007-05-10,An archaeologist embarks on the historically important excavation of Sutton Hoo in 1938.
+Passing,2021-11-10,Passing,1929-04-01,Two African American women who can "pass" as white choose to live on opposite sides of the color line in 1920s New York.
+The White Tiger,2021-01-22,The White Tiger,2008-10-01,An ambitious Indian driver uses his wit and cunning to escape from poverty and rise to the top.
\ No newline at end of file
diff --git a/select-ai/sql/images/azure-openai.png b/select-ai/sql/images/azure-openai.png
new file mode 100644
index 0000000..6adecde
Binary files /dev/null and b/select-ai/sql/images/azure-openai.png differ
diff --git a/select-ai/sql/json-duality.sql b/select-ai/sql/json-duality.sql
new file mode 100644
index 0000000..b7af655
--- /dev/null
+++ b/select-ai/sql/json-duality.sql
@@ -0,0 +1,155 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+/* Apply AI SQL function to your data to summarize information, make recommendations and more */
+
+/* PREREQUISITES
+ Install the sample schema using script
+ @data-create-sample-schema.sql
+*/
+
+/* Working with JSON in Autonomous Database
+We can query relational data as JSON and also create JSON Collection tables. Different ways to work with JSON,
+flexiblity to work with JSON, and leverage relational tables by using JSON Duality views providing the best of both worlds.
+Let's look at a couple of ways of creating JSON collection tables, JSON Duality Views and querying JSON data.
+*/
+
+-- JSON Collection
+drop table if exists movie_budget;
+create json collection table movie_budget;
+
+insert into movie_budget
+values (
+ '{"movie_id": 1,"movie_title":"Avatar","movie_year": 2009,
+ "sku":"LYG56160","runtime": 162,"cast":["Sam Worthington","Zoe Saldana"],
+ "studio":["20th Century Studios","Lightstorm Entertainment"]}'
+);
+insert into movie_budget
+values (
+ '{"movie_id": 2,"movie_title":"Ghostbusters II","movie_year": 1989,
+ "sku":"FWT19789","runtime": 104,"cast":["Bill Murray","Sigourney Weaver"],
+ "genre":["Fantasy","Sci-Fi","Thriller","Comedy"]}'
+);
+
+commit;
+
+--see the JSON collection that has been created along with the ability to query it
+select *
+from movie_budget;
+
+--see attribute values using dot notation
+select m.data.movie_title
+from movie_budget m;
+
+--Let's add budget information to the movies
+update movie_budget
+set data = JSON_TRANSFORM (
+ data,
+ set '$.budgetUnit' = 'Million USD',
+ set '$.budget'=1000000);
+commit;
+
+-- query using json_value function this time
+select
+ json_value(data, '$.movie_id') movie_id,
+ json_value(data,'$.budget') budget
+from movie_budget;
+
+--Change the budget for one of the movies
+update movie_budget
+set data= JSON_TRANSFORM(
+ data,
+ set '$.budget'=(json_value(data,'$.budget') * 2))
+where JSON_VALUE(data,'$.movie_id')=2;
+
+commit;
+
+select
+ json_value(data, '$.movie_id') movie_id,
+ json_value(data,'$.budget') budget
+from movie_budget;
+
+--JSON Duality
+/* We can work with our relational tables as JSON Documents by creating a JSON Duality View.
+Inserts, updates and deletes can be performed directly against the JSON Duality View and the changes happen on the underlying relational tables.
+This means that the JSON documents for these views will be updated without having to maintain each document, and the data is stored relationally
+avoiding duplication.
+*/
+--Simple JSON view on one table
+
+--We need primary keys on the tables that are part of the views
+CREATE OR REPLACE JSON RELATIONAL DUALITY VIEW customer_dv AS
+customer @insert @update @delete
+{
+ _id : cust_id,
+ FirstName : first_name,
+ LastName : last_name,
+ age : age,
+ Email : email,
+ street_address : street_address,
+ city : city,
+ postal_code : postal_code
+ yrs_customer : yrs_customer
+ pet : pet
+}
+;
+
+select * from customer_dv;
+
+--JSON Duality View on a couple of tables. We do need primary keys on the tables being used in the views
+alter table streams add constraint pk_streams primary key(cust_id,day_id, movie_id);
+
+--JSON of the customers with the movies that they streamed
+CREATE OR REPLACE JSON RELATIONAL DUALITY VIEW customer_streams_dv AS
+customer @insert @update @delete
+{
+ _id : cust_id,
+ FirstName : first_name,
+ LastName : last_name,
+ age : age,
+ yrs_customer : yrs_customer
+ streams : streams @insert @update @delete
+ [{
+ day_id : day_id
+ genre_id : genre_id
+ movie_id : movie_id
+ }]
+}
+;
+
+select *
+from customer_streams_dv;
+
+-- Query the duality view using JSON functions. Pull back the customers who have been around for 10 years
+select *
+from customer_streams_dv
+where JSON_VALUE(data,'$.yrs_customer') > 10;
+
+
+/* Now to insert a new record into customers and streams we can do that through the Duality View.
+Here we select first from customer and from streams to show there is no value */
+select * from customer where cust_id=555;
+select * from streams where cust_id=555;
+
+--Now do an insert to the DV to add a new customer and add a stream
+insert into customer_streams_dv values ('{
+ "_id" : 555,
+ "FirstName" : "Michelle",
+ "LastName" : "Jones",
+ "age" : 36,
+ "yrs_customer" : 0 ,
+ "streams" : [{
+ "day_id" : "2024-11-18T00:00:00",
+ "genre_id" : 19,
+ "movie_id" : 3694}]}');
+
+commit;
+
+--now we have rows in both of the underlying relational tables
+
+select * from customer where cust_id=555;
+select * from streams where cust_id=555;
+
+/* With the JSON Collections and JSON Duality Views you can use API calls with GET and PUT to work
+with the JSON in the database. We have just shown here SQL access to the JSON. */
+
diff --git a/select-ai/sql/security-vpd.sql b/select-ai/sql/security-vpd.sql
new file mode 100644
index 0000000..0cd1cdc
--- /dev/null
+++ b/select-ai/sql/security-vpd.sql
@@ -0,0 +1,47 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+CREATE TABLE "MOVIESTREAM"."VGSALES"
+ ( "NAME" VARCHAR2(4000 BYTE) COLLATE "USING_NLS_COMP",
+ "PLATFORM" VARCHAR2(4000 BYTE) COLLATE "USING_NLS_COMP",
+ "YEAR_OF_RELEASE" NUMBER,
+ "GENRE" VARCHAR2(4000 BYTE) COLLATE "USING_NLS_COMP",
+ "PUBLISHER" VARCHAR2(4000 BYTE) COLLATE "USING_NLS_COMP",
+ "NA_SALES" NUMBER,
+ "EU_SALES" NUMBER,
+ "JP_SALES" NUMBER,
+ "OTHER_SALES" NUMBER,
+ "GLOBAL_SALES" NUMBER,
+ "CRITIC_SCORE" NUMBER,
+ "CRITIC_COUNT" NUMBER,
+ "USER_SCORE" NUMBER,
+ "USER_COUNT" NUMBER,
+ "DEVELOPER" VARCHAR2(4000 BYTE) COLLATE "USING_NLS_COMP",
+ "RATING" VARCHAR2(4000 BYTE) COLLATE "USING_NLS_COMP"
+ ) DEFAULT COLLATION "USING_NLS_COMP" ;
+
+CREATE OR REPLACE FUNCTION hide_eu (
+ v_schema IN VARCHAR2,
+ v_objname IN VARCHAR2)
+
+RETURN VARCHAR2 AS
+con VARCHAR2 (200);
+
+BEGIN
+ con := 'Year_of_release=2009';
+ RETURN (con);
+END hide_eu;
+
+BEGIN
+ dbms_rls.drop_policy(object_schema => 'MOVIESTREAM',object_name=>'VGSALES',policy_name=>'hide_year');
+end;
+
+BEGIN
+ DBMS_RLS.ADD_POLICY(
+ object_schema => 'MOVIESTREAM',
+ object_name => 'VGSALES',
+ policy_name => 'hide_year',
+ policy_function => 'hide_eu',
+ sec_relevant_cols =>'eu_sales',
+ sec_relevant_cols_opt => dbms_rls.ALL_ROWS);
+END;
\ No newline at end of file
diff --git a/select-ai/sql/select-ai-admin-enable.sql b/select-ai/sql/select-ai-admin-enable.sql
new file mode 100644
index 0000000..a82f45a
--- /dev/null
+++ b/select-ai/sql/select-ai-admin-enable.sql
@@ -0,0 +1,25 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+/* Run this script as the Autonomous Database ADMIN user */
+/* You must enable network access to Azure OpenAI for the database user that will be accessing the service */
+
+-- config.sql contains the endpoints, resource groups and other settings required to connect to your Azure OpenAI deployment
+@config.sql
+
+-- view current network access privileges
+SELECT dna.host, dnp.principal, dnp.privilege, dna.acl
+FROM dba_network_acls dna, dba_network_acl_privileges dnp
+WHERE dna.acl = dnp.acl
+ORDER BY host, lower_port, upper_port;
+
+
+BEGIN
+ DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
+ host => '&AI_ENDPOINT',
+ ace => xs$ace_type(privilege_list => xs$name_list('http'),
+ principal_name => '&USER_NAME',
+ principal_type => xs_acl.ptype_db)
+ );
+END;
+/
\ No newline at end of file
diff --git a/select-ai/sql/select-ai-create-profile.sql b/select-ai/sql/select-ai-create-profile.sql
new file mode 100644
index 0000000..38f8020
--- /dev/null
+++ b/select-ai/sql/select-ai-create-profile.sql
@@ -0,0 +1,67 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+/* Create an AI profile that is used by Select AI to connect to your provider. It will also specify the targets used by NL2SQL */
+
+/* Run this script as the Autonomous Database database user that will be access Azure OpenAI */
+
+-- config.sql contains the endpoints, resource groups and other settings required to connect to your Azure OpenAI deployment
+@config.sql
+
+-- Create a credential that allows the user to access the Azure OpenAI endpoint
+@credential-create.sql ai
+
+/*
+ A Select AI profile describes the LLM you will use plus information that will be used for natural language queries. You can create as many
+ AI profiles as you need. You may want to try different models to see their effectiveness, expose profiles to different user groups, etc.:
+ 1. For Azure OpenAI, a deployment was created that is using the gpt-4o model
+ 2. The object list contains the tables that will be the targets for natural language queries
+*/
+
+BEGIN
+ -- recreate the profile
+ dbms_cloud_ai.drop_profile (
+ profile_name => '&AI_PROFILE_NAME',
+ force => true
+ );
+
+ -- create an AI profile. The attributes are different for providers.
+ IF upper('&AI_PROVIDER') = 'AZURE' THEN
+ dbms_cloud_ai.create_profile (
+ profile_name => '&AI_PROFILE_NAME',
+ attributes =>
+ '{"provider": "azure",
+ "azure_resource_name": "&AZURE_OPENAI_RESOURCE_NAME",
+ "azure_deployment_name": "&AZURE_OPENAI_DEPLOYMENT_NAME",
+ "credential_name": "&AI_CREDENTIAL_NAME",
+ "comments":"true",
+ "object_list": [
+ {"owner": "&USER_NAME", "name": "GENRE"},
+ {"owner": "&USER_NAME", "name": "CUSTOMER"},
+ {"owner": "&USER_NAME", "name": "PIZZA_SHOP"},
+ {"owner": "&USER_NAME", "name": "STREAMS"},
+ {"owner": "&USER_NAME", "name": "MOVIES"},
+ {"owner": "&USER_NAME", "name": "ACTORS"}
+ ]
+ }'
+ );
+ ELSE
+ dbms_cloud_ai.create_profile (
+ profile_name => '&AI_PROFILE_NAME',
+ attributes =>
+ '{"provider": "&AI_PROVIDER",
+ "credential_name": "&AI_CREDENTIAL_NAME",
+ "comments":"true",
+ "object_list": [
+ {"owner": "&USER_NAME", "name": "GENRE"},
+ {"owner": "&USER_NAME", "name": "CUSTOMER"},
+ {"owner": "&USER_NAME", "name": "PIZZA_SHOP"},
+ {"owner": "&USER_NAME", "name": "STREAMS"},
+ {"owner": "&USER_NAME", "name": "MOVIES"},
+ {"owner": "&USER_NAME", "name": "ACTORS"}
+ ]
+ }'
+ );
+ END IF;
+END;
+/
diff --git a/select-ai/sql/select-ai-create-synthetic-data.sql b/select-ai/sql/select-ai-create-synthetic-data.sql
new file mode 100644
index 0000000..70f9345
--- /dev/null
+++ b/select-ai/sql/select-ai-create-synthetic-data.sql
@@ -0,0 +1,108 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+/* PREREQUISITES
+ Install the sample schema using script
+ @data-create-sample-schema.sql
+*/
+
+-- config.sql contains the endpoints, resource groups and other settings required to connect to your Azure OpenAI deployment
+@config.sql
+
+-- Create your credential and Select AI Profile
+@select-ai-create-profile.sql
+
+drop table if exists activity cascade constraints;
+drop table if exists customers cascade constraints;
+drop table if exists award_winners cascade constraints;
+
+-- Create a table containing award winning movies
+CREATE TABLE award_winners AS
+SELECT *
+FROM movies
+WHERE instr(awards, 'Academy') > 0;
+
+SELECT title, awards
+FROM AWARD_WINNERS;
+
+
+/*
+ Add PK constraints to existing tables. This will ensure that data generation for related tables will create valid values.
+ For example, ACTIVITY data will be generated - and valid MOVIE_ID's will be generated for that table b/c of this primary key
+*/
+ALTER TABLE award_winners ADD CONSTRAINT pk_award_winners PRIMARY KEY (movie_id) ENABLE;
+
+/* Create and generate customers */
+CREATE TABLE customers (
+ cust_id NUMBER,
+ last_name VARCHAR2(100),
+ first_name VARCHAR2(100),
+ email VARCHAR2(200),
+ street_address VARCHAR2(4000),
+ postal_code VARCHAR2(10),
+ city VARCHAR2(100),
+ state_province VARCHAR2(100),
+ country VARCHAR2(400),
+ yrs_customer NUMBER,
+ age_range varchar2(4000),
+ gender VARCHAR2(4000),
+ household_size NUMBER,
+
+ CONSTRAINT pk_customers PRIMARY KEY (cust_id)
+ )
+;
+
+-- These comments will tell the AI model how to generate data for a column
+COMMENT ON COLUMN customers.gender IS 'The value for gender should be either: Male, Female, Non-binary';
+COMMENT ON COLUMN customers.YRS_CUSTOMER IS 'The value for YRS_CUSTOMER should be: number between 1 and 8';
+COMMENT ON COLUMN customers.age_range IS 'The value for age_range should be either: Silent Generation, Baby Boomer, GenX, Millenials, GenZ';
+
+-- Create customer activity. This will use the foreign keys to ensure that only valid values are created.
+CREATE TABLE activity
+ (
+ day_id date,
+ movie_id NUMBER,
+ cust_id NUMBER,
+ app VARCHAR2(100),
+ device VARCHAR2(100),
+ list_price NUMBER(5,2),
+ discount_percent NUMBER(5,2),
+ amount NUMBER(5,2),
+ CONSTRAINT fk_activity_cust_id FOREIGN KEY (cust_id)
+ REFERENCES customers (cust_id) ENABLE,
+ CONSTRAINT fk_activity_movie_id FOREIGN KEY (movie_id)
+ REFERENCES award_winners (movie_id) ENABLE
+ );
+
+-- These comments will tell the AI model how to generate data for a column
+COMMENT ON COLUMN activity.day_id IS 'Date between 01-JAN-2023 and 30-SEP-2024';
+COMMENT ON COLUMN activity.device IS 'Possible values: laptop, roku, appletv';
+COMMENT ON COLUMN activity.list_price IS 'Possible values: 0,1.99,3.99';
+COMMENT ON COLUMN activity.discount_percent IS 'Fraction between 0 and 1. If list_price is 0, then 0';
+COMMENT ON COLUMN activity.amount IS 'Value equals list_price * 1-discount';
+COMMENT ON COLUMN activity.app IS 'When device is roku or appletv, then MovieStreamer. Otherwise, choose MovieStreamer or browser';
+
+--
+-- Generate data based on the rules in the comments. You can add additional rules to the generate function too.
+-- The data will be generated based on the rules in the column contents
+-- And, data integrity rules are applied for the primary->foreign key relationships
+-- This will take a few minutes
+--
+BEGIN
+ DBMS_CLOUD_AI.GENERATE_SYNTHETIC_DATA(
+ profile_name => '&AI_PROFILE_NAME',
+ object_list => '[
+ {"owner": "&USER_NAME", "name": "customers","record_count":20},
+ {"owner": "&USER_NAME", "name": "activity","record_count":500}
+ ]',
+ params => '{
+ "comments":true,
+ "priority":"HIGH"
+ }'
+ );
+END;
+/
+
+-- Query the new data sets!
+SELECT * FROM award_winners;
+SELECT * FROM activity;
diff --git a/select-ai/sql/select-ai-nl2sql.sql b/select-ai/sql/select-ai-nl2sql.sql
new file mode 100644
index 0000000..f576594
--- /dev/null
+++ b/select-ai/sql/select-ai-nl2sql.sql
@@ -0,0 +1,61 @@
+/* Run natural language queries */
+
+/* PREREQUISITES
+ Install the sample schema using script
+ @data-create-sample-schema.sql
+*/
+
+-- Run this script as the Autonomous Database database user that will be access Azure OpenAI */
+
+-- config.sql contains the endpoints, resource groups and other settings required to connect to your Azure OpenAI deployment
+@config.sql
+
+-- Create your credential and Select AI Profile
+@select-ai-create-profile.sql
+
+-- Set that profile for this session. When using the SELECT AI command line, you need to set the current profile.
+BEGIN
+ dbms_cloud_ai.set_profile(
+ profile_name => '&AI_PROFILE_NAME'
+ );
+END;
+/
+
+/**
+Start asking questions!
+Notice how the SQL language has been extended with new AI keywords
+-- 1. chat - general AI chat
+-- 2. runsql - [default] ask a question and get a structured result
+-- 3. narrate - ask a question and get a conversational result
+-- 4. showsql - SQL used to produce the result
+-- 5. explainsql - explains the query and its processing
+*/
+
+-- simple chat
+select ai chat what happened to the new england patriots;
+
+-- use your data
+select ai what are our total views;
+select ai showsql what are our total views;
+
+-- more sophisticated
+select ai what are our total streams broken out by genre;
+select ai explainsql what are our total streams broken out by genre;
+
+select ai what are total streams by movie for tom hanks movies;
+
+/**
+There are also api's for using Select AI
+*/
+-- Ask another simple question
+SELECT
+ DBMS_CLOUD_AI.GENERATE(
+ PROMPT => 'What is Tom Hanks best known for',
+ PROFILE_NAME => '&AI_PROFILE_NAME',
+ ACTION => 'chat'
+ ) AS response
+FROM dual;
+
+
+
+
diff --git a/select-ai/sql/select-ai-rag.sql b/select-ai/sql/select-ai-rag.sql
new file mode 100644
index 0000000..df1c1d0
--- /dev/null
+++ b/select-ai/sql/select-ai-rag.sql
@@ -0,0 +1,119 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+/* Run this script as the Autonomous Database database user that will be accessing your AI provider */
+
+-- config.sql contains the endpoints, resource groups and other settings required to connect to your Azure OpenAI deployment
+@./config.sql
+
+-- Make sure credentials have been defined to enable access to the LLM and the object store files
+@credential-create.sql ALL
+
+--
+-- Customer support site
+--
+-- This script will create a vector index using Select AI based on web site files that were uploaded to Azure Blob Storage
+-- It's a support site that helps customers get answers to issues with Oracle MovieStream - a fictitious movie streaming service
+
+-- Review the file list that comprise the support web site
+SELECT object_name, bytes
+FROM dbms_cloud.list_objects(
+ credential_name => '&STORAGE_CREDENTIAL_NAME',
+ location_uri => '&STORAGE_URL/support-site'
+);
+
+-- Start with the AI profile for our support site that uses Azure OpenAI and a vector index
+-- The Vector index will be used for RAG
+-- Note: there are many more attributes you can set to fine tune your results:
+-- See: https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/select-ai-retrieval-augmented-generation.html
+DECLARE
+ l_attributes VARCHAR2(32000);
+BEGIN
+ -- recreate the profile in case it already exists
+ dbms_cloud_ai.drop_profile (
+ profile_name => 'SUPPORT_SITE',
+ force => true
+ );
+
+ -- create an AI profile that will use the SUPPORT vector that's created in the next step.
+ -- Start by defining the attributes for the provider and the vector
+ l_attributes :=
+ '{"provider": "&AI_PROVIDER",
+ "credential_name": "&AI_CREDENTIAL_NAME",
+ "vector_index_name": "SUPPORT"';
+
+ -- Azure has different attributes than the other providers.
+ IF upper('&AI_PROVIDER') = 'AZURE' THEN
+ l_attributes := l_attributes ||
+ ',
+ "azure_resource_name": "&AZURE_OPENAI_RESOURCE_NAME",
+ "azure_deployment_name": "&AZURE_OPENAI_DEPLOYMENT_NAME",
+ "azure_embedding_deployment_name":"&AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME"';
+ END IF;
+ -- Finish the attribute definition
+ l_attributes := l_attributes || '}';
+
+ -- now, create the profile
+ dbms_cloud_ai.create_profile (
+ profile_name => 'SUPPORT_SITE',
+ attributes => l_attributes
+ );
+END;
+/
+
+-- Create your vector index
+BEGIN
+ -- Recreate the vector index in case it already exists
+ dbms_cloud_ai.drop_vector_index (
+ index_name => 'SUPPORT',
+ force => true
+ );
+
+ -- Create a vector index that points to the azure storage location. This will create a pipeline that loads the index and keeps
+ -- it up to date
+
+ dbms_cloud_ai.create_vector_index(
+ index_name => 'SUPPORT',
+ attributes => '{"vector_db_provider": "oracle",
+ "object_storage_credential_name": "&STORAGE_CREDENTIAL_NAME",
+ "location": "&STORAGE_URL/support-site/",
+ "profile_name": "SUPPORT_SITE",
+ "vector_table_name":"support_site_vector",
+ "vector_distance_metric": "cosine"
+ }'
+ );
+END;
+/
+
+-- A pipeline was created and you can see it here. The pipeline runs periodically to update the vectors.
+-- Check out the status table to see progress/details
+SELECT pipeline_id, pipeline_name, status, last_execution, status_table
+FROM user_cloud_pipelines;
+
+SELECT *
+FROM user_cloud_pipeline_attributes;
+
+SELECT *
+FROM user_cloud_pipeline_history;
+
+-- Review the generated table that has the chunks and vector embedding
+SELECT * FROM support_site_vector;
+
+-- Let's ask support questions using Select AI and this new profile
+begin
+ dbms_cloud_ai.set_profile(
+ profile_name => 'SUPPORT_SITE'
+ );
+end;
+/
+
+-- Ask your questions!
+SELECT AI NARRATE George Clooney lips are moving but I can not hear him;
+
+-- Or use the PLSQL API
+SELECT
+ dbms_cloud_ai.generate (
+ profile_name => 'SUPPORT_SITE',
+ action => 'narrate',
+ prompt => 'George Clooney lips are moving but I can not hear him'
+ ) as support_question;
diff --git a/select-ai/sql/select-ai-sql-function.sql b/select-ai/sql/select-ai-sql-function.sql
new file mode 100644
index 0000000..e3dfa2e
--- /dev/null
+++ b/select-ai/sql/select-ai-sql-function.sql
@@ -0,0 +1,130 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+/* Apply AI SQL function to your data to summarize information, make recommendations and more */
+
+/* PREREQUISITES
+ Install the sample schema using script
+ @data-create-sample-schema.sql
+*/
+
+-- Run this script as the Autonomous Database database user that will be access Azure OpenAI
+
+-- config.sql contains the configuration properties, like endpoints, credentials, AI providers and more
+@config.sql
+
+-- Create your credential and Select AI Profile
+@select-ai-create-profile.sql
+
+/**
+ what's great is you can now easily apply AI to your organization's data with a simple query
+*/
+-- look at a humorous support chat
+SELECT support_chat
+FROM v_customer_support
+WHERE support_chat_id = 1;
+
+/*
+Let's summarize find out the sentiment of the support conversation.
+A JSON document is a really good way to structure the prompt; the LLM can easily interpret the
+task and data set to operate on. The following SQL query combines the task with the data set.
+*/
+-- Here's the task and we'll apply it to the support chat.
+SELECT JSON_OBJECT(
+ 'task' VALUE 'summarize the support chat in 3 sentences. also return the customer sentiment',
+ support_chat) AS prompt_details
+FROM v_customer_support WHERE support_chat_id = 1;
+
+-- now apply GenAI in a query to get the answer
+WITH prompt_document AS (
+ -- this json document
+ SELECT JSON_OBJECT(
+ 'task' VALUE 'summarize the support chat in 3 sentences. also return the customer sentiment',
+ support_chat) AS prompt_details
+ FROM v_customer_support WHERE support_chat_id = 1
+)
+SELECT
+ DBMS_CLOUD_AI.GENERATE(
+ PROMPT => prompt_details,
+ PROFILE_NAME => '&AI_PROFILE_NAME',
+ ACTION => 'chat'
+ ) AS response
+FROM prompt_document;
+
+/* Create an EMAIL promotion to a customer. Recommend movies based on
+ those they previously watched AND movies that Moviestream wants to promote.
+ This is information the LLM knows nothing about - the prompt will augment the model
+ with customer data
+*/
+WITH promoted_movie_list AS
+(
+ -- movies we want to promote
+ SELECT
+ json_arrayagg(json_object(
+ 'title' value m.json_document.title ,
+ 'year' value m.json_document.year)
+ ) as promoted_movie_list
+ FROM "movieCollection" m
+ WHERE m.json_document.studio like '%Amblin Entertainment%'
+),
+customer_latest_movies AS (
+ -- movies the customer watched
+ SELECT
+ s.cust_id,
+ m.title,
+ m.year,
+ max(s.day_id) as day_id
+ FROM streams s, movies m, v_target_customers c
+ WHERE m.movie_id = s.movie_id
+ and c.customer_id = 1
+ and c.cust_id = s.cust_id
+ GROUP BY s.cust_id, m.title, m.year
+ ORDER BY day_id desc
+ FETCH first 3 ROWS ONLY
+),
+customer_details AS (
+ -- attributes about the customer
+ SELECT
+ m.cust_id,
+ c.customer_id,
+ c.first_name,
+ c.last_name,
+ c.age,
+ c.gender,
+ c.has_kids,
+ c.marital_status,
+ c.dog_owner,
+ max(day_id),
+ json_arrayagg(m.title) as recently_watched_movies
+ FROM v_target_customers c, customer_latest_movies m
+ WHERE
+ c.cust_id = m.cust_id
+ GROUP BY
+ m.cust_id,
+ c.customer_id,
+ first_name,
+ last_name,
+ age,
+ gender,
+ has_kids,
+ marital_status,
+ dog_owner
+),
+dataset AS (
+ -- combine this into a json document
+ SELECT json_object(p.*, c.*) doc
+ FROM customer_details c, promoted_movie_list p
+)
+SELECT
+ -- generate the promotion!
+ DBMS_CLOUD_AI.GENERATE (
+ prompt => 'Create a promotional email with a catchy subject line and convincing email text. Follow the task rules. ' ||
+ '1. Recommend 3 movies from the promoted movie list that are most similar to movies in the recently watched movie list. ' ||
+ ' Do not say that we are promoting these movies. For each move, say why you will love them.' ||
+ '2. Use lots of fun emojis in the response. ' ||
+ '3. Finish the email thanking them for being a customer and sign it "From The MovieStream Team" \n'
+ || doc,
+ profile_name => '&AI_PROFILE_NAME',
+ action => 'chat'
+ ) AS email_promotion
+FROM dataset;
diff --git a/select-ai/sql/select-ai-transform-and-summarize.sql b/select-ai/sql/select-ai-transform-and-summarize.sql
new file mode 100644
index 0000000..0f5884c
--- /dev/null
+++ b/select-ai/sql/select-ai-transform-and-summarize.sql
@@ -0,0 +1,150 @@
+-- Copyright (c) 2025 Oracle and/or its affiliates.
+-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
+
+/* Apply AI SQL function to your data to summarize information, derive sentiment, key phrases, extract fields from text */
+
+-- Run this script as the Autonomous Database database user that will be accesssing your AI service
+
+-- config.sql contains the configuration properties, like endpoints, credentials, AI providers and more
+@config.sql
+
+-- Create your credential and Select AI Profile
+@select-ai-create-profile.sql
+
+/*
+ Parse the various components of an address
+*/
+with example as (
+ select ('38 Newbury St, Office #3, Boston, MA 02116') as address
+ from dual
+),
+json_string as (
+select
+ dbms_cloud_ai.generate (
+ action => 'chat',
+ profile_name => '&AI_PROFILE_NAME',
+ prompt => 'Parse the given address without any comments. Only return valid JSON - no other text.'
+ || 'The result should be 1) a json object for that address and 2) be simple text, not markdown. '
+ || 'Here are the required JSON object fields: {addressNumber, streetName, unitNumber, city, state, zip}. '
+ || 'Apply to the following address: ' || address
+ ) as address_json
+from example
+)
+select
+ json_value(address_json, '$.addressNumber') as address_number,
+ json_value(address_json, '$.streetName') as street,
+ json_value(address_json, '$.unitNumber') as unit,
+ json_value(address_json, '$.city') as city,
+ json_value(address_json, '$.state') as state,
+ json_value(address_json, '$.zip') as zip
+from json_string j;
+
+/*
+Do the same as above, but ths time, batch up numerous addresses
+*/
+-- Create the table containing addresses
+drop table if exists temp_address;
+CREATE TABLE temp_address (
+ address VARCHAR2(200)
+);
+
+INSERT INTO temp_address (address) VALUES
+('123 Main St, Apt 3, Springfield, IL 62701'),
+('456 Elm Ave, #9, Rivertown, CA 90210'),
+('789 Oak Rd, Lakeside, NY 10001'),
+('101 Pine Ln, Mountain View, CO 80301'),
+('202 Maple Dr, Seaside, FL 33139'),
+('303 Cedar Blvd, Forest Hills, OR 97034'),
+('404 Birch St, Hilltown, TX 75001'),
+('505 Willow Way, Meadowville, WA 98101'),
+('606 Spruce Ct, Sunnydale, AZ 85001'),
+('707 Redwood Rd, Greenfield, MA 01301');
+
+commit;
+
+-- Do this in batches. Here, we'll do all the addresses b/c there are 10 of them
+-- First, turn the rows into a json array
+-- Send that to the model to transform - returning an array of json objects
+-- Turn that array of json objects into a tabular result
+WITH json_address_array AS (
+ SELECT JSON_ARRAYAGG(
+ JSON_OBJECT('address' VALUE address) RETURNING CLOB) AS addresses
+ FROM temp_address
+),
+json_address_with_fields AS (
+SELECT
+ dbms_cloud_ai.generate (
+ action => 'chat',
+ profile_name => '&AI_PROFILE_NAME',
+ prompt => 'Parse the given address list without any comments. Only return valid JSON - no other text.'
+ || 'The result should be 1) a json array with an json object for each address and 2) be simple text, not markdown. '
+ || 'Here are the required JSON object fields: {addressNumber, streetName, unitNumber, city, state, zip}. '
+ || 'Apply to the following list of address: ' || addresses
+ ) as address_json
+FROM json_address_array)
+SELECT jt.*
+FROM json_address_with_fields,
+ JSON_TABLE(address_json, '$[*]'
+ COLUMNS (
+ addressNumber VARCHAR2(10) PATH '$.addressNumber',
+ streetName VARCHAR2(100) PATH '$.streetName',
+ unitNumber VARCHAR2(10) PATH '$.unitNumber',
+ city VARCHAR2(150) PATH '$.city',
+ state VARCHAR2(10) PATH '$.state',
+ zip VARCHAR2(10) PATH '$.zip'
+ )
+ ) jt
+;
+
+
+/*
+Derive the address from free-form text
+*/
+with example as (
+ select ('I live in Brookline MA. '
+ || 'Why don''t you come by at 10. Walk over to 1785 Beacon Street. Get ready to walk up some stairs'
+ || ' - I''m in apartment is 6f.') as text
+ from dual
+)
+select
+ dbms_cloud_ai.generate (
+ action => 'chat',
+ profile_name => '&AI_PROFILE_NAME',
+ prompt => 'Parse the given text and extract the street address without any comments. '
+ || 'The result should simple text, not markdown and in the following format: '
+ || 'street, apartment, city, state, country, zip code. Here is an example formatted result: '
+ || '1 Main St, Westfield, NJ USA 07090. Apply these rules to the following text: '
+ || text
+ ) as address
+from example;
+
+
+/* Summarize a support chat and derive the support rep, key phrases and sentiment */
+
+with example as (
+ select 'I was so frustrated trying to resolve my billing issue. I spoke with Marty, who seemed completely uninterested in helping and kept transferring me to different departments. I feel like I wasted an hour of my time and still don''t have a solution.' as support_chat
+),
+summarize_json as (
+select
+ dbms_cloud_ai.generate (
+ action => 'chat',
+ profile_name => '&AI_PROFILE_NAME',
+ prompt => 'Summarize the support chat into the following json values without any comments - only return valid JSON - no other text: {summary, keyPhrases, sentiment, supportRep}. content: '
+ || support_chat || '. The result should 1) be a valid json document that can be validated against a json schema, 2) begin with { and end with }, 3) be simple text, not markdown. '
+ || 'Apply these rules to determine the values: '
+ || 'supportRep: the name of the customer service representative, '
+ || 'summary: a 2 sentence summary of the support conversation,'
+ || 'keyPhrases: Extract 2 of the most important keywords and phrases from the conversation. Focus on terms that capture the main topics, key ideas, and significant points discussed,'
+ || 'sentiment: return one value - Positive or Negative'
+ ) as chat_info
+from example
+)
+select
+ json_value(chat_info, '$.supportRep') as support_rep,
+ json_query(chat_info, '$.keyPhrases') as key_phrases,
+ json_value(chat_info, '$.sentiment') as sentiment,
+ json_value(chat_info, '$.summary') as summary,
+ chat_info
+from summarize_json;
+
+
diff --git a/select-ai/sql/support-site/account-billing-issues.html b/select-ai/sql/support-site/account-billing-issues.html
new file mode 100644
index 0000000..7788e7a
--- /dev/null
+++ b/select-ai/sql/support-site/account-billing-issues.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+ Account and Billing Issues and Solutions
+
+
+
+
+
+
Oracle Moviestream Troubleshooting
+
+
+
+
Account and Billing Issues and Solutions
+
+
Issue: Unable to Log In
+
Solution: First, double-check that you are entering the correct email and password. If you’ve forgotten your password, use the "Forgot Password" link to reset it. Make sure to check your spam or junk folder for the password reset email. If you’re still unable to log in, contact customer support for further assistance.
+
+
Issue: Forgotten Password
+
Solution: Click on the "Forgot Password" link on the login page. Enter your email address and check your inbox for a password reset email. Follow the instructions in the email to create a new password. If you don't receive the email, check your spam or junk folder and ensure you're using the correct email address associated with your account.
+
+
Issue: Incorrect Billing Amount
+
Solution: Review your recent transactions and billing history in your account settings to verify the charges. If you believe there is an error, contact customer support with details of the discrepancy. Provide any relevant documentation, such as invoices or payment receipts, to help resolve the issue. Customer support will investigate and correct any mistakes found on your bill.
+
+
Issue: Payment Method Declined
+
Solution: Ensure that your payment details are entered correctly, including the card number, expiration date, and CVV. Check with your bank or card issuer to ensure there are no issues with your card. If the problem persists, try using a different payment method. You can update your payment information in the billing section of your account settings.
+
+
Issue: Subscription Cancellation
+
Solution: Log in to your account and navigate to the subscription or billing section. Look for an option to cancel your subscription and follow the prompts. Ensure you read and understand any terms regarding cancellation, such as potential fees or loss of access to services. If you encounter any issues, contact customer support for assistance.
+
+
Issue: Duplicate Charges
+
Solution: Review your billing history in your account settings to confirm the duplicate charges. Contact customer support with details of the duplicate transactions, including dates and amounts. Provide any relevant documentation, such as bank statements or payment receipts, to help resolve the issue. Customer support will investigate and issue a refund if duplicate charges are confirmed.
+
+
Issue: Unable to Update Payment Information
+
Solution: Log in to your account and navigate to the billing or payment settings section. Ensure you are entering the correct information, including the card number, expiration date, and CVV. If you encounter any errors, try using a different browser or clearing your current browser’s cache and cookies. If the issue persists, contact customer support for assistance.
+
+
Issue: Account Locked
+
Solution: Accounts are typically locked due to multiple failed login attempts. Wait for a few minutes and try logging in again. If you’re still locked out, use the "Forgot Password" link to reset your password. If the problem continues, contact customer support to unlock your account and ensure there are no security concerns.
+
+
Issue: Missing Account Information
+
Solution: Log in to your account and verify all your information in the account settings section. Ensure your name, email address, billing address, and payment information are correctly entered. If any information is missing or incorrect, update it accordingly. If you encounter any issues, contact customer support for further assistance.
+
+
Issue: Unable to Access Account Features
+
Solution: Ensure your subscription is active and that you are logged in to the correct account. Check for any service outages or maintenance notifications on the service provider’s website. Clear your browser’s cache and cookies, or try accessing the features from a different browser or device. If the issue persists, contact customer support for assistance.
Solution: Ensure that your Wi-Fi network is active and other devices can connect to it. Restart your Roku device by unplugging it for a few seconds and then plugging it back in. Go to the Roku settings menu, select "Network," and follow the prompts to reconnect to your Wi-Fi network. If the issue persists, try restarting your router or moving the Roku device closer to the router.
+
+
Issue: Apple TV App Not Launching
+
Solution: Ensure that your Apple TV device is updated to the latest version by going to Settings > System > Software Updates. Restart your Apple TV by unplugging it for a few seconds and then plugging it back in. If the app still doesn't launch, try deleting and reinstalling the app. If the problem continues, contact Apple Support for further assistance.
+
+
Issue: Amazon Fire TV Stick Not Recognized by TV
+
Solution: Ensure that the Fire TV Stick is securely connected to an HDMI port on your TV. Use the included USB power adapter and cable to connect the Fire TV Stick to a power source. Switch to the correct HDMI input on your TV. If the device is still not recognized, try using a different HDMI port or cable.
+
+
Issue: Xbox App Crashing
+
Solution: Ensure that the Xbox app is updated to the latest version available in the Microsoft Store. Clear the app’s cache by going to Settings > Apps > Xbox app > Storage > Clear cache. Restart your Xbox console by holding the power button for 10 seconds until it shuts down, then turn it back on. If the app continues to crash, try uninstalling and reinstalling it.
+
+
Issue: Roku Remote Not Working
+
Solution: Check the batteries in your Roku remote and replace them if necessary. Restart your Roku device by unplugging it for a few seconds and then plugging it back in. Re-pair the remote by holding down the pairing button located in the battery compartment for a few seconds until the pairing light flashes. If the remote still doesn't work, try using the Roku mobile app as a remote control.
+
+
Issue: Apple TV Not Displaying on TV Screen
+
Solution: Ensure that your Apple TV is securely connected to an HDMI port on your TV. Check that your TV is set to the correct HDMI input. Restart your Apple TV by unplugging it for a few seconds and then plugging it back in. If the issue persists, try using a different HDMI cable or port.
+
+
Issue: Amazon Fire TV Buffering Issues
+
Solution: Check your internet connection to ensure it is stable and fast enough for streaming. Restart your Fire TV Stick by going to Settings > My Fire TV > Restart. Lower the video quality in the app settings to reduce buffering. If the issue continues, try restarting your router or moving the Fire TV Stick closer to the router.
+
+
Issue: Xbox Controller Not Connecting
+
Solution: Ensure that your Xbox controller has fresh batteries or is fully charged. Turn off and unplug your Xbox console for a few seconds, then plug it back in and turn it on. Press and hold the sync button on the console and the controller until the Xbox logo on the controller starts flashing. If the controller still doesn't connect, try using a USB cable to pair it with the console.
+
+
Issue: Roku App Not Available in App Store
+
Solution: Ensure that your device's operating system is updated to the latest version. Check the app store’s regional settings to ensure you are in a region where the Roku app is available. If the app is still not showing up, try accessing the app store from a different device. Contact Roku Support for further assistance if the issue persists.
+
+
Issue: Apple TV Remote Not Responding
+
Solution: Check the battery level of your Apple TV remote and charge it if necessary. Restart your Apple TV by unplugging it for a few seconds and then plugging it back in. Re-pair the remote by holding it close to the Apple TV and pressing the Menu and Volume Up buttons simultaneously for a few seconds. If the remote still doesn't respond, try using the Apple TV Remote app on your iPhone or iPad.
Solution: First, try rebooting your modem and router by unplugging them, waiting for about 30 seconds, and plugging them back in. If the issue persists, check to ensure no other devices are using excessive bandwidth. You can also run a speed test to see if you're getting the speeds you're paying for. Contact your Internet Service Provider (ISP) if the problem continues.
+
+
Issue: No Internet Connection
+
Solution: Start by checking if all cables are securely connected. Reboot your modem and router by unplugging them for 30 seconds and then plugging them back in. Make sure your Wi-Fi is turned on and you're connected to the correct network. If you're still having issues, contact your ISP for further assistance.
+
+
Issue: Frequent Disconnects
+
Solution: Ensure your router firmware is up-to-date by visiting the manufacturer's website and following their update instructions. Try changing the Wi-Fi channel on your router settings to reduce interference. Place your router in a central location to improve signal strength. If you continue to experience disconnects, consider upgrading to a more robust router.
+
+
Issue: Weak Wi-Fi Signal
+
Solution: Relocate your router to a central location in your home to maximize coverage. Remove any physical obstructions like walls or large furniture that might be blocking the signal. Consider using a Wi-Fi extender to boost the signal in areas with weak reception. Updating your router's firmware can also help improve signal strength.
+
+
Issue: Unable to Connect to Wi-Fi
+
Solution: Double-check that you are entering the correct Wi-Fi password. Restart your device and try reconnecting. Forget the network on your device and reconnect to it by selecting it from the list of available networks and entering the password again. If the problem persists, reboot your modem and router.
+
+
Issue: IP Address Conflict
+
Solution: Restart your router to assign new IP addresses to your devices. On your device, you can release and renew the IP address by opening Command Prompt (Windows) or Terminal (Mac) and typing "ipconfig /release" followed by "ipconfig /renew." Ensure that your router's DHCP settings are enabled. If the issue continues, consider setting static IP addresses for your devices.
+
+
Issue: DNS Server Not Responding
+
Solution: Restart your modem and router. On your device, you can change the DNS server settings to use Google’s DNS (8.8.8.8 and 8.8.4.4) or OpenDNS (208.67.222.222 and 208.67.220.220). To do this on Windows, go to Network and Sharing Center > Change adapter settings > Right-click on your network > Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties. Enter the preferred and alternate DNS server addresses and save the changes.
+
+
Issue: Limited Connectivity
+
Solution: Reboot your modem and router to refresh your network connection. Ensure that your device is within range of the Wi-Fi signal. On your device, forget the network and reconnect to it. If you're using a public Wi-Fi network, you may need to open a web browser and log in or accept terms and conditions to gain full access.
+
+
Issue: Network Adapter Issues
+
Solution: Check if your network adapter is enabled by going to Device Manager (Windows) or System Preferences > Network (Mac). If it's disabled, enable it. Update the network adapter drivers by visiting the manufacturer's website and downloading the latest version. If updating the drivers doesn't work, try uninstalling the network adapter from Device Manager and then restarting your computer to allow it to reinstall automatically.
+
+
Issue: Router Not Broadcasting SSID
+
Solution: Access your router's settings by entering its IP address into a web browser. Log in using the admin credentials. Navigate to the wireless settings section and ensure that SSID broadcast is enabled. Save the settings and reboot your router. If the SSID still doesn't appear, reset your router to factory settings and reconfigure it from scratch.
Solution: First, check your internet connection to ensure you have sufficient bandwidth. Try lowering the video quality by selecting a lower resolution setting in the video player. Close any background applications or devices that may be using bandwidth. If the issue persists, restarting your modem and router can sometimes help improve the connection.
+
+
Issue: Audio Out of Sync with Video
+
Solution: Refresh the video page or restart the video player to see if that resolves the issue. If the problem continues, try clearing your browser's cache and cookies. Ensure that your device's audio drivers are up to date. As a last resort, try using a different browser or device to see if the issue persists.
+
+
Issue: Video Not Playing at All
+
Solution: Ensure that your internet connection is active and stable. Refresh the page or restart the video player. Clear your browser’s cache and cookies, and make sure your browser is up to date. If the video still doesn't play, try accessing it from a different browser or device.
+
+
Issue: Poor Video Quality
+
Solution: Check your internet connection to ensure you have a stable and fast connection. In the video player settings, select a higher resolution if available. Close other applications or devices that might be using bandwidth. If the problem continues, try restarting your router and modem.
+
+
Issue: No Sound in Video
+
Solution: First, check that your device's volume is turned up and not muted. Ensure that the video player volume is also turned up. If you're using external speakers or headphones, make sure they are properly connected. Restart the video and try playing a different video to see if the issue persists.
+
+
Issue: Video Freezes
+
Solution: Refresh the video page or restart the video player. Ensure your internet connection is stable and that no other devices are using excessive bandwidth. Clear your browser's cache and cookies and update your browser if needed. If the issue continues, try watching the video on a different device or browser.
+
+
Issue: Video Playback Error
+
Solution: Refresh the video page or restart the video player. Clear your browser’s cache and cookies to ensure there are no corrupted files causing the issue. Make sure your browser and any video plugins are up to date. If the error persists, try accessing the video from a different browser or device.
+
+
Issue: Video Stutters
+
Solution: Check your internet connection to ensure it's stable and fast enough for streaming. Lower the video quality by selecting a lower resolution in the video player settings. Close any background applications or devices that might be using bandwidth. Restart your modem and router if the issue persists.
+
+
Issue: Black Screen During Playback
+
Solution: Refresh the video page or restart the video player to see if that resolves the issue. Clear your browser’s cache and cookies, and make sure your browser is up to date. Ensure that any video plugins are also up to date. If the problem continues, try using a different browser or device to watch the video.
+
+
Issue: Video Plays but No Picture
+
Solution: Ensure that your device's video drivers are up to date. Refresh the video page or restart the video player. Clear your browser’s cache and cookies, and make sure your browser and any video plugins are up to date. If the issue persists, try accessing the video from a different browser or device.
+
+
+
diff --git a/select-ai/sql/support-site/subscription-login-issues.html b/select-ai/sql/support-site/subscription-login-issues.html
new file mode 100644
index 0000000..db22094
--- /dev/null
+++ b/select-ai/sql/support-site/subscription-login-issues.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+ Subscription and Login Issues and Solutions
+
+
+
+
+
+
Oracle Moviestream Troubleshooting
+
+
+
+
Subscription and Login Issues and Solutions
+
+
Issue: Unable to Log In
+
Solution: First, double-check that you are entering the correct email and password. If you’ve forgotten your password, use the "Forgot Password" link to reset it. Make sure to check your spam or junk folder for the password reset email. If you’re still unable to log in, contact customer support for further assistance.
+
+
Issue: Forgotten Password
+
Solution: Click on the "Forgot Password" link on the login page. Enter your email address and check your inbox for a password reset email. Follow the instructions in the email to create a new password. If you don't receive the email, check your spam or junk folder and ensure you're using the correct email address associated with your account.
+
+
Issue: Subscription Not Recognized
+
Solution: Ensure that you are logged in with the email address associated with your subscription. Check your account settings to verify that your subscription is active. If you recently renewed or upgraded, it may take a few minutes for the changes to reflect. If the issue persists, contact customer support with your subscription details for assistance.
+
+
Issue: Unable to Update Subscription
+
Solution: Log in to your account and navigate to the subscription management section. Ensure you are entering the correct information when updating your subscription. If you encounter any errors, try using a different browser or clearing your current browser’s cache and cookies. If the issue persists, contact customer support for assistance.
+
+
Issue: Account Locked
+
Solution: Accounts are typically locked due to multiple failed login attempts. Wait for a few minutes and try logging in again. If you’re still locked out, use the "Forgot Password" link to reset your password. If the problem continues, contact customer support to unlock your account and ensure there are no security concerns.
+
+
Issue: Duplicate Subscription
+
Solution: Check your billing history and account settings to verify if you have multiple active subscriptions. Contact customer support with details of the duplicate subscriptions, including dates and amounts. Provide any relevant documentation, such as invoices or payment receipts, to help resolve the issue. Customer support will investigate and correct any duplicate subscriptions found.
+
+
Issue: Unable to Cancel Subscription
+
Solution: Log in to your account and navigate to the subscription management section. Look for an option to cancel your subscription and follow the prompts. Ensure you read and understand any terms regarding cancellation, such as potential fees or loss of access to services. If you encounter any issues, contact customer support for assistance.
+
+
Issue: Subscription Renewal Failed
+
Solution: Ensure that your payment information is up to date and that there are sufficient funds in your account. Try updating your payment method in the billing section of your account settings. If the renewal still fails, contact customer support with details of the issue. They can help you resolve the payment issue and ensure your subscription is renewed.
+
+
Issue: Subscription Benefits Not Applied
+
Solution: Ensure that you are logged in with the email address associated with your subscription. Check your account settings to verify that your subscription is active and the benefits are listed. If you recently renewed or upgraded, it may take a few minutes for the changes to reflect. If the issue persists, contact customer support with your subscription details for assistance.
+
+
Issue: Unable to Access Subscription Content
+
Solution: Ensure that you are logged in with the email address associated with your subscription. Check your account settings to verify that your subscription is active. Clear your browser’s cache and cookies, or try accessing the content from a different browser or device. If the issue persists, contact customer support for assistance.