Oracle 19 Error on docker run with data volume mounted - oracle

I have build an Oracle Database 19 docker image (tagged as oracle:19) as described in the oracle official documentation
https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance.
Then I run it using a docker-compose among other services :
oracle:
image: oracle:19
ports:
- "1521:1521"
- "5500:5500"
environment:
ORACLE_SID: MY_SID
ORACLE_PWD: MY_STRONG_PASSWORD
ORACLE_EDITION: ee
ORACLE_PDB: MY_SERVICE_NAME
volumes:
- .\ora19data:/opt/oracle/oradata
The database started well, then I created my schema, tablespaces, tables ... etc then I did some test inserts.
When I shut down the database and start it again, I get this beautiful error :
oracle-19_1 | SQL> ORACLE instance started.
oracle-19_1 |
oracle-19_1 | Total System Global Area 1610610568 bytes
oracle-19_1 | Fixed Size 9136008 bytes
oracle-19_1 | Variable Size 486539264 bytes
oracle-19_1 | Database Buffers 1107296256 bytes
oracle-19_1 | Redo Buffers 7639040 bytes
oracle-19_1 | Database mounted.
oracle-19_1 | ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
oracle-19_1 | ORA-01110: data file 13: '/home/oracle/d_XXX01_01.dbf'
oracle-19_1 |
oracle-19_1 |
oracle-19_1 | SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
oracle-19_1 | Version 19.3.0.0.0
oracle-19_1 | The Oracle base remains unchanged with value /opt/oracle
oracle-19_1 | #####################################
oracle-19_1 | ########### E R R O R ###############
oracle-19_1 | DATABASE SETUP WAS NOT SUCCESSFUL!
oracle-19_1 | Please check output for further info!
oracle-19_1 | ########### E R R O R ###############
oracle-19_1 | #####################################
oracle-19_1 | The following output is now a tail of the alert.log:
oracle-19_1 | Linux-x86_64 Error: 2: No such file or directory
oracle-19_1 | Additional information: 7
oracle-19_1 | 2021-03-21T20:38:52.212817+00:00
oracle-19_1 | Errors in file /opt/oracle/diag/rdbms/XXX/trace/XXXXXX_mz00_121.trc:
oracle-19_1 | ORA-01110: data file 14: '/home/oracle/i_XXX01_01.dbf'
oracle-19_1 | ORA-01565: error in identifying file '/home/oracle/i_XXX01_01.dbf'
oracle-19_1 | ORA-27037: unable to obtain file status
oracle-19_1 | Linux-x86_64 Error: 2: No such file or directory
oracle-19_1 | Additional information: 7
oracle-19_1 | Checker run found 2 new persistent data failures
Already tried to google errors and the 5 ORA-XXX, but in vain !

Related

LXD: The "default" storage pool doesn't exist

I am getting the following error while I am trying to edit default lxc profile:
The "default" storage pool doesn't exist
/snap/bin/lxd init
or
lxd init
solved the issue, but select yes for following:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Then you can confirm with the following command and the output:
/snap/bin/lxc storage list
+---------+-------------+--------+--------------------------------------------+---------+
| NAME | DESCRIPTION | DRIVER | SOURCE | USED BY |
+---------+-------------+--------+--------------------------------------------+---------+
| default | | zfs | /var/snap/lxd/common/lxd/disks/default.img | 1 |
+---------+-------------+--------+--------------------------------------------+---------+
Following this document will help.

Windows directory juction: no files are copied via network access

I have a problem with file storage organization.
There is a network of Windows 7 and Windows XP computers. One of them is a file storage server.
Software packs are located on the storage server. Each software pack includes
1. active folder;
1. some folders for each program.
(see the structure example below)
Active folder is a structure of the actual program's versions, must allow to copy all the software in their actual versions avoiding file's duplicating via direct copying. Also fast switching of actual version is needed.
Program folders contain folders for each program's version.
I tried to solve the task via windows directory junction. I created the links via Far Manager 3, command Alt+F6, type directory junction.
Desired structure example
+---active % 389 MB, desired package of actual software
| +---notepad++ % directory junction
| | \---7.3.1
| | npp.7.3.1.Installer.exe
| | npp.7.3.1.Installer.x64.exe
| |
| +---octave % directory junction
| | \---4.2.1
| | octave-4.2.1-w32-installer.exe
| | octave-4.2.1-w64-installer.exe
| |
| \---texstudio % directory junction
| \---2.12.4
| texstudio-2.12.4-win-qt5.6.2.exe
|
+---notepad++
| +---6.8.8
| | npp.6.8.8.Installer.exe
| |
| \---7.3.1 % actual version
| npp.7.3.1.Installer.exe
| npp.7.3.1.Installer.x64.exe
|
+---octave
| +---4.2.0
| | octave-4.2.0-w32-installer.exe
| | octave-4.2.0-w64-installer.exe
| | octave-4.2.0-w64.zip
| |
| \---4.2.1 % actual version
| octave-4.2.1-w32-installer.exe
| octave-4.2.1-w64-installer.exe
|
\---texstudio
+---2.11.0
| texstudio-2.11.0-win-qt5.5.1.exe
|
+---2.12.0
| texstudio-2.12.0-win-qt5.6.2.exe
|
+---2.12.2
| texstudio-2.12.2-win-qt5.6.2.exe
|
\---2.12.4 % actual version
texstudio-2.12.4-win-qt5.6.2.exe
Local usage
Local means I operate on the storage server's Windows GUI.
If to copy active folder to another server's folder observed result is the same as desired:
TEST_COPY
\---active % 389 MB, all the files are copied
+---notepad++
| \---7.3.1
| npp.7.3.1.Installer.exe
| npp.7.3.1.Installer.x64.exe
|
+---octave
| \---4.2.1
| octave-4.2.1-w32-installer.exe
| octave-4.2.1-w64-installer.exe
|
\---texstudio
\---2.12.4
texstudio-2.12.4-win-qt5.6.2.exe
Network file access
If to access to the storage server's active folder via network sharing and copy it the desired result does not happen.
Of course, tree /A /F command shows the same structure of the copied tree, but active is 0 MB size and child folders notepad++, octave, texstudio are also zero-sized and empty.
TEST_COPY
\---active % 0 MB, no any files, only subfolders
+---notepad++
| \---7.3.1
|
+---octave
| \---4.2.1
|
\---texstudio
\---2.12.4
Only if try to copy directly directory junctions subfolders inside active folder (7.3.1, 4.2.1, 2.12.4) the content will be copied as desired. But every user wants to copy active folder, not its second level childs.
BTW. Sometimes when trying to copy an error occurred: file/folder already exists, and copy process was broken unexpectedly.
May be links are set up wrong or there are other methods to reach the desired result.

ERROR 1064 (42000) at line 38: check the manual that corresponds to your MySQL server version for the right syntax to use near '//

I am trying to run a mysql script on centos. I have following mysql installed.
mysql> SHOW VARIABLES LIKE "%version%";
+-------------------------+------------------------------------------------------+
| Variable_name | Value |
+-------------------------+------------------------------------------------------+
| innodb_version | 5.6.25-73.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.6.25-73.1 |
| version_comment | Percona Server (GPL) |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+------------------------------------------------------+
My sample script looks like:
DELIMITER //
DROP TRIGGER IF EXISTS trg_table1_category_insert;
DROP TRIGGER IF EXISTS trg_table1_category_update;
CREATE TRIGGER trg_table1_category_insert
AFTER INSERT
ON
table1_category
FOR EACH ROW
BEGIN
insert into table1_category_history (
table1_category_history_id,
table1_id,
transaction_start_date
) values (
new.table1_category_id,
new.table1_id,
new.create_date
);
END;
//
CREATE TRIGGER trg_table1_category_update AFTER UPDATE on table1_category FOR EACH ROW
BEGIN
insert into table1_category_history (
table1_category_history_id,
table1_id,
transaction_start_date
) values (
new.table1_category_id,
new.table1_id,
new.create_date
);
END;
//
DELIMITER ;
My database utilizes utf8 encoding. While importing this file in database on mysql client it keeps throwing
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '//
CREATE TRIGGER trg_table1_category_update AFTER UPDATE on ta' at line 1
I do not see any syntax error while using the delimiter, also it works on some machines absolutely fine, i have googled almost 100s of links and tried all the ways with downgrading/upgrading mysql server/client , my.cnf, charset etc it is not helping me out. Can anyone please help me on this? Can there be any settings done at client level to interpret it correctly.I am using the same version client that comes with mysql server installation.

How to repair or ignore corrupted blocks in oracle in noarchivelog mode

I have a table with partitioned by date. Today when I run query for entire month I get following error:
SQL Error [1578] [72000]: ORA-01578: ORACLE data block corrupted (file # 10, block # 19007437)
ORA-01110: data file 10: '\UDR''
unfortunately all this long the database was in no archive log mode as now I know. So further investigating I found out that this block is in partition 9 of the table which holds 9th of Feb data.
So how can I recover from this issue? I try to to validate the blocks from rman and then try to recover it, but I get message that there is no back up for that since my db was in no archivelog mode
any help to either ignore it while running query or if I drop the data of 9th feb and reload them will that fix the issue?
when I do
select * from v$database_block_corruption
file | block# | blocks | corruption_change# | corruption_type |cond_id
10 | 1 | 19007437| 0 | fractured | 0
when I select the block from dba_extents then I see
segment_name | segment_type | block_id
tablename | partitionname | 19007437

Can't capture Apache Karaf client output

I started Apache Karaf 3.0.0 in server mode using $KARAF_HOME/bin/start in CentOS 6.5. Then I wanted to run several commands using $KARAF_HOME/bin/client and also capture the output of these commands, so as to make sure the commands ran successfully. The output did get spit out on my console but I was never able to redirect it into a file. Seems like Karaf doesn't write anything to the output stream or error stream. I tried the following:
[apache-karaf-3.0.0]$ ./bin/start clean
[apache-karaf-3.0.0]$ ./bin/client "bundle:list"
Logging in as karaf
282 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
START LEVEL 100 , List Threshold: 50
ID | State | Lvl | Version | Name
------------------------------------------------------------------------------------
91 | Active | 80 | 1.8.0 | Commons Codec
92 | Active | 80 | 2.6 | Commons Lang
93 | Active | 80 | 15.0.0 | Guava: Google Core Libraries for Java
[apache-karaf-3.0.0]$ ./bin/client "bundle:list" >& bundleList
[apache-karaf-3.0.0]$ cat bundleList
null
Nothing got written to the file bundleList. Piping the output doesn't seem to help either.
To make Aviv's solution work, simply use a pipe, e.g. "bundle:list | tac -f /tmp/yourfile"
I'm able to capture client output in Karaf version 3.0.2 .
user#hostname:~$ client bundle:list > bundleinfo.txt
This results in following debug info on the console:
2053 [sshd-SshClient[36c8e545]-nio2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at [/0.0.0.0:8101, DSA, xx:xx:xx:xx:xx:xx:xx:c
2:3a:5a:9b:87:ed:e0:b2:6a] presented unverified {} key: {}
..and of course the bundleinfo.txt file with content as expected:
user#hostname:~$ head -5 bundleinfo.txt
START LEVEL 100 , List Threshold: 50
ID | State | Lvl | Version | Name
---------------------------------------------------------------------------------------------
38 | Active | 80 | 3.2.5.RELEASE | Spring Security Core
39 | Active | 80 | 1.0.0.1 | Apache ServiceMix :: Bundles :: javax.inject
For command line, I use "tac" and redirect to a file with -f , in Karaf 3.0.3, try it or learn what it does with --help

Resources