Pakistan's First Oracle Blog
MagicQuill Installation on Windows, Linux, Mac for AI Image Editing for Free
This video is an easy step-by-step tutorial to install MagicQuill locally on Linux, Windows, Mac.
Code:
SOLVED - Cannot Log in Oracle cloud with 2FA after Phone Change with Oracle Mobile Authenticator
I have been logging in to Oracle cloud using multi-factor authentication using 2FA with Oracle Mobile Authenticator and it was going fine until I had to change my phone. Both of my phones are android and I THOUGHT that I will simply migrate the apps and keep using the accounts in my Oracle mobile authenticator same way, but it seems that after migration I lost all the accounts.
Multi-Factor Authentication (MFA) is a security process that requires a user to provide two or more authentication factors to access a system, network, or application. Two-Factor Authentication (2FA) is a type of Multi-Factor Authentication that requires a user to provide two authentication factors:
- Something you know (password, PIN)
- Something you have (smartphone, token, or a one-time password sent via SMS or authenticator app)
So I was using 2FA with this Oracle Mobile Authenticator. I tried with my older codes , QR codes, the password, PIN and stuff but nothing worked. No matter, what I tried I simply couldn't log in to Oracle Cloud since the page asked me for a code generated by the authenticator.
Eventually following is the only way I could find to resolve this issue:
I talked in Oracle live chat, and they asked me to find an engineer to send me a bypass code.
If you don't know what Oracle Mobile Authenticator app is then as per docs:
Oracle Mobile Authenticator enables you to securely verify your identity by using your mobile device as a authentication factor. The app generates one-time passwords for login. Or it can receive notifications for login, which can be approved with a simple tap. When this authentication is used on top of username-password, it adds an additional layer of security that is essential for today's online applications.
Features:
- Generate one-time passwords even when the device is offline
- Push Notification based approval
- App PIN for app protection
- Set up via QR code, Config URL, or by entering key manually
- Multiple account support
- Generate OTP for other applications that make use of One-Time Password as per RFC 6238
- Generate one-time passwords even when the device is offline
- Push Notification based approval
- App PIN for app protection
I hope this helps.
How-To Integrate ChatGPT with Oracle Digital Assistant
Oracle Digital Assistant (ODA) provides a comprehensive platform for creating conversational interfaces. This article will guide you through integrating ChatGPT with ODA using the bots-node-sdk and openai libraries.
Prerequisites:
- Oracle Digital Assistant instance
- ChatGPT API key
- Node.js environment
Configuration:
Create a new file named services.js and add the following code:
- Replace YOUR_CHATGPT_API_KEY with your actual ChatGPT API key.
- Replace YOUR_ODA_WEBHOOK_URL and YOUR_ODA_WEBHOOK_SECRET with your actual Oracle Digital Assistant webhook URL and secret.
Understanding Read-Only Options in Oracle: Instances vs. Databases
When it comes to limiting data modifications in Oracle, two options are available: Read-Only Instances and Read-Only Databases. While both options restrict data changes, they serve different purposes and are used in distinct contexts.
Read-Only Instances:
A Read-Only Instance is a configuration in Oracle Real Application Clusters (RAC) where one or more instances are set to operate in read-only mode. This setup is ideal for environments with high concurrency for both read and write operations.
Key features of Read-Only Instances include:
- Real-time query scaling by dedicating specific instances to read-only operations
- Write operations are not allowed on designated read-only instances, but other instances can still handle writes
- Useful for load balancing in RAC configurations
- Read-Only Instances are suitable for offloading read-heavy workloads in RAC environments and supporting real-time analytics without impacting primary write performance.
Read-Only Databases
A Read-Only Database, on the other hand, is a database-wide mode that restricts all write operations. This setup is typically used for archiving, reporting, or maintenance tasks.
Key features of Read-Only Databases include:
- The entire database is locked for write operations
- Used for archiving, reporting, or maintenance tasks
- Can be achieved using the ALTER DATABASE OPEN READ ONLY command or a Data Guard physical standby database
- Read-Only Databases are ideal for archiving purposes, maintenance periods, or using a standby database for reporting.
Choosing the Right Option:
When deciding between Read-Only Instances and Read-Only Databases, consider the following:
- If you have a RAC environment and need to offload read-heavy workloads, Read-Only Instances might be the better choice.
- If you need to restrict, write operations across the entire database, a Read-Only Database is the way to go.
Ultimately, understanding the differences between Read-Only Instances and Read-Only Databases will help you make informed decisions about managing your Oracle database.
Hope this helps.
Resolving the "Invalid Characters" Error in Oracle Database 23ai Free Edition Installation
Oracle Database 23ai Free Edition offers a fully functional database for development, testing, and production purposes, allowing users to experience the powerful features of Oracle Database. However, users may encounter errors during the installation process, which can be frustrating and time-consuming to resolve. This article addresses a common issue that users may encounter during the installation of Oracle Database 23ai Free Edition and provides a solution to ensure a successful installation.
During a silent installation of Oracle Database 23ai Free Edition on Windows, the process terminates abruptly, and the setup.log file displays the following error message:
"SEVERE: The provided destination folder has invalid characters. Verify and try again."
The log file continues to grow in size, and the installation process must be manually terminated. This error can occur even when the destination folder path appears to be correct and free of any invalid characters.
Troubleshooting:
To resolve this issue, ensure that the following conditions are met:
1. Absolute Path for RSP File
Specify an absolute path for the RSP file in the command line. For example:
setup.exe /s /v"RSP_FILE=c:\myinstallpath\FREEInstall.rsp" /v"/L*v setup.log" /v"/qn"
This is necessary because the setup.exe file does not recognize the RSP file if only the filename is provided. By specifying the absolute path, you ensure that the setup.exe file can locate the RSP file correctly.
2. Empty Values in RSP File
Although the RSP file comment suggests that no parameter should be left with an empty value, it is safe to leave the DB_DOMAIN parameter empty if it is not required. This is because the DB_DOMAIN parameter is not mandatory, and leaving it empty does not affect the installation process.
Here is an example RSP file (FREEInstall.rsp) that can be used for a successful installation:
#Do not leave any parameter with empty value
#Install Directory location, username can be replaced with current user
INSTALLDIR=C:\app\myname\product\23ai\
#Database password, All users are set with this password, Remove the value once installation is complete
PASSWORD=mypassword
#If listener port is set to 0, available port will be allocated starting from 1521 automatically
LISTENER_PORT=0
#Specify char set of the database
CHAR_SET=AL32UTF8
#Specify the database domain for the db unique name specification
DB_DOMAIN=
#Specify TRUE for performing software only install
SOFTWARE_ONLY=FALSE
#Specify TRUE if installer should modify directory permissions when ACL is incorrect
MODIFY_DIRECTORY_PERMISSIONS=TRUE
By following the troubleshooting steps and using the example RSP file provided, you should be able to successfully install Oracle Database 23ai Free Edition on your Windows system. Remember to specify the absolute path for the RSP file and leave the DB_DOMAIN parameter empty if it is not required. If you encounter any further issues, refer to the Oracle Database documentation and support resources for assistance.
Control LLM's Output with Ollama Structured Outputs
This video shows how to use Ollama to constrain the LLM output to a structured format locally.
Code:
Install Indic Parler-TTS model Locally
This video shows how to locally install Indic Parler-TTS which can officially speak in 20 Indic languages.
Install HunyuanVideo Model Locally for Text to Video Generation
This video shows how to install HunyuanVideo AI model for text to video long generation locally.
Code:
Embedding Model in Oracle Database 23ai - Step-by-step Hands-on Tutorial
This is a step-by-step hands-on tutorial to use Oracle AI Vector Search on unstructured data combined with relational search on business data.
Create a Free Local AI Dungeon Game with Ollama
This video shows how to create a dungeon and dragon game with help of local models with Ollama easily.
Code:
Free ComfyUI WorkFlows for Various AI Models
ComfyUI is a user-friendly, node-based interface for Stable Diffusion. It allows you to create custom image generation workflows by connecting different functional blocks, known as "nodes".
Following is the link to collection of free comfyUI workflows I use on my YT Channel videos:
I hope that helps.
Favorite Feature in Oracle 23ai
In today's data-driven world, businesses rely on robust databases to manage their mission-critical workloads. Oracle Database 23ai Free offers a streamlined experience of this industry-leading database, with resource limits of up to 2 CPUs for foreground processes, 2 GB of RAM, and 12 GB of user data on disk. This free version is designed for ease of use and simple download, making it an ideal starting point for exploring the capabilities of Oracle Database.
A key feature that sets Oracle Database 23ai apart is its AI Vector Search capability. But what exactly are vectors? In simple terms, vectors are mathematical representations of data that capture complex relationships and patterns. They are a way to encode data, such as text, images, or audio, into numerical values that can be easily processed and analyzed by machines. Vectors enable computers to understand the semantic meaning and context of data, allowing for more accurate and efficient searching and analysis.
Vector search takes this concept a step further. It is a technique used to quickly identify similar data points within a vast dataset. Traditional search methods rely on keyword matching or exact phrase searches, but vector search enables more nuanced and intuitive queries. By comparing the vector representations of different data points, vector search can identify patterns and relationships that would be missed by traditional search methods.
Oracle AI Vector Search builds on this technology, introducing a converged database capability that revolutionizes the way businesses interact with their data.
By storing vectors as a native data type and utilizing vector indexes and SQL functions, AI Vector Search enables fast and simple similarity search queries on both structured and unstructured data. This means that customers can quickly identify similar information across documents, images, and other unstructured data sources. Furthermore, AI Vector Search allows prompts to large language models (LLMs) to be augmented with private business data or domain knowledge, unlocking new possibilities for data-driven insights and decision-making.
With Oracle AI Vector Search, businesses can unlock the full potential of their data, uncovering hidden patterns and relationships that drive innovation and growth. Whether you're working with text, images, or other data types, Oracle Database 23ai's AI Vector Search capability is poised to transform the way you search, analyze, and interact with your data.
Oracle Database 23ai and GraphQL
In today's data-driven world, AI needs fuel to power innovative applications. Oracle Database 23ai brings AI directly to your data, making it effortless to develop cutting-edge apps and tackle mission-critical tasks. But what makes this possible? Enter GraphQL, a game-changing query language that's changing the way we interact with data.
GraphQL is an open-source data query and manipulation language developed by Facebook in 2015. It allows clients to specify exactly what data they need, eliminating unnecessary requests and improving performance. GraphQL's declarative nature makes it a perfect fit for modern, data-driven applications. Its history is impressive, with Facebook open-sourcing it in 2015, followed by widespread adoption by tech giants like GitHub, Pinterest, and Airbnb.
GraphQL solves several pain points that have plagued developers for years. By allowing clients to receive only requested data, GraphQL reduces data transfer and minimizes bandwidth usage. This results in improved performance, as fewer requests and optimized data retrieval lead to faster responses. Additionally, GraphQL supports multiple data sources, making integration seamless. Its self-documenting nature and intuitive queries simplify development, making it a favorite among developers.
Traditionally, relational databases like Oracle used SQL for querying. However, SQL can be restrictive, requiring multiple queries to fetch related data. GraphQL changes this by enabling simplified complex queries and real-time data retrieval. This makes it perfect for applications requiring instant updates. Oracle's integration of GraphQL into its database takes this power to the next level, offering native support, optimized queries, and robust security features.
With Oracle Database 23ai and GraphQL, developers can build innovative applications faster and more efficiently. GraphQL's nested queries and relationships make fetching complex data easier, while Oracle's database engine optimizes queries for peak performance. This powerful combination enables developers to focus on building exceptional user experiences.
Imagine querying a movie database to get personalized recommendations. With GraphQL, you can fetch exactly what you need. For example:
These examples illustrate the potential of Oracle Database 23ai and GraphQL. By combining AI-powered data analysis with intuitive querying, developers can unlock new possibilities in application development.
With Oracle Database 23ai and GraphQL, building innovative movie apps is faster, easier, and more powerful than ever.
Hope this helps.
Session Monitoring and Session Cleanup in Oracle
As an Oracle database administrator, managing sessions is crucial for maintaining performance and availability. This script provides a comprehensive solution for monitoring and cleaning up idle and blocking sessions.
The script identifies blocking sessions exceeding a specified threshold (default: 60 minutes), kills them, and sends notification emails. It also identifies idle sessions exceeding a specified threshold (default: 60 minutes), kills them, and sends notification emails. Key components include session identification using V$SESSION , V$PROCESS , and V$TRANSACTION , threshold settings, notification email functionality using TRACK.SEND_EMAIL , and error handling.
To implement this script, you'll need to declare variables for threshold settings (minutes), notification lists, and other necessary variables. The script then monitors blocking sessions using a FOR loop, killing each blocking session and sending notifications. A similar loop monitors idle sessions.
To maximize the effectiveness of this script, consider the following best practices:
- Schedule the script to run regularly (e.g., every 30 minutes).
- Adjust threshold settings according to your database requirements.
- Monitor notification emails for killed sessions.
Tencent Hunyuan3D-1 - Install Locally - 3D Generation AI Model from Text
This video shows how to locally install Tencent Hunyuan3D-1 model for 3D generation.
Code:
How-To Resolve Enqueue Errors in Any Version of Oracle Database
As an Oracle database administrator, you've likely encountered errors that make your heart skip a beat. One such error is ORA-00240: control file enqueue held for more than 120 seconds. But before you panic, let's break down what this error means and how to address it.
This error occurs when the control file enqueue is held for an extended period (over 120 seconds). The control file is a critical component of the Oracle database, managing database structure and integrity.
If you see this error occasionally, and your instance remains up and running, it's likely a fleeting glitch. Ignore it and move on.
However, if:
- The error occurs frequently
- Your instance hangs or crashes
- Performance is severely impacted
You need to be worried about it.
In my experience, ORA-00240 can be triggered by:
- High session counts conflicting with OS ulimits
- Shared pool latch contention (as noted in some MOS documents)
- Bugs in the Oracle software (resolvable with PSUs or one-off patches)
You should be checking:
- Check alert logs for frequency and patterns.
- Verify OS ulimits are adequately set.
- Monitor shared pool latch contention using
Don't panic over occasional ORA-00240 errors. However, frequent occurrences warrant immediate attention. By understanding the causes and taking proactive steps, you'll minimize downtime and ensure your Oracle database runs smoothly.
Troubleshooting ORA-1652 by Identifying Temporary Segment Usage
I still get bit anxious when I receive this ORA-1652 error in production databases but its a hard nut to crack. Encountering ORA-1652 errors can be frustrating, especially when dealing with temporary segment usage. To quickly identify the root cause, use the following query to analyze temporary segment allocation:
To further investigate:
- Real-Time Session Monitoring: Use Oracle Enterprise Manager (EM) or query V$SESSION to identify active sessions consuming temporary space.
- Temporary Segment Usage: Query V$TEMPSEG_USAGE to analyze temporary segment allocation.
- v$tempseg_usage: Examine this view to identify temporary segment usage patterns.
Key Views to Analyze
- dba_hist_active_sess_history: Historical session data
- V$SESSION: Real-time session information
- V$TEMPSEG_USAGE: Temporary segment usage details
- v$tempseg_usage: Temporary segment usage patterns
Common Causes of ORA-1652
- Insufficient temporary tablespace
- Large sorting or joining operations
- Inefficient SQL queries
- Incorrect indexing
Best Practices
- Regularly monitor temporary segment usage
- Optimize SQL queries to reduce temporary space allocation
- Ensure sufficient temporary tablespace allocation
- Consider partitioning large tables
By using these queries and views, you'll quickly identify the causes of ORA-1652 errors and take corrective action to optimize your database performance.
Estimating Query Execution Time in Oracle
As an Oracle database administrator or developer, running heavy, long-running, and critical production queries can be nerve-wracking, especially in cloud environments. One crucial aspect is estimating the query execution time to plan and manage resources effectively. In this post, we'll explore a valuable query that provides an approximate ETA (Estimated Time of Arrival) for parallel queries on large datasets.
Knowing the ETA helps:
- Plan resource allocation and utilization
- Manage expectations and prioritize tasks
- Identify potential performance bottlenecks
- Optimize queries for better performance
ETA Query:
This query joins three dynamic performance views:
- gv$px_session (parallel execution sessions)
- gv$px_process (parallel execution processes)
- gv$session_longops (long-running operations)
It calculates:
- eta_min: estimated time to completion in minutes
- pct_done: percentage of work completed
To customize the query:
- Filter by specific username or operation name
- Add additional columns for more detailed information
- Use gv$session instead of gv$px_session for non-parallel queries
By using this query, you'll gain valuable insights into your critical production queries and make informed decisions about resource allocation and optimization.
Oracle Database Connections with Oracle Functions
As a developer, connecting to databases can be a hassle. But what if you could leverage a serverless platform to streamline your connections? Enter Oracle Functions, a fully managed, scalable, and on-demand functions-as-a-service platform built on Oracle Cloud Infrastructure (OCI). In this post, we'll explore how to connect to an Oracle database using Oracle Functions and Python.
With Oracle Functions, you can focus on writing code, not managing infrastructure. Its serverless architecture eliminates administrative tasks, allowing you to:
- Scale effortlessly
- Pay only for executed functions
- Enjoy enterprise-grade security
To connect to your Oracle database, you'll need:
- cx_Oracle library (install using pip install cx_Oracle)
- Oracle database credentials (username, password, host, and service name)
Here's an example Python function to get you started:
When using Oracle Functions to connect to your database:
- Ensure your Oracle database is accessible from your Oracle Functions environment.
- Store sensitive credentials securely using Oracle Cloud Infrastructure's Vault service.
- Optimize your queries for performance.
By using Oracle Functions and Python, you can simplify your Oracle database connections and focus on building scalable applications.
Train F5-TTS Voice Model on Custom Dataset for Free Locally - Step by Step Tutorial
This video is a step-by-step tutorial to fine-tune or do full training of a voice model F5-TTS and E2-TTS on your own custom voice dataset locally.