AWS Cloud DBA/Database Interview Questions - Part 1
Q1. What are the advantages of cloud computing?
Q2. What is the database storage in AWS cloud? where are the RDS instance datafiles stored?
answer:
Q3. What database metrics will you be monitoring?
answer:
Q4. How will you check database performance issues/bottlenecks in AWS console?
answer:
Q5. Which EC2 instance type/class is the best for databases?
answer:
Q6. How to enforce the security of RDS instances?
answer:
Q7. How to encrypt data-at-rest in the cloud?
answer:
Q8. How to encrypt data-in-transit / data-in-motion in the cloud?
answer:
Q9. What is the difference/advantages between RDS instance and database running on EC2?
answer:
Q10. What is the difference between "General purpose" and "Provisioned IOPS" storage?
answer:
Q11. What is the advantage of Multi-AZ instance in AWS?
answer:
Q12. How do we export and import data/snapshots from production to non-production environments in different AWS accounts?
answer:
Q13. Please explain the main differences between RDS MySQL and AWS Aurora?
answer:
Q14. What are the main differences between RDS PostgreSQL and Amazon Aurora?
answer:
answer:
Q16. How to setup logical replication between two AWS Aurora Postgres clusters?
answer:
answer:
Q18. How will you update the database parameter value of (Oracle) RDS instance?
answer:
Q19.
answer:
Q20.
answer:
automatic datafile movement
ReplyDelete-- Define variables
SET SERVEROUTPUT ON
DECLARE
v_target_disk_group VARCHAR2(30) := '+DATA'; -- Change this to your target disk group
v_counter NUMBER := 0;
BEGIN
-- Loop through the top 20 largest datafiles in the +RECO disk group
FOR file_rec IN (
SELECT FILE_NAME
FROM (
SELECT FILE_NAME
FROM DBA_DATA_FILES
WHERE UPPER(FILE_NAME) LIKE '+RECO%'
ORDER BY BYTES DESC
)
WHERE ROWNUM <= 20
) LOOP
-- Generate the SQL command to move the datafile
EXECUTE IMMEDIATE 'ALTER DATABASE MOVE DATAFILE ''' || file_rec.FILE_NAME || ''' TO ' || v_target_disk_group;
-- Increment the counter
v_counter := v_counter + 1;
END LOOP;
-- Confirm the move operation
DBMS_OUTPUT.PUT_LINE('Moved ' || v_counter || ' datafiles successfully to ' || v_target_disk_group || ' disk group.');
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('Error: No datafiles found in +RECO disk group.');
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Error: ' || SQLERRM);
END;
/