-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdbset.ini
33 lines (33 loc) · 1.5 KB
/
dbset.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[database]
#type : MySQL,Oracle
type = MySQL
host = 192.168.0.100
port = 3306
user = root
passwd = 123456
sid = orcl
[report]
report_title = SQL export test
report_count = 3
#---1---------------------------------
title1 = Report info
query1 = SELECT '<a href="https://github.com/kinghows/MySQL_SQLReport">MySQL_SQLReport</a>',SYSDATE()
style1 = {1: 'Generate by,l', 2: 'Report date,l'}
#---2---------------------------------
title2 = Database Size
query2 = SELECT table_schema,
CONCAT(ROUND(SUM(data_length)/(1024*1024),2),'MB') AS 'Table Size',
CONCAT(ROUND(SUM(index_length)/(1024*1024),2),'MB') AS 'Index Size' ,
CONCAT(ROUND(SUM(data_length)/(1024*1024),2) + ROUND(SUM(index_length)/(1024*1024),2),'MB') AS 'DB Size'
FROM information_schema.tables GROUP BY table_schema
UNION
SELECT '*** all ***' table_schema,
CONCAT(ROUND(SUM(data_length)/(1024*1024),2),'MB') AS 'Table Size',
CONCAT(ROUND(SUM(index_length)/(1024*1024),2),'MB') AS 'Index Size' ,
CONCAT(ROUND(SUM(data_length)/(1024*1024),2) + ROUND(SUM(index_length)/(1024*1024),2),'MB') AS 'DB Size'
FROM information_schema.tables
style2 = {1: 'table_schema,l', 2: 'Table Size,r', 3: 'Index Size,r', 4: 'DB Size,r'}
#---3---------------------------------
title3 = Export any sql you want!
query3 = SELECT '<a href="https://github.com/kinghows/MySQL_SQLReport">github.com/kinghows/MySQL_SQLReport</a>'
style3 = {1: 'If this tool is useful please help star!,l'}