Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • SQL_PLAN.sql for checking real execution plan Oracle
  • Oracle 11g Training on 29JAN1010 Oracle
  • Renaming Oracle Instance Name Oracle
  • Database link password in user_db_links Oracle
  • Changing default shell Linux/Unix
  • export import with parameter file. Oracle
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • oracle 10g on linux Linux/Unix
  • find_cons.sql Oracle
  • Specify the Rollback segment to use in Transaction Oracle
  • Mutating Table Error while using database trigger Oracle
  • RAC with RHEL4 and 11g Oracle
  • pvm_pre_change.sql Oracle
  • All About Trace Fils Oracle
  • Find_stale_dr.sql finding stale physical DR.. 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

Getting started with notebook

Posted on 30-Sep-202330-Sep-2023 By Admin No Comments on Getting started with notebook

# Databricks notebook source   %sqlcreate database if not exists abcdb   %sqluse abcdb   %sqlcreate table student (id int , name string)   %sqlinsert into studentselect 1 as id, ‘user1’ as name   %sqlselect * from student   spark.sql(“create database if not exists xyzdb”)spark.sql(“use xyzdb”)   # Use three double quotes (“””) if SQL…

Read More “Getting started with notebook” »

Python/PySpark

Read CSV file using PySpark

Posted on 30-Sep-202330-Sep-2023 By Admin No Comments on Read CSV file using PySpark

from pyspark.sql.functions import col   # File location and type file_location = “/FileStore/tables/sales_data_part1.csv” file_type = “csv” # CSV options infer_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”,…

Read More “Read CSV file using PySpark” »

Python/PySpark

Read CSV File using Python

Posted on 30-Sep-202330-Sep-2023 By Admin No Comments on Read CSV File using Python

# Databricks notebook source import pandas as pd # preapre dataframe df_h=pd.read_csv(“https://people.sc.fsu.edu/~jburkardt/data/csv/zillow.csv”) #Print dataframe df_h #define custom columns columns = [“Srno”, “SQFT”, “BR”, “Baths”, “Zipcode”, “YearBuilt”, “ListPrice”] df_h=pd.read_csv(“https://people.sc.fsu.edu/~jburkardt/data/csv/zillow.csv”, header=None, names=columns) #Print dataframe df_h # show top 10 rows df_h.head(10) # show last 10 rows df_h.tail(10) #Print dataframe df_h #Drop non-needed columns, column names are case…

Read More “Read CSV File using Python” »

Python/PySpark

Creating never expiring DB user accounts in Oracle

Posted on 14-Sep-202314-Sep-2023 By Admin No Comments on Creating never expiring DB user accounts in Oracle

DB Users are required to reset the password periodically for better security. For some service accounts,  we need to make sure the password does not expire and does not impact the application. For this purpose, we need to update that user’s Profile. Each Profile has multiple security settings that controls Password_life_time, password_reuse_time, password_reuse_max  settings. These…

Read More “Creating never expiring DB user accounts in Oracle” »

Oracle, SQL scripts

Posts pagination

Previous 1 2 3 4 … 57 Next

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • telnet listening Linux/Unix
  • Find sort details from Db find_sort.sql Oracle
  • Renaming Global Name GLOBAL_NAME Oracle
  • Processes Parameter decision Oracle
  • TNSNAMES entries details Oracle
  • Finding Oracle Patches with opatch Oracle
  • arch_configUOCIOTTO.ora Oracle
  • My Test Case On 21-OCT-2005 Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme