Daily Archives: February 4, 2025

Dynamic Query Script to create public synonym and private synonym in database

Please use the below query to generate the script and run accordingly.   Public Synonym: ——————– select ‘create or replace public synonym ‘||table_name||’ for ‘||owner||’.’||table_name||’;’ from dba_tables where owner=’QA’;  …

Read More

Script to fix export issue while it hangs during Statistics, Marker, Type

Please run the below and do the export again. create index SYS.IMPDP_STATS_1 ON SYS.IMPDP_STATS (c5,type,c1,c2,c3,c4,statid,version);    

Read More

Implementing Docker Image Optimization to Reduce Build Times and Registry Storage Usage

Implementing Docker Image Optimization to Reduce Build Times and Registry Storage Usage Introduction/Issue:
 As the number of Dockerized services in our system grew, we noticed that the Docker images were…

Read More

Fixing Node Not Ready in Kubernetes

Fixing Node Not Ready in Kubernetes 

Introduction/Issue:

 One day, while working on our Kubernetes cluster, we noticed that one of the nodes went into a NotReady state. This caused some…

Read More

Enhancing User Experience with a Custom Loading Page in Oracle APEX

Introduction: – User experience (UX) plays a crucial role in modern web applications. A smooth and intuitive interface keeps users engaged and improves usability. One common challenge in Oracle APEX…

Read More

Preventing Duplicate Tabs in Oracle APEX Using JavaScript

Introduction: – In modern web applications, users often open multiple tabs of the same page, which can lead to session conflicts, unexpected behavior, or data inconsistencies. To ensure a smooth…

Read More

Streams in Snowflake

In snowflake, Streams are a powerful feature designed for tracking changes (like inserts, updates, and deletes) to a table. They allow you to capture data changes in realtime and use this data for various purposes, such as incremental loading, change data capture (CDC), or auditing. Here’s an overview of Streams in Snowflake and how to use them: What is a Stream in Snowflake? A Stream in Snowflake is an object that tracks changes (DML operations like INSERT, UPDATE, and DELETE) made to a table. It captures these changes in a special table that is internally managed by Snowflake, and these changes can then be queried. A Stream has two important components: Change tracking:It captures DML changes, including the type of change (insert, update, delete). Metadata:Information such as the row’s previous state for updates, and how many rows have changed since the last time the stream was queried. How to Create a Stream You can create a stream on a table using the CREATE STREAM command. Basic Syntax: CREATE OR REPLACE STREAM <stream_name> ON TABLE <table_name> [ SHOW_INITIAL_ROWS = TRUE | FALSE ]; SHOW_INITIAL_ROWS: If set to TRUE, it will include existing rows in the stream at…

Read More

Step-by-Step Guide for SQL Server Always on Failover

Step-by-Step Guide for SQL Server Always on Failover Introduction SQL Server Always On Availability Groups provide high availability and disaster recovery capabilities for SQL Server databases. Synchronous commit mode ensures that data is committed to both the primary and secondary replicas, guaranteeing data integrity during failover. This guide provides detailed steps for performing both manual and automatic failovers in an Always On Availability Group. Part 1: Preliminary Checks and Preparations Before initiating any failover, whether manual or automatic, ensure the environment is healthy and ready for the transition. Step 1: Prerequisites Check – Synchronization State: Confirm that all secondary replicas are in the SYNCHRONIZED state. – Query to Check Synchronization State: SELECT ag.name AS [AvailabilityGroupName], ar.replica_server_name AS [ReplicaServerName], drs.synchronization_state_desc AS [SynchronizationState] FROM sys.dm_hadr_availability_replica_states AS drs JOIN sys.availability_replicas AS ar ON drs.replica_id = ar.replica_id JOIN sys.availability_groups AS ag ON ar.group_id = ag.group_id WHERE drs.synchronization_state_desc = ‘SYNCHRONIZED’;   – Action: Ensure that all replicas are in the SYNCHRONIZED state to avoid any data loss during failover. – Verify Health of Availability Group: – Query to Check Availability Group Health: SELECT ag.name AS [AvailabilityGroupName], ags.primary_replica AS [PrimaryReplica], ags.operational_state_desc AS [OperationalState] FROM sys.dm_hadr_availability_group_states AS ags JOIN sys.availability_groups AS ag ON ags.group_id = ag.group_id;   – Action: Ensure that the OperationalState indicates a healthy state for a successful failover. Step 2: Validate Readiness for Failover…

Read More

Essential Guide for Regular MS SQL Server Patching

Essential Guide for Regular MS SQL Server Patching Introduction: In SQL Server management, keeping up with service packs and cumulative updates is not just a recommendation, it’s a necessity. Understanding these updates and their importance can make a significant difference in the performance, security, and reliability of your SQL Server environment. Table of Contents Pre-Check and Prerequisites before Patching. SQL Server 2022 Most recentPatch. Steps to Install the patch update. Post-Installation verification. Successfully upgraded Patching. Server restart Hack. Conclusion. Pre-Check and Prerequisites Before Patching: Before diving into the patching process, it’s essential to prepare thoroughly to avoid any disruption. ü Take necessary backups of application databases. ü Check Disk Space and System Requirements. ü Inform Stakeholders About Downtime ü Disable Scheduled Jobs: Temporarily disable any scheduled jobs that could interfere with the patching process. ü Apply the Patch in a Test Environment, before updating your live server, SQL Server 2022 Most recent Patch : The latest cumulative update for SQL Server 2022 is CU14 (KB5038325), released in July 2024. This update includes all fixes and improvements from previous updates and is essential for maintaining the security and performance of your SQL Server installations. Some notable features and improvements in CU14 include: ü General bug fixes and performance enhancements. ü Security updates ensure the system remains secure and reliable. ü Improvements in manageability and reliability to enhance overall system performance. Steps to Install the patch update: ü Run the Installer: Double-click the setup file to start the installer then patch installer will pop up. ü Accept License Terms: Review and accept the license terms to proceed with the installation. ü Select Features to Update:…

Read More

Snowpipe (a continuous data ingestion pipeline) in Snowflake

To create a new Snowpipe (a continuous data ingestion pipeline) in Snowflake, follow these steps: Prerequisites Storage Integration: Set up a cloud storage integration (AWS S3, Azure Blob, GCP) to securely connect Snowflake to your cloud storage. Stage: Create an external stage pointing to your cloud storage (if not already created). Target Table: Ensure the destination table exists in Snowflake. Create a Stage (if needed) Define a stage pointing to your cloud storage location. Example for AWS S3: CREATE OR REPLACE STAGE my_s3_stage URL = ‘s3://your-bucket/path/’ STORAGE_INTEGRATION = my_storage_integration FILE_FORMAT = my_file_format; — (e.g., CSV, JSON) Create a Pipe A pipe uses the…

Read More