• Link to X
  • Link to LinkedIn
  • Link to Facebook
  • עברית עברית Hebrew he
  • English English English en
Real Time DBA Magic
  • Home
  • Oracle
    • Data Guard
    • Performance
    • SQL Developer and SQLcl
    • Oracle ACE Program
  • Big Data
    • Hadoop
    • Spark
  • Presentations
  • About
    • About Me
    • Contact Me
    • Privacy Policy
    • Non Technical Blog Posts
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

SQL Riddle: Find the Sum of ASCII Codes of Employee Names (solution)

Oracle, Quaries

Zahar Hilkevich (from the blog – https://sqlpatterns.wordpress.com – cool blog, you should check it out) posted a riddle on Facebook.
The question was:

“For every employee find the sum of ASCII codes of all the characters in their names. Write a single SELECT statement only.”

SQL
EMPNO ENAME       SUM_ASCII
----- ---------- ----------
7788 SCOTT             397
7876 ADAMS             358
7566 JONES             383
7499 ALLEN             364
7521 WARD              302
7934 MILLER            453
7902 FORD              299
7369 SMITH             389
7844 TURNER            480
7698 BLAKE             351
7782 CLARK             365
7654 MARTIN            459
7839 KING              297
7900 JAMES             368
Read more →
04/05/2016/1 Comment/by Zohar Elkayam/Estimated Reading Time: 3 Minutes
https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png 0 0 Zohar Elkayam https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png Zohar Elkayam2016-05-04 10:11:372026-11-03 15:49:26SQL Riddle: Find the Sum of ASCII Codes of Employee Names (solution)

My Upcoming Speaker Events

Blog

This is a heads up for some upcoming events I will be appearing on in the next few weeks. I was also accepted (as a standby session) to UKOUG Scotland (which I was at, last year) but unfortunately I will not be able to attend as it collides with some of my other speaking events.

Read more →

02/05/2016/0 Comments/by Zohar Elkayam/Estimated Reading Time: 4 Minutes
https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png 0 0 Zohar Elkayam https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png Zohar Elkayam2016-05-02 10:03:332022-02-22 10:15:54My Upcoming Speaker Events

RMAN no files found to be unknown to the database error

Oracle

Here’s a weird error message for my collection…

I’ve been working with a customer to setup a RMAN backup on his standby database (backup is going to SBT). After a while, we decided that we couldn’t avoid using the RMAN catalog so we created one.
Now, when using the catalog, we can backup the database from either the primary or standby instances and that will register to a shared catalog so we could restore from either database.

Bash
RMAN> LIST DB_UNIQUE_NAME OF DATABASE;

List of Databases
DB Key  DB Name  DB ID            Database Role    Db_unique_name
------- ------- ----------------- ---------------  ------------------
1       ORCL     1415951511       PRIMARY          ORCL
1       ORCL     1415951511       STANDBY          ORCLDG

The thing is, that if we change the DB_UNIQUE_NAME of the backup pieces (using RMAN’s CHANGE command), they will now be “owned” by the wrong database server and the files will not be available when running CROSSCHECK command.

Bash
RMAN> CHANGE BACKUP FOR DB_UNIQUE_NAME orcldg RESET DB_UNIQUE_NAME TO orcl;

change backup piece db_unique_name
backup piece handle=/data/fast_recovery_area/ORCLDG/backupset/2016_05_01/o1_mf_nnndf_TAG20160501T174121_cld5dkrj_.bkp RECID=15 STAMP=910719681
change backup piece db_unique_name
backup piece handle=/data/fast_recovery_area/ORCLDG/autobackup/2016_05_01/o1_mf_s_910715737_cld5dm03_.bkp RECID=16 STAMP=910719682
Changed 2 objects db_unique_name
Read more →
01/05/2016/0 Comments/by Zohar Elkayam/Estimated Reading Time: 6 Minutes
https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png 0 0 Zohar Elkayam https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png Zohar Elkayam2016-05-01 18:37:122026-11-03 15:36:06RMAN no files found to be unknown to the database error

Automatic DB Startup: The Linux Part (OEL 6 and 7)

Oracle

This is part 2 of the automatic startup article. In the previous part, we talked about the basic building blocks for the automatic Oracle database and listener startup. We talked about the orastart and orashut scripts and the /etc/oratab that control which instances are automatically started.

In this part, we will put everything together and see how to configure Linux to use the scripts for automatic start. I will demonstrate two version of Linux here. I used Oracle Enterprise Linux 6 and 7 – which are similar to RedHat Enterprise Linux 6 and 7 (but free). These startup procedures are similar to most of the other distributions including CentOS and Ubuntu.

Read more →
13/03/2016/11 Comments/by Zohar Elkayam/Estimated Reading Time: 10 Minutes
https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png 0 0 Zohar Elkayam https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png Zohar Elkayam2016-03-13 12:04:322026-11-03 15:47:55Automatic DB Startup: The Linux Part (OEL 6 and 7)

Hacking Oracle Data Redaction

Oracle

Last month Oracle ACE Director Oded Raz published an article about Data Redaction. This month, Oded will explain some of the vulnerabilities of data redaction and how to “hack it”. I would like to thank Oded for his contribution and invite him to publish more things in the future.
Zohar

On my last article, I have introduced you the new oracle security feature – Data Redaction, selective, on-the-fly redaction of sensitive data in SQL query results prior to display by applications so that unauthorized users cannot view the sensitive data. Although I welcome this feature and think it’s a much-needed addition to Oracle database security features it has some limitations that you need to be aware of before using it to protect sensitive data.

Read more →
13/03/2016/4 Comments/by Oded Raz/Estimated Reading Time: 3 Minutes
https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png 0 0 Oded Raz https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png Oded Raz2016-03-13 10:35:552026-11-03 15:48:01Hacking Oracle Data Redaction

Automatic Startup for Oracle on Linux

Oracle

A few years back, I worked with a junior DBA who was asked to create a new instance on a brand new machine. He created the instance using DBCA and everything went smoothly – or so he thought. A few weeks later, after the system became production, a planned maintenance rebooted that Linux server, and once the machine came back up – the database and listener processes were nowhere to be found.

So that junior DBA, stressed because he thought the database was lost called me in the middle of the night. My first sleepy question for him was “did you even start the database?” and his panicked reply was “of course not – it should be done automatically, I used DBCA!”…

Well, one of the things new DBA’s find hard to realize is that after installing and creating a database (even if we’re using DBCA), it will not start automatically. I’ve seen too many new DBA’s being puzzled by the logic behind automatic startup of Oracle databases on Linux (and UNIX in general) than I care to admit so I decided to put it here for their reference…

In this article I will describe the building blocks for automatic startup, and in my next post I will show the Linux commands needed to put everything together.

Read more →
07/03/2016/1 Comment/by Zohar Elkayam/Estimated Reading Time: 6 Minutes
https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png 0 0 Zohar Elkayam https://www.realdbamagic.com/wp-content/uploads/2026/10/real-dba-magic-logo-1200w.png Zohar Elkayam2016-03-07 18:03:172026-11-03 15:48:11Automatic Startup for Oracle on Linux
Page 6 of 11«‹45678›»

  • English
    • עברית (Hebrew)

Subscribe

Enter your email address to subscribe to the blog, and never miss a post again!

Popular
  • spark plug
    Spark SQL and Oracle Database Integration03/07/2016 - 18:52
  • Automatic DB Startup: The Linux Part (OEL 6 and 7)13/03/2016 - 12:04
  • Moving a 3TB Database Datafiles With Only 2 Minute Down...02/09/2015 - 09:58
  • Installing Oracle 12.1.0.2 – Part 2: Creating an Inst...30/11/2014 - 10:37
Recent
  • Running High Scale Low Latency Database with Zero Data In...22/02/2022 - 19:36
  • Oracle Week 2017: Docker Concepts for Oracle/MySQL DBAs...28/11/2017 - 14:58
  • Closing Dataguard Transfer and Apply Gaps27/04/2017 - 13:13
  • Error ORA-14766: Unable To Obtain A Stable Metadata Sna...14/02/2017 - 14:50
Comments
  • emaplease help how to create fuction in detail step by st...04/03/2024 - 07:34 by ema
  • akshayvazeSuch a very useful blog. Very interesting to read this blog....14/08/2023 - 13:45 by akshayvaze
  • HemantHi, Nice Post, I am using RANDOM policy and want to restrict...14/04/2021 - 09:50 by Hemant
  • rehanwas it complete recovery in the end ?20/02/2021 - 23:57 by rehan
Tags
11gr2 12.1.0.2 12c aced analytic functions apache spark backup Big data dataguard data redaction DBIM devops doag2016 docker expdp glossophobia Hadoop howto impdp joke mysql NoSQL oow oow16 Oracle Oracle 12c Oracle 12c new features Oracle in memory option oracle sharding oug_scot performance personal PL/SQL presentations public speaking rac rman script security slides spark sql SQL sqlcl ThanksOTN user groups
© Copyright - Zohar Elkayam, Real DBA Magic, 2010-2022
  • Link to X
  • Link to LinkedIn
  • Link to Facebook
  • Home
  • Oracle
  • Big Data
  • Presentations
  • About
Scroll to top Scroll to top Scroll to top
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}