Showing posts with label full. Show all posts
Showing posts with label full. Show all posts

Saturday, 10 September 2022

Full Outer Join

 




--------------------------------------------------------------------------------------

/* The table 1 has 78 rows

   the Business partner table has 45 rows*/



Select * from "<Drop and Drop table 1 from HDI>" as A

Full outer join "<Drop and drop table 2 from HDI>" as B

On A."<Foreign_key name of table A>" = B. "<Foreign_key name of table B>"


----------------------------------------------------------------------------------------

Friday, 14 February 2020

Log volumes are full in HDB

Log Volume is Full and the Database Doesn’t Accept any new Requests
If the log_mode is set to legacy the logvolume keeps all log segments since the last full backup in the logvolume.

If no backups are performed the logvolume can run out of space.

Solution

1. Stop the database:

HDB stop

2. Change into the folder mnt00001 of the logvolume (Default: /usr/sap//global/hdb/log):

cd /usr/sap//global/hdb/log/mnt00001

3. You have to move one of the logvolumes temporarily to another volume where enough space is available.

You should free at least 2 GB of space to ensure that the database has enough space to start.

To find out the space consumption of each volume execute:

du -sh

4. Move a volume which consumes at least 2 GB of space (e.g. hdb00003)

to a volume with enough free space,

e.g. to the data volume (Default: /usr/sap//global/hdb/data):

mv hdb00003 /usr/sap//global/hdb/data

5. Create a symbolic link to the new folder in the old location:

ln -s /usr/sap//global/hdb/data/hdb00003 /usr/sap//global/hdb/log/mnt00001/hdb00003

6. Start the database (HDB start) and perform a backup

7. Use the following SQL-Statement to clean up the logvolume:

ALTER SYSTEM RECLAIM LOG;

8. Stop the database again and remove the symbolic link:

rm -f /usr/sap//global/hdb/log/mnt00001/hdb00003

9. Move the log volume back to its original location:

mv /usr/sap//global/hdb/data/hdb00003 /usr/sap//global/hdb/log/mnt00001

10. Start the database (HDB start)

ref: 1679938 – Log Volume is full (log mode = legacy)