Re: spool log to a file

2008-07-30 Thread walter harms
root -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt >> >> but it would be nice to see other solutions... >> >> >> -Original Message- >> From: Ananda Kumar [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, July 29, 2008 6:37 AM >>

Re: spool log to a file

2008-07-30 Thread Ananda Kumar
29/08, Mary Bahrami <[EMAIL PROTECTED]> wrote: >> > >> > I use >> > mysql -uroot -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt >> > >> > but it would be nice to see other solutions... >> > >> > >> >

Re: spool log to a file

2008-07-29 Thread Ananda Kumar
gt; Sent: Tuesday, July 29, 2008 6:37 AM > To: mysql > Subject: spool log to a file > > Hi All, > I am executing below command, but there is no entires in 1.txt, its > an > empty file. How can i write the logs into this file. > > mysql -uroot -pxxx -Dtest -s --tee=1.txt -e 'select * from > amc_25;' > > regards > anandkl >

RE: spool log to a file

2008-07-29 Thread Mary Bahrami
I use mysql -uroot -pxxx -Dtest -s -e 'select * from amc_25;' > 1.txt but it would be nice to see other solutions... -Original Message- From: Ananda Kumar [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2008 6:37 AM To: mysql Subject: spool log to a file

spool log to a file

2008-07-29 Thread Ananda Kumar
Hi All, I am executing below command, but there is no entires in 1.txt, its an empty file. How can i write the logs into this file. mysql -uroot -pxxx -Dtest -s --tee=1.txt -e 'select * from amc_25;' regards anandkl

spool log to a file

2008-07-29 Thread Ananda Kumar
Hi All, I am executing below command, but there is no entires in 1.txt, its an empty file. How can i write the logs into this file. mysql -uroot -pxxx -Dtest -s --tee=1.txt -e 'select * from amc_25;' regards anandkl

Re: spool command to file.

2007-05-21 Thread Ananda Kumar
>> > I need the sql statement to know which sql errored out. >> > >> > Database changed >> > +--+ >> > | count(*) | >> > +--+ >> > |5 | >> > +--+ >> > 1 row in set (0.00 sec) >> &

Re: spool command to file.

2007-05-21 Thread Baron Schwartz
t; > Database changed > +--+ > | count(*) | > +--+ > |5 | > +--+ > 1 row in set (0.00 sec) > > > > On 5/21/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> Ananda Kumar wrote: >> > Hi All, >> > I am exe

Re: spool command to file.

2007-05-21 Thread Ananda Kumar
---+ > 1 row in set (0.00 sec) > > > > On 5/21/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> Ananda Kumar wrote: >> > Hi All, >> > I am executing a script from mysql prompt as below >> > >> > mysql > sou

Re: spool command to file.

2007-05-21 Thread Baron Schwartz
row in set (0.00 sec) On 5/21/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: Hi, Ananda Kumar wrote: > Hi All, > I am executing a script from mysql prompt as below > > mysql > source ddl.txt > > I want to spool the out put of the above command to a file along with th

Re: spool command to file.

2007-05-21 Thread Ananda Kumar
AIL PROTECTED]> wrote: Hi, Ananda Kumar wrote: > Hi All, > I am executing a script from mysql prompt as below > > mysql > source ddl.txt > > I want to spool the out put of the above command to a file along with the > sql statments. Can you please let me know what paramet

Re: spool command to file.

2007-05-21 Thread Baron Schwartz
Hi, Ananda Kumar wrote: Hi All, I am executing a script from mysql prompt as below mysql > source ddl.txt I want to spool the out put of the above command to a file along with the sql statments. Can you please let me know what parameter should i set for the this. Use the 'tee

spool command to file.

2007-05-21 Thread Ananda Kumar
Hi All, I am executing a script from mysql prompt as below mysql > source ddl.txt I want to spool the out put of the above command to a file along with the sql statments. Can you please let me know what parameter should i set for the this. regards anandkl

Re: spool data/log into a file.

2007-04-30 Thread Joerg Bruehe
Hi Michale, all [EMAIL PROTECTED] wrote: most likely you just need to redirect STDERR to tee as well so it's not a mysql problem: mysql -u -p -f << eof 2>&1 | tee ttt.txt ... assuming it's Bourne or ksh, don't remember what's csh for 2>&1 It is an appended '&': prog >& file

Re: spool data/log into a file.

2007-04-26 Thread mizioumt
AIL PROTECTED] To: mysql@lists.mysql.com Sent: Thu, 26 Apr 2007 8:15 AM Subject: spool data/log into a file. Hi All, I have written a script to connect to mysql and all the command results is spooled into a file. But when an error occurs in mysql, it stops at that point and does not proceed to th

spool data/log into a file.

2007-04-26 Thread Ananda Kumar
please help how can i spool all the output into a file. Below is the simple script i am using, ttt.txt is the file which will contain the all the output of the script. mysql -u -p -f << eof | tee ttt.txt use dev1; select count(*) from rep_abc; select count(*) from rep_fact; exit eof

Re: table row result spool to file

2003-02-26 Thread g gnanaraj
>mysql -e "select * from baa;" test -u username -ppassword >/home/godson/run.sh > >also can finish what you want! > >- Original Message - >From: "g gnanaraj" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> &g

re: Re: table row result spool to file

2003-02-25 Thread Victoria Reznichenko
On Tuesday 25 February 2003 15:50, g gnanaraj wrote: > Thanks but I'm not getting the expected result. See the following: > > [quote] > [EMAIL PROTECTED] godson]$ cat chk5.sh > mysql -e "select * from baa into outfile \"/home/godson/run.sh\";" test > [EMAIL PROTECTED] godson]$ ./chk5.sh > ERROR 1

Re: table row result spool to file

2003-02-25 Thread g gnanaraj
Hi Thanks but I'm not getting the expected result. See the following: [quote] [EMAIL PROTECTED] godson]$ cat chk5.sh mysql -e "select * from baa into outfile \"/home/godson/run.sh\";" test [EMAIL PROTECTED] godson]$ ./chk5.sh ERROR 1045 at line 1: Access denied for user: '@localhost' (Using pass

table row result spool to file

2003-02-25 Thread g gnanaraj
Hi I need to create a file from the row of a table. I have done the following but it does not create a file but only display it on screen. What am I missing? Thanks. [EMAIL PROTECTED] godson]$ mysql -e "select * from baa;" --pager=t.sh test +--

re: SPOOL

2002-11-14 Thread Egor Egorov
Silmara, Wednesday, November 13, 2002, 6:45:51 PM, you wrote: S> The MySQL have SPOOL where can I stores query results in a file? S> How can I do this? Sorry, your question is not clear enough for me. Take a look at SELECT .. INTO OUTFILE command or may be --tee option of mysql comman

SPOOL

2002-11-13 Thread Silmara
The MySQL have SPOOL where can I stores query results in a file? How can I do this? How can I show my Indexes, Primary keys and Foreign Keys? best regards, Sil - Before posting, please check: http://www.mysql.com/manual.php

Re: How to spool a file to your server from mysql

2002-01-23 Thread Roger Baklund
* Cindy Yu, January 23, 2002 7:18 PM > When I use this on Sun saloris, it does work. ok... I guess you mean solaris, and maybe you even mean it does NOT work? > mysql> use mysql > Database changed > mysql> tee /usr/local/var/ub_store > it shows syntax error with tee. What do you mean "it shows

Re: RE: How to spool a file to your server from mysql

2002-01-23 Thread Cindy Yu
/11 11:25 AM >>> * Cindy Yu > I am new to mysql. I know, in Oracle, when you spool file, then > spool off, this will create a file on your server. What is the > equivalent command for Mysql. > > For example: > sqlplus> Spool C:\temp\table_names > sqlplus> sele

RE: How to spool a file to your server from mysql

2002-01-11 Thread Roger Baklund
* Cindy Yu > I am new to mysql. I know, in Oracle, when you spool file, then > spool off, this will create a file on your server. What is the > equivalent command for Mysql. > > For example: > sqlplus> Spool C:\temp\table_names > sqlplus> select table_name from user_t

Re: How to spool a file to your server from mysql

2002-01-11 Thread Ryan Fox
Check out select into outfile. http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#SEL ECT Ryan - Original Message - From: "Cindy Yu" <[EMAIL PROTECTED]> I am new to mysql. I know, in Oracle, when you spool file, then spool off, this will creat

How to spool a file to your server from mysql

2002-01-11 Thread Cindy Yu
Hello, I am new to mysql. I know, in Oracle, when you spool file, then spool off, this will create a file on your server. What is the equivalent command for Mysql. For example: sqlplus> Spool C:\temp\table_names sqlplus> select table_name from user_tables; sqlplus> spool off;

how to spool timing of a query into a spool file

2001-11-02 Thread another oracle dba
Hi this is a 2nd attempt. My first post never made it to the list. What I'm trying to do is to spool queries results into a spool file (via tee command). For some reason the timing information doesn't get there. When I run a query from mysql, the output is followed by a line with the

how to spool timing of a query into a spool file

2001-11-02 Thread another oracle dba
Hi. this is a minor problem that is driving me nuts. I have a query that runs nicely and I want to save its timing information in a spool file. When I connect to mysql and run the query it adds the time elapsed after the data (9 rows in set 1.1 sec). But when I run the same query in the line