SELECT
tablespace_name,
ROUND(SUM(bytes) / 1024 / 1024, 2) AS total_mb,
ROUND(SUM(free_bytes) / 1024 / 1024, 2) AS free_mb
FROM
v$temp_space_header
GROUP BY
tablespace_name;
SELECT
s.username,
s.sid,
s.serial#,
SUM(t.bytes) / 1024 / 1024 AS used_mb
FROM
v$session s
JOIN
v$temp_space_header t
ON
s.saddr = t.session_addr
GROUP BY
s.username,
s.sid,
s.serial#;
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>2.10.0</version>
</dependency>
import net.lingala.zip4j.ZipFile;
import net.lingala.zip4j.exception.ZipException;
import java.io.File;
public class Dunzip {
public static void main(String[] args) {
if (args.length != 3) {
System.out.println("Usage: java -jar Dunzip.jar <zip-file> <output-directory> <password>");
return;
}
String zipFilePath = args[0];
String outputDirectoryPath = args[1];
String password = args[2];
try {
unzip(zipFilePath, outputDirectoryPath, password);
System.out.println("Unzipping completed successfully.");
} catch (ZipException e) {
System.err.println("Error occurred during unzipping: " + e.getMessage());
e.printStackTrace();
}
}
public static void unzip(String zipFilePath, String outputDirectoryPath, String password) throws ZipException {
ZipFile zipFile = new ZipFile(zipFilePath);
if (zipFile.isEncrypted()) {
zipFile.setPassword(password.toCharArray());
}
zipFile.extractAll(outputDirectoryPath);
}
}