Month: December 2021

Oracle 11gR2 and 12c etc. – Create a script that will help recreate a controlfile – using: alter database backup controlfile to trace;

The “alter database backup controlfile to trace;” will create a text based file – human readable – that contains the steps necessary to recreate an Oracle controlfile for a specific database (the database you were connected to when you issue the alter command). See Oracle’s documentation on how to use this file. It actually has …

Oracle 11gR2 and 12c etc. – Create a script that will help recreate a controlfile – using: alter database backup controlfile to trace; Read More »

How do you know that a table in Snowflake might benefit from a Cluster Key and how to define them

1.) When a table is very large 2.) When querys degrade over time You do NOT have to define Snowflake a cluster key on a table, Snowflake will automatically tune querys against tables without a cluster key. A cluster keys component fields – there can be more than one field in a cluster key – …

How do you know that a table in Snowflake might benefit from a Cluster Key and how to define them Read More »

RMAN Recovery Manager Basics

The following link to Oracle-Base provides basic instruction on backups, restore and recover operations. While it applies to 9i and version newer, it is a very good reference. https://oracle-base.com/articles/9i/recovery-manager-9i

Quiescing An Linux Server Running An Oracle or Postgres Database When Taking A VMWare Snapshot Of The VM

Some time ago some of my colleagues started doing VMWare Snapshots (backups) of our Linux server that was running an Oracle database without mentioning it to me (I work part-time for them supporting important Oracle instances). Almost immediately I got a call saying Oracles was down, asking me to take a look at it. They …

Quiescing An Linux Server Running An Oracle or Postgres Database When Taking A VMWare Snapshot Of The VM Read More »

Snowflake: Warehouse Credit Usage Querys

All of the information below can be obtained from: https://docs.snowflake.com/en/sql-reference/account-usage.html Prerequisites: Requires AccountAdmin role to access account_usage schema. use database snowflake; use schema account_usage; Credits used by each warehouse in your account (month-to-date): select warehouse_name, sum(credits_used) as total_credits_used from warehouse_metering_history where start_time >= date_trunc(month, current_date) group by 1 order by 2 desc; Credits used over …

Snowflake: Warehouse Credit Usage Querys Read More »

Snowflake Table Function to Show Copy History Into Specific Tables

Snowflake provides this table function to query the history of copy commands into specific tables. This function is quite valuable, show all copies into the specified table whether they were manual copies, or automated copies via snowpipe. select * from table(information_schema.copy_history(table_name=>’MYTABLE’, start_time=> dateadd(hours, -1, current_timestamp()))); I should add, it is well documented by Snowflake at …

Snowflake Table Function to Show Copy History Into Specific Tables Read More »