hi all, looking at this guide https://www.ibm.com/support/pages/temporarily-reduce-space-taken-console-dat... do i ideally have to stop the database before i truncate some tables ie /opt/aspera/common/mysql/bin/mysql -u root -p'password' aspera_console TRUNCATE* fasp_sessions fasp_files fasp_rates * *jobs job_steps* *thanks,* *rob* -- Regards, Robert K Wild.
On 03.07.23 11:39, robert k Wild via discuss wrote:
hi all,
looking at this guide
https://www.ibm.com/support/pages/temporarily-reduce-space-taken-console-dat... <https://www.ibm.com/support/pages/temporarily-reduce-space-taken-console-database>
do i ideally have to stop the database before i truncate some tables ie
/opt/aspera/common/mysql/bin/mysql -u root -p'password' aspera_console TRUNCATE*fasp_sessions fasp_files fasp_rates * *jobs job_steps*
with the database stopped you would not be able to executed any SQL commands, including TRUNCATE. So no, do not stop the database before doing a TRUNCATE -- Hartmut Holzgraefe, Principal Support Engineer (EMEA) MariaDB Corporation | http://www.mariadb.com/
Thanks Hartmut On Mon, 3 Jul 2023, 10:49 Hartmut Holzgraefe via discuss, < discuss@lists.mariadb.org> wrote:
On 03.07.23 11:39, robert k Wild via discuss wrote:
hi all,
looking at this guide
https://www.ibm.com/support/pages/temporarily-reduce-space-taken-console-dat... < https://www.ibm.com/support/pages/temporarily-reduce-space-taken-console-dat...
do i ideally have to stop the database before i truncate some tables ie
/opt/aspera/common/mysql/bin/mysql -u root -p'password' aspera_console TRUNCATE*fasp_sessions fasp_files fasp_rates * *jobs job_steps*
with the database stopped you would not be able to executed any SQL commands, including TRUNCATE. So no, do not stop the database before doing a TRUNCATE
-- Hartmut Holzgraefe, Principal Support Engineer (EMEA) MariaDB Corporation | http://www.mariadb.com/
_______________________________________________ discuss mailing list -- discuss@lists.mariadb.org To unsubscribe send an email to discuss-leave@lists.mariadb.org
have i got the syntax correct for the truncate command, can i run it all on one command? On Mon, 3 Jul 2023 at 10:52, robert k Wild <robertkwild@gmail.com> wrote:
Thanks Hartmut
On Mon, 3 Jul 2023, 10:49 Hartmut Holzgraefe via discuss, < discuss@lists.mariadb.org> wrote:
On 03.07.23 11:39, robert k Wild via discuss wrote:
hi all,
looking at this guide
https://www.ibm.com/support/pages/temporarily-reduce-space-taken-console-dat... < https://www.ibm.com/support/pages/temporarily-reduce-space-taken-console-dat...
do i ideally have to stop the database before i truncate some tables ie
/opt/aspera/common/mysql/bin/mysql -u root -p'password' aspera_console TRUNCATE*fasp_sessions fasp_files fasp_rates * *jobs job_steps*
with the database stopped you would not be able to executed any SQL commands, including TRUNCATE. So no, do not stop the database before doing a TRUNCATE
-- Hartmut Holzgraefe, Principal Support Engineer (EMEA) MariaDB Corporation | http://www.mariadb.com/
_______________________________________________ discuss mailing list -- discuss@lists.mariadb.org To unsubscribe send an email to discuss-leave@lists.mariadb.org
-- Regards, Robert K Wild.
On 03.07.23 12:22, robert k Wild wrote:
have i got the syntax correct for the truncate command, can i run it all on one command?
start by showing the actual TRUNCATE command you are issuing, and the actual error you are getting back, that removes guessing from the process. I assume that you are trying to truncate more than one table with a single TRUNCATE command? That does not work. See also the IBM document you shared earlier, that does show TRUNCATE for individual tables one at a time. You may also want to check the reference information on TRUNCATE: https://dev.mysql.com/doc/refman/8.0/en/truncate-table.html -- Hartmut Holzgraefe, Principal Support Engineer (EMEA) MariaDB Corporation | http://www.mariadb.com/
yes i was trying to truncate more than one table but it didnt work, so i truncated one at a time, oh well thanks Hartmut On Mon, 3 Jul 2023 at 12:08, Hartmut Holzgraefe <hartmut@mariadb.com> wrote:
On 03.07.23 12:22, robert k Wild wrote:
have i got the syntax correct for the truncate command, can i run it all on one command?
start by showing the actual TRUNCATE command you are issuing, and the actual error you are getting back, that removes guessing from the process.
I assume that you are trying to truncate more than one table with a single TRUNCATE command? That does not work.
See also the IBM document you shared earlier, that does show TRUNCATE for individual tables one at a time.
You may also want to check the reference information on TRUNCATE:
https://dev.mysql.com/doc/refman/8.0/en/truncate-table.html
-- Hartmut Holzgraefe, Principal Support Engineer (EMEA) MariaDB Corporation | http://www.mariadb.com/
-- Regards, Robert K Wild.
participants (2)
-
Hartmut Holzgraefe
-
robert k Wild