database-administration

How can I list all tables in a database with Squirrel SQL?

跟風遠走 提交于 2019-12-03 04:57:12
I use Squirrel SQL to connect to a JavaDB/Derby database on my desktop. I can run SQL queries. But how can I list all tables in the database? And preferably all column and column types. You can do it easily from the GUI. After you open your session, click the Objects tab, then expand the tree. Expand the db, schema, and then table nodes, and you'll see all of your tables. If you click on a particular table node, a table will open to the right. By clicking the Columns tab, you can get the column names, types, and other meta data. Or are you looking for SQL commands? Sometimes I noticed that

improve speed of mysql import

孤街醉人 提交于 2019-12-03 04:43:19
问题 I have large database of 22GB . I used to take backup with mysqldump command in a gzip format. When i extract the gz file it produces the .sql file of 16.2GB When I try to import the database in my local server, it takes approximately 48hrs to import.Is there a way to increase the speed of the import process? Also i would like to know if any hardware changes need to be done to improve the performance. Current System Config Processor: 4th Gen i5 RAM: 8GB #update my.cnf is as follows # # The

improve speed of mysql import

此生再无相见时 提交于 2019-12-02 17:52:41
I have large database of 22GB . I used to take backup with mysqldump command in a gzip format. When i extract the gz file it produces the .sql file of 16.2GB When I try to import the database in my local server, it takes approximately 48hrs to import.Is there a way to increase the speed of the import process? Also i would like to know if any hardware changes need to be done to improve the performance. Current System Config Processor: 4th Gen i5 RAM: 8GB #update my.cnf is as follows # # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to set

Import dump with SQLFILE parameter not returning the data inside the table

夙愿已清 提交于 2019-12-02 17:50:50
问题 I am trying to import the dump file to .sql file using SQLFILE parameter. I used the command "impdp username/password DIRECTORY=dir DUMPFILE=sample.dmp SQLFILE=sample.sql LOGFILE=sample.log" I expected this to return a sql file with contents inside the table. But it created a sql file with only DDL queries. For export I used, "expdp username/password DIRECTORY=dir DUMPFILE=sample.dmp LOGFILE=sample.log FULL=y" Dump file size is 130 GB. So, I believe the dump has been exported correctly. Am I

How to monitor MySQL space?

不想你离开。 提交于 2019-12-02 17:42:30
I downloaded a VM image of a web application that uses MySQL. How can I monitor its space consumption and know when additional space must be added? I have some great big queries to share: Run this to get the Total MySQL Data and Index Usage By Storage Engine SELECT IFNULL(B.engine,'Total') "Storage Engine", CONCAT(LPAD(REPLACE(FORMAT(B.DSize/POWER(1024,pw),3),',',''),17,' '),' ', SUBSTR(' KMGTP',pw+1,1),'B') "Data Size", CONCAT(LPAD(REPLACE( FORMAT(B.ISize/POWER(1024,pw),3),',',''),17,' '),' ', SUBSTR(' KMGTP',pw+1,1),'B') "Index Size", CONCAT(LPAD(REPLACE( FORMAT(B.TSize/POWER(1024,pw),3),','

lsnrctl start rane when i fireing this command this error comeing

有些话、适合烂在心里 提交于 2019-12-02 13:36:15
[oracle@myserver ~]$ lsnrctl start rane LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-SEP-2016 23:04:58 Copyright (c) 1991, 2009, Oracle. All rights reserved. Starting /oraeng/app/oracle/product/11.2.0/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.1.0 - Production System parameter file is /home/oracle/listener.ora Log messages written to /oraeng/app/oracle/product/11.2.0/log/diag/tnslsnr/myserver/rane/alert/log.xml TNS-01150: The address of the specified listener name is incorrect Listener failed to start. See the error message(s) above... This is my listener

Import dump with SQLFILE parameter not returning the data inside the table

余生颓废 提交于 2019-12-02 12:15:10
I am trying to import the dump file to .sql file using SQLFILE parameter. I used the command "impdp username/password DIRECTORY=dir DUMPFILE=sample.dmp SQLFILE=sample.sql LOGFILE=sample.log" I expected this to return a sql file with contents inside the table. But it created a sql file with only DDL queries. For export I used, "expdp username/password DIRECTORY=dir DUMPFILE=sample.dmp LOGFILE=sample.log FULL=y" Dump file size is 130 GB. So, I believe the dump has been exported correctly. Am I missing something in the import command? Is there any other parameter should I use to get the contents?

Oracle Connection String for RAC Environment?

泄露秘密 提交于 2019-12-02 07:08:02
问题 I have got an ORACLE RAC Environment access .The details are Database Name: orcl Service Name: orcl IP Address: 192.168.1.1 and 192.168.1.2 SQL> host srvctl status database -d orcl Instance orcl1 is running on node orclnode1 Instance orcl2 is running on node orclnode2 My concern is my connection, which is being established using (DESCRIPTION=(ADDRESS= (PROTOCOL=TCP)(HOST=192.168.1.1) (PORT=1521) )(CONNECT_DATA=(SID=orcl1))) But the provider wants it to be connected via the orcl service name .

Oracle Connection String for RAC Environment?

点点圈 提交于 2019-12-02 06:41:24
I have got an ORACLE RAC Environment access .The details are Database Name: orcl Service Name: orcl IP Address: 192.168.1.1 and 192.168.1.2 SQL> host srvctl status database -d orcl Instance orcl1 is running on node orclnode1 Instance orcl2 is running on node orclnode2 My concern is my connection, which is being established using (DESCRIPTION=(ADDRESS= (PROTOCOL=TCP)(HOST=192.168.1.1) (PORT=1521) )(CONNECT_DATA=(SID=orcl1))) But the provider wants it to be connected via the orcl service name . I don`t have any other info related to this. Am I connecting correctly or I need hostname or IP

How do I GRANT ALL PRIVILEGES on ALL VIEWS in one statement?

家住魔仙堡 提交于 2019-12-02 05:19:23
In PostgreSQL 9+, is there a way to GRANT ALL PRIVILEGES on ALL VIEWS in schema schema_name TO role_name in a single statement? The only way to do this in a single statement (kind of) is to create a function, otherwise you are either specifically listing all views or you are granting to all tables, then revoking non-views. I wrote this quickly, but tested it. You may need to tweak as needed: CREATE OR REPLACE FUNCTION fn_grant_all_views(schema_name TEXT, role_name TEXT) RETURNS VOID AS $func$ DECLARE view_name TEXT; BEGIN FOR view_name IN SELECT viewname FROM pg_views WHERE schemaname = schema