1. Display all tables of a particular user in Oracle
select * from user_segments;2. Display size of all tables of a particular user in Oracle
select sum(bytes)/(1024*1024*1024) from user_segments3. Change String to lowercase in Eclipse
ctrl+Shift+Y4. Change String to uppercase in Eclipse
ctrl+Shift+X5. pg_restore: [archiver] unsupported version (1.12) in file header- Error in PostgreSQL while importing dump file
Solution:convert the binary file into a plan SQL file via the -f parameter.
$ pg_restore --version
pg_restore (PostgreSQL) 9.0.3
$ pg_restore -Fc dump.backup -f dump.sql
Copy dump.sql back to 8.3 server
$ psql database -f dump.sql
6. List all databases in PostgreSQL
\list7. List tables in PostgreSQL
\dt+8. Grant all privileges on a particular database to a user in PostgreSQL
GRANT ALL ON DATABASE databaseName TO user;9. Import a schema in PostgreSQL
psql -h hostName -U userName tabaseName -f backupFile.sql10. Query to see active processes in PostgreSQL
select * from pg_stat_activity;11. find all tables with a specific column name in PostgreSQL
select table_name from information_schema.columns where column_name = 'column_name';12. Create a user in PostgreSQL
CREATE USER userName WITH PASSWORD 'Password';13. Append content to MANIFEST.MF in Eclipse
1) Add the following to the pom.xml<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<archive>
<manifestFile>src/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
2) Create a file named MANIFEST.MF in src and add the content we need to append to MANIFEST.MF
3) Save the pom and check the project/target/classes/META-INF/MANIFEST.MF to see the changed content.
No comments:
Post a Comment