Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • TNSNAMES entries details Oracle
  • Configure ssh authentications for RAC Oracle
  • Move WordPress site from one hosting service to other. PHP/MYSQL/Wordpress
  • My FTP Job Scheduling for www.pvmehta.com PHP/MYSQL/Wordpress
  • JSON/XML Types in Oracle Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets. Linux/Unix
  • How to know Number of CPUs on Sun Box Linux/Unix
  • How To Limit The Access To The Database So That Only One User Per Schema Are Connected (One Concurrent User Per Schema) Oracle
  • get_vmstat.ksh for Solaris Oracle
  • My Minimum Tuning Programs Oracle
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • Session_info.ksh Linux/Unix
  • temp_use.sql diplays usage of temp ts Oracle
  • Another export with Query Oracle

SQL Tracker by SID sqltrackerbysid.sql

Posted on 22-Apr-202522-Apr-2025 By Admin No Comments on SQL Tracker by SID sqltrackerbysid.sql

col SAMPLE_TIME format a25col program format a20col SQL_EXEC_START format a25col machine format a15set lines 140 pages 200alter session set nls_date_format=’DD-MON-RRRR:HH24:MI:SS’; select SAMPLE_TIME, SESSION_ID, SESSION_SERIAL#, USER_ID, sql_ID, Machine, program, SQL_EXEC_STARTfrom gv$active_session_historywhere session_id = &v_session_idand sample_time > sysdate – 1/24order by sample_time/

Oracle, SQL scripts

How to connect to Oracle Database with Wallet with Python.

Posted on 21-Mar-2025 By Admin No Comments on How to connect to Oracle Database with Wallet with Python.

To connect Python to Oracle Database using an Oracle Wallet, you can use the cx_Oracle or oracledb library with Oracle Client libraries (like Oracle Instant Client). Oracle Wallet simplifies secure connections by storing credentials and SSL certificates. ✅ Steps to Connect Python to Oracle using Oracle Wallet Step 1: Install Required Python Package Step 2:…

Read More “How to connect to Oracle Database with Wallet with Python.” »

Oracle, Python/PySpark

JSON/XML Types in Oracle

Posted on 18-Mar-202518-Mar-2025 By Admin No Comments on JSON/XML Types in Oracle

Handling JSON and XML Data in Oracle Oracle provides built-in support for JSON and XML data storage, querying, and manipulation. Below are methods to handle both data types efficiently. 1. Handling JSON Data in Oracle A. Storing JSON Data Example: Creating a Table with JSON Column B. Inserting JSON Data C. Querying JSON Data 1….

Read More “JSON/XML Types in Oracle” »

Oracle

CPU Core related projections

Posted on 12-Mar-202512-Mar-2025 By Admin No Comments on CPU Core related projections

Rule of Thumb for Estimating Concurrent DB Connections on a 24-Core Machine (Single Thread Each) The number of concurrent database connections a 24-core machine can handle depends on various factors, including: Hypothetical Calculation Based on CPU A single-threaded, single-core system can typically handle 2-10 concurrent active queries (depending on execution time and parallelism). For a…

Read More “CPU Core related projections” »

AWS, Azure, Linux/Unix, Oracle

Exadata Basics

Posted on 10-Dec-202410-Dec-2024 By Admin No Comments on Exadata Basics

In an Oracle Exadata environment, cell node storage disks are presented to compute nodes as ASM disks, and this mapping occurs through the Oracle ASM (Automatic Storage Management) and Exadata Storage Server software (CellCLI). Here’s a detailed explanation of how the cell node storage disks are mapped to the compute nodes: 1. Cell Node Storage:…

Read More “Exadata Basics” »

Oracle

Reading config file from other folder inside class

Posted on 24-Sep-2024 By Admin No Comments on Reading config file from other folder inside class

Directory Structure: root-folder/ config-folder/ json-file.config class-folder/ classfile.py tests/ pytest-file1.py json-file.config: { “setting1”: “value1”, “setting2”: “value2” } Now, Here I need to access json-file.config in my class file. I do not want to use dbutil, how can i access it and read it from json-file.config in my class file?? classfile.py import os import json class myclass:…

Read More “Reading config file from other folder inside class” »

Python/PySpark

Python class import from different folders

Posted on 22-Sep-202422-Sep-2024 By Admin No Comments on Python class import from different folders

I have following directory structure.  root-folder – config-folder  json-file.config – class-folder  classfile.py – tests pytest-file1.py Now, I need to use a class named myclass from classfile.py in my test/pytestfile1.py. How can I import that class in my pytest file?? To import the myclass from classfile.py into your pytest-file1.py, you can use a relative import assuming…

Read More “Python class import from different folders” »

Python/PySpark

Transfer SQL Profiles from One database to other database.

Posted on 05-Sep-2024 By Admin No Comments on Transfer SQL Profiles from One database to other database.

In this guide, I’ll walk you through moving SQL profiles using a staging table. SQL profiles help databases optimize query execution plans. Step#1 Create the Staging Table First, create a staging table to hold SQL profiles that need to be transferred. SQL> exec DBMS_SQLTUNE.CREATE_STGTAB_SQLPROF(table_name => ‘SQL_STG_TAB’, schema_name => ‘SYS’); This will create a table SQL_STG_TAB…

Read More “Transfer SQL Profiles from One database to other database.” »

Oracle, shell, SQL scripts

Load testing on Oracle 19C RAC with HammerDB

Posted on 18-Jan-202418-Jan-2024 By Admin No Comments on Load testing on Oracle 19C RAC with HammerDB

When dealing with Oracle 19c Real Application Clusters (RAC), the process of capturing a workload from a source Oracle 19c RAC database and replaying it on a target Oracle 19c RAC database using HammerDB involves some additional considerations. Below are the revised steps: Capture and Replay Workload from Source to Target Oracle 19c RAC Download…

Read More “Load testing on Oracle 19C RAC with HammerDB” »

Oracle

Add new columns in dataframe

Posted on 30-Sep-202301-Oct-2023 By Admin No Comments on Add new columns in dataframe

from pyspark.sql.functions import col, lit# File location and typefile_location = “/FileStore/tables/sales_data_part1.csv”file_type = “csv”# CSV optionsinfer_schema = “false”first_row_is_header = “true”delimiter = “,”# The applied options are for CSV files. For other file types, these will # be ignored.df = spark.read.format(file_type) .option(“inferSchema”, infer_schema) .option(“header”, first_row_is_header) .option(“sep”, delimiter) .load(file_location)display(df)# Adding new column with and with default values. #…

Read More “Add new columns in dataframe” »

Python/PySpark

Posts pagination

1 2 … 56 Next

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (387)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (336)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024
  • Add new columns in dataframe30-Sep-2023

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • PHP code to add WordPress posts in bulk programmatically PHP/MYSQL/Wordpress
  • Jai Shree Ram Oracle
  • chk_space_SID.ksh Linux/Unix
  • Find all users who have DML privileges Oracle
  • Another export with Query Oracle
  • online_bkup.sql Oracle
  • DBMS_Shared_pool pinning triggers Oracle
  • Vivek’s egrep commands to trace problem. (on linux x86-64) Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme