Showing posts with label 19c. Show all posts
Showing posts with label 19c. Show all posts

Wednesday, August 26, 2020

Password Less; Schema Only Accounts

Password Less; Schema Only Accounts 

Schema Only Accounts Overview

Oracle Database 18c introduced new feature called "Schema Only Accounts". It means that there is no password authentication on schemas.
This new functionality allows administrators to secure their databases and protect their applications.
Since schemas have no password, one cannot connect directly to the database (this is the whole purpose of the schema only account).

The only way is, connect through a proxy account.
As one cannot connect directly to the schema only accounts, the schema itself is more Secure. In other words, you don’t want application users to connect directly with the schema account.


Why and When to use?

Generally, schema is created with password and credentials might shared with different stack holders or application users.

To avoid direct usage of schema and password, Proxy user can be created but still one can login to schema if someone knows the password.

So, how to avoid miss use of schema password? 
Solution is, Schema Only Accounts (in other words password less).

Since there is no password for schemas, no direct connection is allowed. And also no password management is required like password expiry or password rotation.

This feature reduces the security risk of attackers using default/regular passwords to hack into these accounts.

Configure Password less Schema Only Accounts

Following is example show that mobileapp schema not required and authentication to login. One cannot directly login to this schema as there is no password but User cbtadmin has given grants to access objects from mobileapp schema using proxy authentication. 

Create Schema without password.

Syntax
CREATE USER <schema_name> NO AUTHENTICATION QUOTA UNLIMITED ON users;
  
GRANT CREATE SESSION, CREATE TABLE, CREATE SEQUENCE, CREATE VIEW TO <schema_name>;

Example
CREATE USER mobileapp NO AUTHENTICATION QUOTA UNLIMITED ON users;
  
GRANT CREATE SESSION, CREATE TABLE, CREATE SEQUENCE, CREATE VIEW TO mobileapp;


Allow application user to connect to Schema

Syntax
ALTER USER schema_owner GRANT CONNECT THROUGH <application user>;

Example
ALTER USER mobileapp GRANT CONNECT THROUGH cbtadmin;


How application user can connect to schema

Syntax
sql> conn <application user>[schema name]/password@pdb1

Example
sql> conn cbtadmin[mobileapp]/cbtadmin@pdb1




Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert

Wednesday, June 24, 2020

ServiceAliasException: Could not initialize Service Alias: TNS-04404: no error

ServiceAliasException: Could not initialize Service Alias: TNS-04404: no error


I was getting this TNS error while creating Listner with "netca", here is the screenshot for the same.


D:\app\db193\bin>netca

Oracle Net Services Configuration:
Configuring Listener:LISTENERCBT
ServiceAliasException: Could not initialize Service Alias: TNS-04404: no error
  caused by: oracle.net.config.ConfigException: TNS-04414: File error
  caused by: TNS-04605: Invalid syntax error: Unexpected char or LITERAL "IEPDB1" before or at  IEPDB1 = (
  Error in file D:\TNS_ADMIN\tnsnames.ora


This is my windows machine and creating new listner for my newly created CDB. DB version is 19.3

As above error shows that I have some issue with my tnsnames.ora with some of my TNS Entry with IEPDB1.

In my environment TNS_ADMIN environment variable is set and it is pointing to my D:\TNS_ADMIN\tnsnames.ora

Here I found some junk characters near IEPDB1 TNS entry, I removed it and save the file and ran netca again...
Now, all went good...It solved my problem .




Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert
 

DBCA fails with errors: [FATAL] [DBT-50000] Unable to check for available memory

DBCA fails with errors: [FATAL] [DBT-50000] Unable to check for available memory


Recently I have installed Oracle 19c Database binary to windows machine. And after that I started DBCA to create database.

In "Configuration options" steps I got memory error. i.e. [DBT-50000] Unable to check for available memory
Earlier I selected 6GB for my SGA but after this error I had selected 1GB only. But still was facing this issue.

Here is the screenshot for the same.



After searching oracle docs for known issue, I found, it's a bug. One can find details about this bug on following oracle notes.

DBCA fails with errors: [FATAL] [DBT-50000] Unable to check for available memory in "Specify configuration option" (Doc ID 2631718.1)

Workaround for this issue is,

Run dbca with "-J-Doracle.assistants.dbca.validate.ConfigurationParams=false" like a bellow command,

$> dbca -J-Doracle.assistants.dbca.validate.ConfigurationParams=false

This will solve your issue and DBCA will run smooth, no issues thn.





Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert
 
 

Tuesday, February 18, 2020

Oracle Database New Features (12c to 19c)

Oracle Database New Features (12c to 19c)


From Oracle database 12c on-wards, whole architecture was changed. And it comes with many new features. Oracle also changed the policy of releasing database patches and version. Now we are seeing new version every year from 2018 on-wards, i.e. 18c in the year of 2018, 19, in the year of 2019 and now very soon 20c is coming this year.

Here I am highlighting Oracle database new features which was introduce in different Oracle database versions. My focus is to highlight most important features from version 12c onwards up to 19c.

This will help you to understand which feature we can use in which version.


Category
DB Versions
12.1
12.2
18c
19c





High Availability
Comprehensive HA and disaster recovery functionality
Sharding
Sharded RAC
Data Guard DML Redirect
Oracle Golden Gate for heterogeneous replication
Autonomous Health Framework
User-defined Sharding Methods
Sharding: Supports multiple PDB shards in a CDB
Unique sequence number generation per shard



Zero Downtime Grid Infrastructure Patching



PDB Recovery Catalog



Improvements to Application Continuity




Category
DB Versions
12.1
12.2
18c
19c





Performance and Salability
In-Memory Column Store
In Memory JSON Queries
Memory Optimized Row Store
Fast ingest support for IoT type workloads
Engineered Systems
In Memory Active Standby
New Approximate Functions
Quarantine for SQL Statements
Optimizer Adaptive Feature
Optimizer Adaptive Feature

Stats Only Queries
Approximate Query Processing
New Approximate Functions

Improvements for COUNT DISTINCT and GROUP BY queries

Optimizer Statistics Advisor

Automatic Indexing



Realtime Statistics



Automatic Resolution of SQL Plan Regressions



Category
DB Versions
12.1
12.2
18c
19c





Multitenant
Container managed database virtualization
Online cloning & relocation
Transportable backups
DBCA Silent mode operations for PDB
Manage Many as one
Incremental refresh of test/dev master
Snapshot carousel
RAT and ADDM at PDB level
Patching, Backup, Security, Online Cloning, Online Relocation
Application containers
Refreshable PDB switchover
Automated PDB Relocation



Category
DB Versions
12.1
12.2
18c
19c





Security
Security In-Depth
Access Controls, Encryption, Redaction, Masking, Auditing, SQL Firewalls Key Vault
Online encryption
Integration with Active Directory
Data Dictionary Encryption
Audit Vault Database Firewall

Password-less schema creation
Password-less Schema-only Oracle accounts
Security Assessment Tool


Database Vault Operations Control



Privilege Analysis available in EE



Category
DB Versions
12.1
12.2
18c
19c





Application 
Development
Application Express 5.1
Long Identifiers
Improved JSON Support
SQL JSON Enhancements
Comprehensive Language support
PL/SQL, SQL , Python, Node.js, PHP, Java, C, .NET, REST
JSON
Case Insensitive Databases
C, Python, JavaScript JSON SODA API
Materialized View for JSON_TABLE


Private Temporary Tables
Partial JSON Update support



Realtime SQL Monitoring for Developers



Category
DB Versions
12.1
12.2
18c
19c





Data Warehousing and Big Data
Partitioning, Compression, SQL, Analytical Views, Analytical SQL, Data Mining
Partitioned External Tables
In-Memory for external tables
Hybrid Partitioned Tables
Easily analyze data held in Hadoop with Big Data SQL
Analytical Views
Automatic propagation of nologged data to standby
Stats only Queries
Big Data Appliance

Machine Learning :
Random Forrest, Neural Network




Category
DB Versions
12.1
12.2
18c
19c





Other 
Improvements



EZConnect Improvements



Oracle Database XE
Free to use
Includes most EE features
no RAC, Data Guard, GoldenGate



Oracle Database 19c RPM Install, Yum install of Oracle Instant Clients



Oracle Read Only Homes



No click through client software install



Oracle Docker images



SQLDeveloper Web



Oracle Data REST Services (ORDS)










Thanks & Regards,
Chandan Tanwani
Oracle Performance Tuning Certified Expert