error LNK2001: unresolved external symbol _mysql_real_escape_string

2006-02-01 Thread lakshmi.narasimharao


Hi,

  I am trying to use mysql_real_escape_string() C API for escaping
the special characters. When I tried to compile the program using the
Visual Studio, I am getting the following link error

error LNK2001: unresolved external symbol _mysql_real_escape_string
fatal error LNK1120: 1 unresolved externals Error executing link.exe.

I used libmysql.lib for linking and path to mysql.h in the include
files.

Please guide me here. To avoid the linking error, what I need to do?. I
am using mysql 4.0.24 version.

Thanking you in advance.

Thanks,
Narasimha


-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]

Sent: Tuesday, January 24, 2006 4:23 PM
To: mysql@lists.mysql.com
Subject: Re: Storing a string value with slash(\)


Hello.

> If I retrive the same value with the slash (\), not able to display

> properly in the GUI. Do we need to use any MySQL specific functions to

> select such values?.

If you're retrieving the same values which have stored, that this is
rather a GUI problem, not MySQL.

> Is there any way in MySQL so that I can enter any number of slashes

> between the name with out escaping with another slash?.

It is all depends on the way you're using to store data in MySQL. You
can pass everything to mysql_real_escape_string(). See:
  http://dev.mysql.com/doc/refman/5.0/en/mysql-real-escape-string.html



[EMAIL PROTECTED] wrote:
>

> Hi,
>

>  From the front end I need to use double slashes i.e  (\\) to

> enter one slash (\) into the MySQL database. I.e, if I enter

> "Gelb\Paha", it stores in the mySQL as "GlebPaha", If I enter

> "S\\Greeen", it stores as "S\Green" in the database.
>

>

> Is there any way in MySQL so that I can enter any number of slashes

> between the name with out escaping with another slash?.
>

> If I retrive the same value with the slash (\), not able to display

> properly in the GUI. Do we need to use any MySQL specific functions to

> select such values?.
>

> Please guide me for a solution here. Thanking you in advance.
>

> Thanks,
> Narasimha
>

>

>

>

>

> The information contained in this electronic message and any

> attachments to this message are intended for the exclusive use of the

> addressee(s) and may contain proprietary, confidential or privileged

> information. If you are not the intended recipient, you should not

> disseminate, distribute or copy this e-mail. Please notify the sender

> immediately and destroy all copies of this message and any

> attachments.
>

> WARNING: Computer viruses can be transmitted via email. The recipient

> should check this email and any attachments for the presence of

> viruses. The company accepts no liability for any damage caused by any

> virus transmitted by this email.
>

> www.wipro.com


--

For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com

--

MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.


WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.


www.wipro.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



error LNK2001: unresolved external symbol _mysql_real_escape_string

2006-02-01 Thread lakshmi.narasimharao

Hi,

  I am trying to use mysql_real_escape_string() C API for escaping
the special characters. When I tried to compile the program using the
Visual Studio, I am getting the following link error

error LNK2001: unresolved external symbol _mysql_real_escape_string
fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I used libmysql.lib for linking and path to mysql.h in the include
files.

Please guide me here. To avoid the linking error, what I need to do?. I
am using mysql 4.0.24 version.

Thanking you in advance.

Thanks,
Narasimha


-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 24, 2006 4:23 PM
To: mysql@lists.mysql.com
Subject: Re: Storing a string value with slash(\)


Hello.

> If I retrive the same value with the slash (\), not able to display
> properly in the GUI. Do we need to use any MySQL specific functions to

> select such values?.

If you're retrieving the same values which have stored, that this is
rather a GUI problem, not MySQL.

> Is there any way in MySQL so that I can enter any number of slashes
> between the name with out escaping with another slash?.

It is all depends on the way you're using to store data in MySQL. You
can pass everything to mysql_real_escape_string(). See:
  http://dev.mysql.com/doc/refman/5.0/en/mysql-real-escape-string.html



[EMAIL PROTECTED] wrote:
>
> Hi,
>
>  From the front end I need to use double slashes i.e  (\\) to
> enter one slash (\) into the MySQL database. I.e, if I enter
> "Gelb\Paha", it stores in the mySQL as "GlebPaha", If I enter
> "S\\Greeen", it stores as "S\Green" in the database.
>
>
> Is there any way in MySQL so that I can enter any number of slashes
> between the name with out escaping with another slash?.
>
> If I retrive the same value with the slash (\), not able to display
> properly in the GUI. Do we need to use any MySQL specific functions to

> select such values?.
>
> Please guide me for a solution here. Thanking you in advance.
>
> Thanks,
> Narasimha
>
> 
>
>
>
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> addressee(s) and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately and destroy all copies of this message and any
> attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of
> viruses. The company accepts no liability for any damage caused by any

> virus transmitted by this email.
>
> www.wipro.com


--
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Storing a string value with slash(\)

2006-01-24 Thread lakshmi.narasimharao


Hi,

 From the front end I need to use double slashes i.e  (\\) to enter
one slash (\) into the MySQL database. I.e, if I enter "Gelb\Paha", it
stores in the mySQL as "GlebPaha", If I enter "S\\Greeen", it stores as
"S\Green" in the database.


Is there any way in MySQL so that I can enter any number of slashes
between the name with out escaping with another slash?.

If I retrive the same value with the slash (\), not able to display
properly in the GUI. Do we need to use any MySQL specific functions to
select such values?.

Please guide me for a solution here. Thanking you in advance.

Thanks,
Narasimha

 



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Regarding the date values loading into the tables from a text file

2006-01-19 Thread lakshmi.narasimharao

Hi,

 From the front end I need to use double slashes i.e  (\\) to enter
one slash (\) into the MySQL database. I.e, if I enter "Gelb\Paha", it
stores in the mySQL as "GlebPaha",
If I enter "S\\Greeen", it stores as "S\Green" in the database.

Is there any way in MySQL so that I can enter any number of slases
between the name with out escaping with another slash?.

If I retrive the same value with the slash (\), not able to display
properly in the GUI.
Do we need to use any MySQL specific functions to select such values?.

Please guide me for a solution here. Thanking you in advance.

Thanks,
Narasimha

   





The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Regarding the date values loading into the tables from a text file

2006-01-16 Thread lakshmi.narasimharao

Hi,

   I am trying to load the data from a text file into the table. I
have two datetime datatype fileds in my table.
When I loaded the data into the table using the "Load Data INFILE "
syntax, In the table my date fileds values are loaded as "-00-00
00:00:00". The datetime value in the text file is in "mm/dd/
hh:mm:ss" format and the datetime format in MySQL is in "/mm/dd
hh:mm:ss" format by default. Due to the above difference in the format
of datetime, I am getting the loaded datetime value in the table as
"-00-00 00:00:00".

   Could any one of you please suggest me for a solution to load the
correct datetime values from the text file into the tables in the above
scenario.

   Thanking you in advance.

Thanks,
Narasimha





The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Reg insertion of data

2005-10-04 Thread lakshmi.narasimharao

Green,

Actaully i am dumping that data from oracle into .lst
file which will be in the mysql format. We are not getting any \n\r in
that case.

Thanks,
Narasimha

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 04, 2005 10:55 PM
To: Lakshmi NarasimhaRao (WT01 - Voice & Next Generation Networks)
Cc: mysql@lists.mysql.com
Subject: RE: Reg insertion of data



That's not dumping. That is loading. Dumping is when you put the data
INTO a file.

Does your source data contain the \r\n pair or not?

You seem to be using the default import parameters as you are not
specifying any values that could apply specifically to your data. Please
RTFM for LOAD DATA INFILE for options and specifics:
http://dev.mysql.com/doc/mysql/en/load-data.html.

There is a note on that page that specifically covers importing from
Windows files.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine



<[EMAIL PROTECTED]> wrote on 10/04/2005 12:59:41 PM:

>
> Green,
>
>
>Thank you very much for your reply. Yes, if i see in the
> hex(),  0D 0A  are coming at the end of each line.
> While dumping data i am using just
>
> LOAD DATAINFILE My.LST' INTO TABLE My_Table;
>
>
>
> Please let me know what deleimiters i have to use to avoid '\n\r' at
teh
> end of line.
>
>
> Thanks,
> Narasimha
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>
> Sent: Tuesday, October 04, 2005 10:23 PM
> To: Lakshmi NarasimhaRao (WT01 - Voice & Next Generation Networks)
> Cc: mysql@lists.mysql.com
> Subject: RE: Reg insertion of data
>
>
>
> You also forgot to mention how you are dumping
>
>
> Do you see the trailing \r if you run a normal query on the field? Use
> the HEX() function and look for the value 0D anywhere in the output.
>
>
>  Are you 100% certain that the \r is not part of your original data?
If
> you look at your source data with a hex editor, do you see 0D 0A at
the
> end of each line or just 0A?
>
>
> If you are importing data built in Windows, your lines will proabably
> terminate with "\r\n" and not just "\n".  Are you sure you configured
> your LOAD DATA INFILE to properly parse the end-of-line markers for
the
> data you are importing?
>
>
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine
>
>
> <[EMAIL PROTECTED]> wrote on 10/04/2005 11:49:41 AM:
>
> >
>
> > Sorry, I forgot to mention theat I am inserting into mysql using
load
> > data infile.
> >
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> >
>
> > Sent: Tuesday, October 04, 2005 9:04 PM
> > To: mysql@lists.mysql.com
> > Cc: [EMAIL PROTECTED]
> > Subject: Reg insertion of data
> >
>
> >
>
> >
>
> > Hi,
> >
>
> > We are inserting the text data into mysql. But, when we see
> the
> > dump of that table, we are seeing '\r' at the end of the value of
that
> > text. Actually we are not inserting the data with '\r'. Can any one
of
> > you help me in removing that '\r', imean I donot want to see that
'\r'
> > even in the dump.
> >
>
> >
>
> > Thanks,
> > Narasimha
> >
>
> >
>
> >
>
> > Confidentiality Notice
> >
>
> >
>
> > The information contained in this electronic message and any
> attachments
> > to this message are intended for the exclusive use of the
addressee(s)
> > and may contain confidential or privileged information. If you are
not
> > the intended recipient, please notify the sender at Wipro or
> > [EMAIL PROTECTED] immediately and destroy all copies of this
message
> > and any attachments.
> >
>
> > --
> >
>
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> > http://lists.mysql.com/[EMAIL PROTECTED]
> >
>
> >
>
> >
>
> >
>
> > Confidentiality Notice
> >
>
> >
>
> > The information contained in this electronic message and any
>
> > attachments to this message are intended
> > for the exclusive use of the addressee(s) and may contain
>
> > confidential or privileged information. If
> > you are not the intended recipient, please notify the sender at
>
> > Wipro or [EMAIL PROTECTED] immediately
> > and destroy all copies of this message and any attachments.
>
>
>
>
>
>
> Confidentiality Notice
>
>
> The information contained in this electronic message and any
> attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain
> confidential or privileged information. If
> you are not the intended recipient, please notify the sender at
> Wipro or [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies o

RE: Reg insertion of data

2005-10-04 Thread lakshmi.narasimharao

Green,

   Thank you very much for your reply. Yes, if i see in the
hex(),  0D 0A  are coming at the end of each line.
While dumping data i am using just
LOAD DATAINFILE My.LST' INTO TABLE My_Table;

Please let me know what deleimiters i have to use to avoid '\n\r' at teh
end of line.

Thanks,
Narasimha

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 04, 2005 10:23 PM
To: Lakshmi NarasimhaRao (WT01 - Voice & Next Generation Networks)
Cc: mysql@lists.mysql.com
Subject: RE: Reg insertion of data



You also forgot to mention how you are dumping

Do you see the trailing \r if you run a normal query on the field? Use
the HEX() function and look for the value 0D anywhere in the output.

 Are you 100% certain that the \r is not part of your original data?  If
you look at your source data with a hex editor, do you see 0D 0A at the
end of each line or just 0A?

If you are importing data built in Windows, your lines will proabably
terminate with "\r\n" and not just "\n".  Are you sure you configured
your LOAD DATA INFILE to properly parse the end-of-line markers for the
data you are importing?

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

<[EMAIL PROTECTED]> wrote on 10/04/2005 11:49:41 AM:

>
> Sorry, I forgot to mention theat I am inserting into mysql using load
> data infile.
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
>
> Sent: Tuesday, October 04, 2005 9:04 PM
> To: mysql@lists.mysql.com
> Cc: [EMAIL PROTECTED]
> Subject: Reg insertion of data
>
>
>
> Hi,
>
> We are inserting the text data into mysql. But, when we see
the
> dump of that table, we are seeing '\r' at the end of the value of that
> text. Actually we are not inserting the data with '\r'. Can any one of
> you help me in removing that '\r', imean I donot want to see that '\r'
> even in the dump.
>
>
> Thanks,
> Narasimha
>
>
>
> Confidentiality Notice
>
>
> The information contained in this electronic message and any
attachments
> to this message are intended for the exclusive use of the addressee(s)
> and may contain confidential or privileged information. If you are not
> the intended recipient, please notify the sender at Wipro or
> [EMAIL PROTECTED] immediately and destroy all copies of this message
> and any attachments.
>
> --
>
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>
>
> Confidentiality Notice
>
>
> The information contained in this electronic message and any
> attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain
> confidential or privileged information. If
> you are not the intended recipient, please notify the sender at
> Wipro or [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.






Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

RE: Reg insertion of data

2005-10-04 Thread lakshmi.narasimharao

Sorry, I forgot to mention theat I am inserting into mysql using load
data infile.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 04, 2005 9:04 PM
To: mysql@lists.mysql.com
Cc: [EMAIL PROTECTED]
Subject: Reg insertion of data



Hi,

We are inserting the text data into mysql. But, when we see the
dump of that table, we are seeing '\r' at the end of the value of that
text. Actually we are not inserting the data with '\r'. Can any one of
you help me in removing that '\r', imean I donot want to see that '\r'
even in the dump.


Thanks,
Narasimha



Confidentiality Notice


The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain confidential or privileged information. If you are not
the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately and destroy all copies of this message
and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Reg insertion of data

2005-10-04 Thread lakshmi.narasimharao

Hi,

We are inserting the text data into mysql. But, when we see the
dump of that table, we are seeing '\r' at the end of the value of that
text. Actually we are not inserting the data with '\r'. Can any one of
you help me in removing that '\r', imean I donot want to see that '\r'
even in the dump.


Thanks,
Narasimha



Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Regarding the cpu utilization of mysqld

2005-09-27 Thread lakshmi.narasimharao

Hi,

 We are using the same set of query's what we re using in some
other process, where the mysqld CPU utilization is minimum. But for this
process particularly, mysqld is utilising more than 90 % of CPU. Even in
2GB RAM machine also, behaving same. We are using Windows XP/ 2000/ 2003
server. In all these it is behaving like this. Could any one of you
suggest me the way to handle this situation.

Thanks,
Narasimha

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 9:43 PM
To: Lakshmi NarasimhaRao (WT01 - Voice & Next Generation Networks)
Cc: [EMAIL PROTECTED]; mysql@lists.mysql.com
Subject: Re: Regarding the cpu utilization of mysqld



<[EMAIL PROTECTED]> wrote on 09/26/2005 11:50:11 AM:

>
> Hi,
>
>  When running a process which is a part of my apllication,
> mysqld.exe is using 90%-95% of cpu utilization. Here I used mysqld for
> starting the mysql server. For other processes in the application, CPU
> utilization is very minimum. I used optimization (for order by, select
> and like) in building the sql queries used by the process and modified
> the following parameters in the my.ini file as
>
> key_buffer = 64M
> max_allowed_packet = 1M
> sort_buffer_size = 4M
> read_buffer_size = 4M
> query_cache_size= 16M
>
> I am using 256MB RAM.  Are my above modifications are correct/useful
for
> minimizing the CPU utilization?. Even after this also mysqld is using
> around 85% of CPU.
>
>
> Are there any other ways for minimizing the cpu utilization for mysql
> server.
>
> Could you please suggest me the ways for decreasing the CPU
utilization
> for mysqld.exe to minimum.
>
> Please help me in this.
>
> Thanks,
> Narasimha
>

Is it conceivable that the MySQL server could actually be that busy? How
many SQL statements are you processing per second? How much data is
transferring into and out of your MySQL server? What are some of the
queries appearing in your slow query log? What do the EXPLAINs if those
queries tell you? Besides MySQL, what else does that server host? What
operating system is on that server? How much memory have you allocated
for MySQL usage (some OS's allow for per-appication memory tuning)?

Depending on what else is going on or how much memory all of your other
applications/daemons have taken up, MySQL could be spending all of your
CPU time just paging data. 256MB is not very much memory to install for
a database server, especially a shared database server. May I suggest
that you add more RAM (at least upgrade to 1GB RAM, more if you can
afford it).

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine








Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Regarding the cpu utilization of mysqld

2005-09-26 Thread lakshmi.narasimharao

Hi,

 When running a process which is a part of my apllication,
mysqld.exe is using 90%-95% of cpu utilization. Here I used mysqld for
starting the mysql server. For other processes in the application, CPU
utilization is very minimum. I used optimization (for order by, select
and like) in building the sql queries used by the process and modified
the following parameters in the my.ini file as

key_buffer = 64M
max_allowed_packet = 1M
sort_buffer_size = 4M
read_buffer_size = 4M
query_cache_size= 16M

I am using 256MB RAM.  Are my above modifications are correct/useful for
minimizing the CPU utilization?. Even after this also mysqld is using
around 85% of CPU.


Are there any other ways for minimizing the cpu utilization for mysql
server.

Could you please suggest me the ways for decreasing the CPU utilization
for mysqld.exe to minimum.

Please help me in this.

Thanks,
Narasimha



Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Regarding the usage of mutex in the mysql connection threading

2005-08-30 Thread lakshmi.narasimharao

Hi Green,

We are at the last stage of the project (migration from Oracle to
MySQL). We are demanded to adopt the MYODBC as a customer requrement.
As mutex was implemented for oracle so it is there in our code. Now we
are thinking to remove that because application level we have connection
id.
So, please advise us in this case can we remove the mutex?.

I beleive that in the ODBC and in MySQL mutex will be handled
automatically, right?.

Regards
Narasimha

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 30, 2005 8:03 PM
To: Lakshmi NarasimhaRao (WT01 - Voice & Next Generation Networks)
Cc: mysql@lists.mysql.com
Subject: RE: Regarding the usage of mutex in the mysql connection
threading




<[EMAIL PROTECTED]> wrote on 08/30/2005 10:03:51 AM:

> Could any one of you please let me know in mysql/myODBC
> that the session control is now under their management meaning
> - handles different queries/write from different threads within the
same
> connection
> - handles different queries (or batch fetches) from multi-connections

<[EMAIL PROTECTED]> wrote on 08/30/2005 09:54:54 AM:

> In brief if I explain the architecture it something goes like this:-
> -  Element management Apllications uses MySQL database through DB
access
> layer.
> -  DB access layer provides the application some APIs needed for DB
> opearations.
> -  for Each DB transactions the applications login to the database->
> gets free connection id from pool (local data structure maintained in
> application)  -> do the operation -> logout -> return the connection
id
> to the pool.
> - we are going to MySQL through ODBC which identifies the transactions
> by there connection handles.
> So every parralel transactions are having separate connection id and
> separate handles for ODBC.
>
>
> Now in this kind of implementation do we need to put any of the sql
> statement execution / reading from result set opearation into a
critical
> section (mutex)?
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>
> Sent: Tuesday, August 30, 2005 6:40 PM
> To: Lakshmi NarasimhaRao (WT01 - Voice & Next Generation Networks)
> Cc: mysql@lists.mysql.com
> Subject: Re: Regarding the usage of mutex in the mysql connection
> threading
>
> <[EMAIL PROTECTED]> wrote on 08/30/2005 08:54:44 AM:
> > Hi,
>
> >We migrated a NMS project from oracle 7.3 database to mysql
> > 4.0.23. In the migration we kept the mutex mechanism followed in the
> > oracle for connection threading. Actually these mutex are mainly
used
> > before executing the sql statements which returns multiple number of
> > records and released immediately after the execution. Could any one
of
> > you please advise us, whether this mutex mechanism is really
required
> in
> > mysql 4.0.23 or not?. Is there any problem if we did not use mutex
for
> > connection threading?. Please advise us and send the reaply asap as
it
> > is very urgent.
> >
>
> > Thanks,
> > Narasimha
> >
> >
>
> It sounds as though you SHARE at least one connection between several
> processes/threads. If that is what you do, then YES. You will need a
> mutex to prevent one process from using a connection currently being
> used by another process. A more scalable solution for a managed
> connection environment would be to build a connection pool and allow
> your processes to borrow connections to the pool only as long as they
> need them. That way each process has their OWN CONNECTION and you
won't
> have to worry about concurrent requests. One caution with this
> technique: MySQL variables and temporary tables are connection
specific.
> If you do not properly manage your variables or your temporary tables
> when entering or exiting a borrowed connection you may run into data
> created by a process that previously the connection (This is true in
any
> SHARED connection scenario). Ensure that when your application ends,
> that all of the connections are properly closed.
>
>
> The best solution may be for each process/thread to manage its own
> connection independently. An effective way to prevent "connection
> overload" on your server is to make sure you properly close every
> connection as soon as you are through using it. If your application
> performs database activity in bursts (do some database work, wait for
> user, do more database work, wait for user...) it may be an optimal
> design choice to close the connection after each burst. However, that
> bit of tuning is best decided by benchmarking on your equipment with
> your software operating under both normal and abnormal loads. Use
> whichever connection plan works best during testing.
>
>
>
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine
>
>

I will respond to both emails at once (or at least try to). First, I
have to ask: Why are you trying to use ODBC?

I ask because you describe "critical sections" and "mutexes" which are
lower level programming concepts. If you are worki

RE: Regarding the usage of mutex in the mysql connection threading

2005-08-30 Thread lakshmi.narasimharao

Hi,

   Please advise us whether mysql/myodbc

- handles different queries/write from different threads within the same
connection or not?
- handles different queries (or batch fetches) from multi-connections or
not?


Thanks,
Narasimha

-Original Message-
From: Lakshmi NarasimhaRao (WT01 - Voice & Next Generation Networks)
Sent: Tuesday, August 30, 2005 7:34 PM
To: mysql@lists.mysql.com
Cc: '[EMAIL PROTECTED]'
Subject: RE: Regarding the usage of mutex in the mysql connection
threading


hi ,

  Could any one of you please let me know in mysql/myODBC
that the session control is now under their management meaning


- handles different queries/write from different threads within the same
connection


- handles different queries (or batch fetches) from multi-connections


Please reply asap.

Thanks,
Narasimha




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 30, 2005 6:40 PM
To: Lakshmi NarasimhaRao (WT01 - Voice & Next Generation Networks)
Cc: mysql@lists.mysql.com
Subject: Re: Regarding the usage of mutex in the mysql connection
threading




<[EMAIL PROTECTED]> wrote on 08/30/2005 08:54:44 AM:

>
> Hi,
>  
>
>We migrated a NMS project from oracle 7.3 database to mysql
> 4.0.23. In the migration we kept the mutex mechanism followed in the
> oracle for connection threading. Actually these mutex are mainly used
> before executing the sql statements which returns multiple number of
> records and released immediately after the execution. Could any one of
> you please advise us, whether this mutex mechanism is really required
in
> mysql 4.0.23 or not?. Is there any problem if we did not use mutex for
> connection threading?. Please advise us and send the reaply asap as it
> is very urgent.
>
> Thanks,
> Narasimha
>
>

It sounds as though you SHARE at least one connection between several
processes/threads. If that is what you do, then YES. You will need a
mutex to prevent one process from using a connection currently being
used by another process. A more scalable solution for a managed
connection environment would be to build a connection pool and allow
your processes to borrow connections to the pool only as long as they
need them. That way each process has their OWN CONNECTION and you won't
have to worry about concurrent requests. One caution with this
technique: MySQL variables and temporary tables are connection specific.
If you do not properly manage your variables or your temporary tables
when entering or exiting a borrowed connection you may run into data
created by a process that previously the connection (This is true in any
SHARED connection scenario). Ensure that when your application ends,
that all of the connections are properly closed.

The best solution may be for each process/thread to manage its own
connection independently. An effective way to prevent "connection
overload" on your server is to make sure you properly close every
connection as soon as you are through using it. If your application
performs database activity in bursts (do some database work, wait for
user, do more database work, wait for user...) it may be an optimal
design choice to close the connection after each burst. However, that
bit of tuning is best decided by benchmarking on your equipment with
your software operating under both normal and abnormal loads. Use
whichever connection plan works best during testing.


Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine






Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

RE: Regarding the usage of mutex in the mysql connection threading

2005-08-30 Thread lakshmi.narasimharao

hi ,

  Could any one of you please let me know in mysql/myODBC
that the session control is now under their management meaning

- handles different queries/write from different threads within the same
connection

- handles different queries (or batch fetches) from multi-connections


Please reply asap.

Thanks,
Narasimha




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 30, 2005 6:40 PM
To: Lakshmi NarasimhaRao (WT01 - Voice & Next Generation Networks)
Cc: mysql@lists.mysql.com
Subject: Re: Regarding the usage of mutex in the mysql connection
threading




<[EMAIL PROTECTED]> wrote on 08/30/2005 08:54:44 AM:

>
> Hi,
>  
>
>We migrated a NMS project from oracle 7.3 database to mysql
> 4.0.23. In the migration we kept the mutex mechanism followed in the
> oracle for connection threading. Actually these mutex are mainly used
> before executing the sql statements which returns multiple number of
> records and released immediately after the execution. Could any one of
> you please advise us, whether this mutex mechanism is really required
in
> mysql 4.0.23 or not?. Is there any problem if we did not use mutex for
> connection threading?. Please advise us and send the reaply asap as it
> is very urgent.
>
> Thanks,
> Narasimha
>
>

It sounds as though you SHARE at least one connection between several
processes/threads. If that is what you do, then YES. You will need a
mutex to prevent one process from using a connection currently being
used by another process. A more scalable solution for a managed
connection environment would be to build a connection pool and allow
your processes to borrow connections to the pool only as long as they
need them. That way each process has their OWN CONNECTION and you won't
have to worry about concurrent requests. One caution with this
technique: MySQL variables and temporary tables are connection specific.
If you do not properly manage your variables or your temporary tables
when entering or exiting a borrowed connection you may run into data
created by a process that previously the connection (This is true in any
SHARED connection scenario). Ensure that when your application ends,
that all of the connections are properly closed.

The best solution may be for each process/thread to manage its own
connection independently. An effective way to prevent "connection
overload" on your server is to make sure you properly close every
connection as soon as you are through using it. If your application
performs database activity in bursts (do some database work, wait for
user, do more database work, wait for user...) it may be an optimal
design choice to close the connection after each burst. However, that
bit of tuning is best decided by benchmarking on your equipment with
your software operating under both normal and abnormal loads. Use
whichever connection plan works best during testing.


Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine






Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

RE: Regarding the usage of mutex in the mysql connection threading

2005-08-30 Thread lakshmi.narasimharao

Hi Green,

Thanks a lot for your reply.
In brief if I explain the architecture it something goes like this:-
-  Element management Apllications uses MySQL database through DB access
layer.
-  DB access layer provides the application some APIs needed for DB
opearations.
-  for Each DB transactions the applications login to the database->
gets free connection id from pool (local data structure maintained in
application)  -> do the operation -> logout -> return the connection id
to the pool.
- we are going to MySQL through ODBC which identifies the transactions
by there connection handles.
So every parralel transactions are having separate connection id and
separate handles for ODBC.

Now in this kind of implementation do we need to put any of the sql
statement execution / reading from result set opearation into a critical
section (mutex)?

Please send the reply asap.

Regards,
Narasimha,

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 30, 2005 6:40 PM
To: Lakshmi NarasimhaRao (WT01 - Voice & Next Generation Networks)
Cc: mysql@lists.mysql.com
Subject: Re: Regarding the usage of mutex in the mysql connection
threading




<[EMAIL PROTECTED]> wrote on 08/30/2005 08:54:44 AM:

>
> Hi,
>  
>
>We migrated a NMS project from oracle 7.3 database to mysql
> 4.0.23. In the migration we kept the mutex mechanism followed in the
> oracle for connection threading. Actually these mutex are mainly used
> before executing the sql statements which returns multiple number of
> records and released immediately after the execution. Could any one of
> you please advise us, whether this mutex mechanism is really required
in
> mysql 4.0.23 or not?. Is there any problem if we did not use mutex for
> connection threading?. Please advise us and send the reaply asap as it
> is very urgent.
>
> Thanks,
> Narasimha
>
>

It sounds as though you SHARE at least one connection between several
processes/threads. If that is what you do, then YES. You will need a
mutex to prevent one process from using a connection currently being
used by another process. A more scalable solution for a managed
connection environment would be to build a connection pool and allow
your processes to borrow connections to the pool only as long as they
need them. That way each process has their OWN CONNECTION and you won't
have to worry about concurrent requests. One caution with this
technique: MySQL variables and temporary tables are connection specific.
If you do not properly manage your variables or your temporary tables
when entering or exiting a borrowed connection you may run into data
created by a process that previously the connection (This is true in any
SHARED connection scenario). Ensure that when your application ends,
that all of the connections are properly closed.

The best solution may be for each process/thread to manage its own
connection independently. An effective way to prevent "connection
overload" on your server is to make sure you properly close every
connection as soon as you are through using it. If your application
performs database activity in bursts (do some database work, wait for
user, do more database work, wait for user...) it may be an optimal
design choice to close the connection after each burst. However, that
bit of tuning is best decided by benchmarking on your equipment with
your software operating under both normal and abnormal loads. Use
whichever connection plan works best during testing.


Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine






Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Regarding the usage of mutex in the mysql connection threading

2005-08-30 Thread lakshmi.narasimharao

Hi,
  
   We migrated a NMS project from oracle 7.3 database to mysql
4.0.23. In the migration we kept the mutex mechanism followed in the
oracle for connection threading. Actually these mutex are mainly used
before executing the sql statements which returns multiple number of
records and released immediately after the execution. Could any one of
you please advise us, whether this mutex mechanism is really required in
mysql 4.0.23 or not?. Is there any problem if we did not use mutex for
connection threading?. Please advise us and send the reaply asap as it
is very urgent.

Thanks,
Narasimha



Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Any limit for MyODBC connections?

2005-05-23 Thread lakshmi.narasimharao

Hi,



Is there any database login restriction for myODBC?



meaning there is any upper limit of number of connections?



Please help me in this.



Thanks,

Narasimha







Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

FW: Slow queries, why?

2005-05-05 Thread lakshmi.narasimharao

Hi,

  Thank you. I have a doubt, you mentioned one equation as

Memory Used By MySQL = Innodb_buffer_pool_size + key_buffer_size +
max_connections*(sort_buffer_size+read_buffer_size+binlog_cache_size) +
max_connections*2MB


Is it against mysqld or for each mysql prompt?.

Could you please confirm it?


Thanks,
Narasimha

From: David Griffiths [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 04, 2005 10:19 PM
To: Gleb Paharenko
Cc: mysql@lists.mysql.com
Subject: Re: Slow queries, why?

Yes, indexes slow down inserts (or updates that change the value of a
column that is indexed).

Also, remember that MySQL only uses one index per per table in a query.
So if there are some columns in your table that are indexed, but,

1) Have poor cardinality (number of distinct values - low cardinality
means there aren't many distinct values)
2) Are only used in a where clause with another column that has good
cardinality

then they are an excellent candidate for removal.

While "EXPLAIN" is great for queries, it won't help much with an insert;

it might be useful for figuring out what indexes are used, and which
ones aren't.

Use "show innodb status" to get an idea of what's going on (Gleb
suggested it in the link to the innodb monitor).

You should also post the relevant parts of your my.cnf file; have you
seen this equation before:

Memory Used By MySQL = Innodb_buffer_pool_size + key_buffer_size +
max_connections*(sort_buffer_size+read_buffer_size+binlog_cache_size) +
max_connections*2MB

Use it to calculate how much memory you are using.

Finally, read up on phantom reads:
http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/InnoDB_Next-key_
locking.html

This might be what's happening.

David


Gleb Paharenko wrote:

>Hello.
>
>
>
> 
>
>>We're running MySQL 4.11 on a machine with 2GB memory, the table is
>>   
>>
>
> 
>
>>InnoDB with a compound primary key, and additional indexes on all rows
>>   
>>
>
> 
>
>>with searchable options in the API. Any generic advice or admin tools
>>   
>>
>
> 
>
>>would be great.
>>   
>>
>
>
>
>Use EXPLAIN to determine how efficient your indexes are. Using a lot of
>
>keys could slow down the INSERT operations but fasten the SELECTs.
>
>InnoDB monitors might be helpful in your case as well. See:
>
>  http://dev.mysql.com/doc/mysql/en/explain.html
>
>  http://dev.mysql.com/doc/mysql/en/innodb-monitor.html
>
>
>
>
>
>
>
>Joseph Cochran <[EMAIL PROTECTED]> wrote:
>
> 
>
>>So here's my situation: we have a database that has a table of about 5
>>   
>>
>
> 
>
>>million rows. To put a new row into the table, I do an INSERT ...
>>   
>>
>
> 
>
>>SELECT, pulling data from one row in the table to seed the data for
>>   
>>
>
> 
>
>>the new row. When there are no active connections to the DB other than
>>   
>>
>
> 
>
>>the one making the INSERT, it runs like a charm. But during normal
>>   
>>
>
> 
>
>>daytime operation, when we run around 50 connections (most sleeping at
>>   
>>
>
> 
>
>>any one time), it takes up to two minutes to do, and ends up locking
>>   
>>
>
> 
>
>>any other inserts or updates against that table for the entire time.
>>   
>>
>
> 
>
>
> 
>
>>I'll get into more specifics if they're required, but I wanted to ask
>>   
>>
>
> 
>
>>in general if MySQL has tools to diagnose this, or if anyone has had
>>   
>>
>
> 
>
>>general situations like this. In SQL Server (which is where I have
>>   
>>
>
> 
>
>>most of my experience) I could use the trace tool and the Query
>>   
>>
>
> 
>
>>Analyzer to tell what the execution plan for the query was and thus
>>   
>>
>
> 
>
>>what's stalling it (an index gone bad, a weird locking situation,
>>   
>>
>
> 
>
>>etc).
>>   
>>
>
> 
>
>
> 
>
>>We're running MySQL 4.11 on a machine with 2GB memory, the table is
>>   
>>
>
> 
>
>>InnoDB with a compound primary key, and additional indexes on all rows
>>   
>>
>
> 
>
>>with searchable options in the API. Any generic advice or admin tools
>>   
>>
>
> 
>
>>would be great.
>>   
>>
>
> 
>
>
> 
>
>>-- Joe
>>   
>>
>
> 
>
>
>
>
> 
>


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Slow queries, why?

2005-05-04 Thread lakshmi.narasimharao

Hi,

I have an interesting problem, i.e upto 20k data is inserted in 20
min. But for 39k it took 3.5 hours. Could you please help me in this,
what are all the possible scenarios which leads to this kind of
problems.  Is there any fine tuning mechanism in Mysql 4.0.23 with
innodb?

Please help me in this, it is very urgent.

Thanks,
Narasimha

-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 04, 2005 1:11 PM
To: mysql@lists.mysql.com
Subject: Re: Slow queries, why?

Hello.

> We're running MySQL 4.11 on a machine with 2GB memory, the table is
> InnoDB with a compound primary key, and additional indexes on all rows
> with searchable options in the API. Any generic advice or admin tools
> would be great.

Use EXPLAIN to determine how efficient your indexes are. Using a lot of
keys could slow down the INSERT operations but fasten the SELECTs.
InnoDB monitors might be helpful in your case as well. See:
  http://dev.mysql.com/doc/mysql/en/explain.html
  http://dev.mysql.com/doc/mysql/en/innodb-monitor.html



Joseph Cochran <[EMAIL PROTECTED]> wrote:
> So here's my situation: we have a database that has a table of about 5
> million rows. To put a new row into the table, I do an INSERT ...
> SELECT, pulling data from one row in the table to seed the data for
> the new row. When there are no active connections to the DB other than
> the one making the INSERT, it runs like a charm. But during normal
> daytime operation, when we run around 50 connections (most sleeping at
> any one time), it takes up to two minutes to do, and ends up locking
> any other inserts or updates against that table for the entire time.
>
> I'll get into more specifics if they're required, but I wanted to ask
> in general if MySQL has tools to diagnose this, or if anyone has had
> general situations like this. In SQL Server (which is where I have
> most of my experience) I could use the trace tool and the Query
> Analyzer to tell what the execution plan for the query was and thus
> what's stalling it (an index gone bad, a weird locking situation,
> etc).
>
> We're running MySQL 4.11 on a machine with 2GB memory, the table is
> InnoDB with a compound primary key, and additional indexes on all rows
> with searchable options in the API. Any generic advice or admin tools
> would be great.
>
> -- Joe
>


--
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Regarding the loading of data usning load data infile

2005-04-20 Thread lakshmi.narasimharao


Hi,
   I had 99,990 records to be loaded into a table which is having
unique constraints and foreign-key constraints as below

CREATE TABLE `teldir` (
  `NAME` varchar(21) default '',
  `PHONE_NO` varchar(26) default '',
  `PRIME_VALUE` char(1) default '',
  `COMMENT_TEXT1` varchar(30) default '',
  `COMMENT_TEXT2` varchar(30) default '',
  `DEPARTMENT_ID` int(4) default NULL,
  `LOCATION_ID` int(4) default NULL,
  `COMPONENT_ID` int(3) default NULL,
  `NAME_AND_PHONE_NO` varchar(48) NOT NULL default '',
  `HI_CASE_IND` int(11) default NULL,
  `LOW_CASE_IND` int(11) default NULL,
  `PRIVACY` char(1) default '',
  `COLLECTED` char(1) default '',
  `HOMENODE_ID` int(3) NOT NULL default '0',
  `CLUSTERID` int(3) NOT NULL default '0',
  `PLID_CABINET` int(3) default NULL,
  `PLID_SHELF` int(3) default NULL,
  `PLID_SLOT` int(3) default NULL,
  `PLID_CIRCUIT` int(3) default NULL,
  `DEVICE_TYPE` int(2) default NULL,
  `IDS_ID` varchar(255) default '',
  `ISIDSMANAGED` char(1) default '',
  `MACADDRESS` varchar(12) default '',
  `CESID` varchar(10) default '',
  `hvgPIN` varchar(8) default '',
  `tdUID` varchar(38) default '',
  PRIMARY KEY  (`NAME_AND_PHONE_NO`),
  UNIQUE KEY `TD_PHONE_KEY_IDX` (`PHONE_NO`,`NAME_AND_PHONE_NO`),
  UNIQUE KEY `TD_KEYS_IDX` (`NAME_AND_PHONE_NO`,`NAME`,`PHONE_NO`),
  UNIQUE KEY `TD_COMP_KEY_IDX` (`COMPONENT_ID`,`NAME_AND_PHONE_NO`),
  KEY `COMPONENT_ID` (`COMPONENT_ID`),
  KEY `HOMENODE_ID` (`HOMENODE_ID`),
  KEY `TD_COMP_PLID_IDX`
(`COMPONENT_ID`,`PLID_CABINET`,`PLID_SHELF`,`PLID_SLOT`,`PLID_CIRCUIT`),
  KEY `TD_IDSID_IDX` (`IDS_ID`),
  KEY `TD_IDSUNMGT_IDX` (`ISIDSMANAGED`),
  CONSTRAINT `FK_TELDIR_COMPONENT` FOREIGN KEY (`COMPONENT_ID`)
REFERENCES `component` (`ID`),
  CONSTRAINT `FK_TELDIR_HOMENODE` FOREIGN KEY (`HOMENODE_ID`) REFERENCES
`component` (`ID`)
) TYPE=InnoDB


Used "load data infile 'teldir.lst' into table teldir". But teldir.lst
contains data of 99,990 records (whose fields are separated by tab and
rows are separated by newline). To load these many records into teldir
table whose structure as above taking around 100 minutes. I.e taking too
much of time.

If I drop the unique and foreign key constraints it is taking around 25
minutes, which is also large time.

Please advise me for a better solution so that the loading of data
should be faster. According to the load data standards for innodb it
should load 2000 records for second. Please explain me the proper
solution for this.


Thanks,
Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Regarding the loading of data usning load data infile

2005-04-18 Thread lakshmi.narasimharao

Hi,
   I had 99,990 records to be loaded into a table which is having
unique constraints and foreign-key constraints as below

CREATE TABLE `teldir` (
  `NAME` varchar(21) default '',
  `PHONE_NO` varchar(26) default '',
  `PRIME_VALUE` char(1) default '',
  `COMMENT_TEXT1` varchar(30) default '',
  `COMMENT_TEXT2` varchar(30) default '',
  `DEPARTMENT_ID` int(4) default NULL,
  `LOCATION_ID` int(4) default NULL,
  `COMPONENT_ID` int(3) default NULL,
  `NAME_AND_PHONE_NO` varchar(48) NOT NULL default '',
  `HI_CASE_IND` int(11) default NULL,
  `LOW_CASE_IND` int(11) default NULL,
  `PRIVACY` char(1) default '',
  `COLLECTED` char(1) default '',
  `HOMENODE_ID` int(3) NOT NULL default '0',
  `CLUSTERID` int(3) NOT NULL default '0',
  `PLID_CABINET` int(3) default NULL,
  `PLID_SHELF` int(3) default NULL,
  `PLID_SLOT` int(3) default NULL,
  `PLID_CIRCUIT` int(3) default NULL,
  `DEVICE_TYPE` int(2) default NULL,
  `IDS_ID` varchar(255) default '',
  `ISIDSMANAGED` char(1) default '',
  `MACADDRESS` varchar(12) default '',
  `CESID` varchar(10) default '',
  `hvgPIN` varchar(8) default '',
  `tdUID` varchar(38) default '',
  PRIMARY KEY  (`NAME_AND_PHONE_NO`),
  UNIQUE KEY `TD_PHONE_KEY_IDX` (`PHONE_NO`,`NAME_AND_PHONE_NO`),
  UNIQUE KEY `TD_KEYS_IDX` (`NAME_AND_PHONE_NO`,`NAME`,`PHONE_NO`),
  UNIQUE KEY `TD_COMP_KEY_IDX` (`COMPONENT_ID`,`NAME_AND_PHONE_NO`),
  KEY `COMPONENT_ID` (`COMPONENT_ID`),
  KEY `HOMENODE_ID` (`HOMENODE_ID`),
  KEY `TD_COMP_PLID_IDX`
(`COMPONENT_ID`,`PLID_CABINET`,`PLID_SHELF`,`PLID_SLOT`,`PLID_CIRCUIT`),
  KEY `TD_IDSID_IDX` (`IDS_ID`),
  KEY `TD_IDSUNMGT_IDX` (`ISIDSMANAGED`),
  CONSTRAINT `FK_TELDIR_COMPONENT` FOREIGN KEY (`COMPONENT_ID`)
REFERENCES `component` (`ID`),
  CONSTRAINT `FK_TELDIR_HOMENODE` FOREIGN KEY (`HOMENODE_ID`) REFERENCES
`component` (`ID`)
) TYPE=InnoDB


Used "load data infile 'teldir.lst' into table teldir". But teldir.lst
contains data of 99,990 records (whose fields are separated by tab and
rows are separated by newline). To load these many records into teldir
table whose structure as above taking around 100 minutes. I.e taking too
much of time.

If I drop the unique and foreign key constraints it is taking around 25
minutes, which is also large time.

Please advise me for a better solution so that the loading of data
should be faster. According to the load data standards for innodb it
should load 2000 records for second. Please explain me the proper
solution for this.


Thanks,
Narasimha

-Original Message-
From: Heikki Tuuri [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 07, 2005 2:52 PM
To: mysql@lists.mysql.com
Subject: Re: innodb, log_bin and ib_logfiles

Johanne,

- Original Message -
From: ""Duhaime Johanne"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Wednesday, April 06, 2005 10:12 PM
Subject: innodb, log_bin and ib_logfiles


> --_=_NextPart_001_01C53ADC.86591B2F
> Content-Type: text/plain;
> charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> I have looked  around in the documentation but  I do  not have a clear
> idea of log_bin vs ib_lofile for innodb.
> =20
> Regarding only INNODB tables, am I right if I say that:=20
> =20
> log_bin are the commit transactions

yes. The binlog is used to roll-forward from a backup.

> and it is what is use in an
> automatic recovery or are to be apply in a manual recovery from a dump
> (In Oracle they are the Redo.logs)  .=20
> ib_logfiles are storing the uncommit and commit transactiond and
allows
> the rollback of transactions

No. ib_logfiles are a page-level 'physiological' redo log. Used in crash

recovery.

> (In Oracle they are the Rollback segments)?

Rollback segments in InnoDB are called 'undo logs'. They are in the
ibdata
files. They are used in rollback, and in 'consistent read' SELECT.

> They are not use in the automatic recovery of innodb nor in a manual
> recovery from a dump.
> =20
> I would appreciate very much if someone can clarify this for me.
> =20
> =20
> Johanne Duhaime

Best regards,

Heikki Tuuri
Innobase Oy
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up
MyISAM
tables
http://www.innodb.com/order.php


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Wrong bytesec nightmare!

2005-04-07 Thread lakshmi.narasimharao

Hi,

we are facing problem with the sql queries given below
query number one gives the output as workstation and total logon failure
attempts from that workstation
which is fine
1) select logonsvr,workstnid, count (username) from winadlogon where
evtid="681" group by workstnid order by workstnid;

query number 2 is generating list
username-workstnid-hits from the user
e.g.
userA-workstation A- 3
userB-Workstation A -2
userc-workstation B -1

2)select time,workstnid,username count (username) from winadlogon where
evtid="681" group by username order by workstnid;

as shown in above example we are getting the list.
If user A also has attempted login from workstation B the it is not
displayed as we have done grouping by username.

we need output such as
userA-workstation A -3
userA-workstation B -2

if user is attempling log on from various workstations the this query
should show all entries for the user for all workstations from where it
has tried log on and hits from each workstation logon and while group by
username is in place.
please suggest if there is any solution to this problem.


Thanks,
Narasimha
-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: Monday, March 14, 2005 3:00 PM
To: mysql@lists.mysql.com
Subject: Re: Wrong bytesec nightmare!

Hello.

You may use --extend-check option with myisamchk, but
usually it finds a lot of garbage, and should be used as
a last resort.



Francisco Lopez <[EMAIL PROTECTED]> wrote:
> Hello all,
> I am getting quite desperate on this, since I've been trying to
recover 
> my diary of a whole year of travelling which was stored in a MyISAM 
> table for a couples of weeks now! The MySQL server was running in a XP

> machine and suddenly the hard disk crashed starting my particular 
> nightmare. I had to use recovery tools to scan the disk and I thought
I 
> was saved when I found the *.frm, *.MYI and *.MYD files and was able
to 
> recover them, but when I tried get the tables back into MySQL and 
> backup their contents, I found a series of errors that have kept me 
> down ever since!
> The first complain I got when I selected the table was:
>
> Didn't find any fields in table 'news'
>
> I then checked the table for errors, and got:
>
> mysql> check table news;
> +--+---+

--
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Regarding NULL and '' (null string) treatment in MYSQL

2005-03-29 Thread lakshmi.narasimharao

Hi,

MySQL treats NULL, '' (empty string) as different.

I mean when I select from/insert into a table, its behaviour is
different. 

   Select * from table1 where name=''; 

   is different from

   Select * from table1 where name=NULL;  

   Similarly

   Insert into table1(name) values('')  is different from

   Insert into table1(name) values(NULL) 

   Please suggest me here, how to overcome this '' (null string)
problem.

 Scenario:

 I have two tables, one is parent and one is child.

 Child is referencing 3 fields in parent table.

Parent table records are empty. Now I am trying to insert into the child
table with  '' (null string) values into these 3 fields (which are
referencing to the parent table).  Actually insert into the child table
in this scenario should be successful, but I am not able to make it
success because of the problem described above ( Treatment of NULL, ''
are different).

Note: If the parent is not having any records, we can insert into the
child. BCS, in this case referential integrity won't work.
  
Ps: In oracle, it is not the case it treats NULL,'' as same.


Please suggest me how to proceed here.


Thanks,
Narasimha



Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Regrading Heading off and Pause on

2005-03-16 Thread lakshmi.narasimharao


Hi,

   Is there any equivalent of "set head off", "set pause on"  in
mysql 4.0.21.  "set head off", "set pause on"  work fine in oracle.


Please help me in this.


Thanks,
Narasimha







Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Reg creating log

2005-03-14 Thread lakshmi.narasimharao

Hi,
  Thank you for your reply. I tried even with --tee option with
mysql as follows

Mysql -uroot db_name --tee = test < 'input_file' > 'output_file'


But in the out put file I am getting as below

Logging to file 'test'

Actual error is not logging into the ouput file. I am able to see the
error messages in the command prompt. How to get these error messages in
the output file. Please help me in this.


Thanks,
Narasimha

-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 2005 7:34 PM
To: mysql@lists.mysql.com
Subject: Re: Reg creating log

Hello.

You may use --tee option of mysql to store the results in the file.
Or just redirect the output:
 mysql -uroot db_name < 'input_file' >'output_file'.

See:
  http://dev.mysql.com/doc/mysql/en/mysql-commands.html



[EMAIL PROTECTED] wrote:
>
> Hi,
>
>   What is the command to create log file while executing mysql
> command.
>
>   I.e I want to run a file using mysql as follows
>
> Mysql -uroot db_name < "Inputfile"
>
>
>   I want to log the above results into a log file, to do the same
> what option I have to use here with mysql command.
>
>
> PS: Input file contains some sql statements.
>
>
>Please help me in this. This is very urgent.
>
> Thanks,
> Narasimha
>
> -Original Message-
> From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 09, 2005 11:16 PM
> To: mysql@lists.mysql.com
> Subject: Re: Access Denied
>
> Hello.
>
> Right. No need to FLUSH PRIVILEGES after GRANT.=0D
>
> My fault, sorry.=0D
>
>
> Michael Stassen <[EMAIL PROTECTED]> wrote:
>>=0D
>> Gleb Paharenko wrote:
>>> Hello.
>>>=0D
>>> Execute FLUSH PRIVILEGES after granting.
>>> See:
>>>   http://dev.mysql.com/doc/mysql/en/flush.html
>>>   http://dev.mysql.com/doc/mysql/en/privilege-changes.html
>>=0D
>> Yes, please read this one.  FLUSH PRIVILEGES is NOT needed after
> GRANT,=0D
>> REVOKE, or SET PASSWORD.  You only need to FLUSH if you directly edit
> the=0D
>> grant tables (INSERT, UPDATE, DELETE).  Since he/she is using GRANT,
> FLUSH=0D
>> PRIVILEGES is unlikely to be relevant.
>>=0D
>>>   http://dev.mysql.com/doc/mysql/en/access-denied.html
>>>   http://dev.mysql.com/doc/mysql/en/user-resources.html
>>>=0D
>>> Connect to the server using mysql command line client using
specified
> in GRANT statement
>>> username and password to check that the problem not in MySQL server.
> What output does the=0D
>>> following statement produce:
>>>=0D
>>>   SHOW GRANTS FOR 'metal-host'@'localhost';
>>=0D
>> Run this when it works, and then again when it doesn't.  If the
result
> is=0D
>> different, then something is changing the privileges assigned to=0D
>> [EMAIL PROTECTED], so the solution will involve finding what is
> doing=0D
>> that.  If the privs are the same, then we need to look elsewhere.
> From the=0D
>> (not entirely clear) description, I expect the first case.
>>=0D
>>> What exact version of MySQL server do you use?
>>>=0D
>>> [snip]
>>>=0D
>>> Hello Gleb, no i m not doing flush..i dont even know what flush is.
>>> do u have anything in mind ?
>>>=0D
>>> [snip]
>>>=0D
>>=0D
>> Michael
>>=0D
>>=0D
>> Metal Host Contact wrote:
>>=0D
>> > I have installed in a single user called "metal-host" more than 10
>> > databases all with different names and in different php scripts
> (phpbb
>> > phpnuke mambo etc).
>> > the problem is that they only work as I install them,after some
hour
> later
>> > all the scripts show me that error : Access denied for user:
>> > '[EMAIL PROTECTED]' (Using password: YES) 
>> > then im trying to do : GRANT ALL PRIVILEGES ON somethign.* TO
>> > [EMAIL PROTECTED] IDENTIFIED BY "password"; and then each
> database that
>> > i re-give  the GRANT all command works perfectly..but for 1 minute
>> > only,then it gives me the same : Access denied for user:
>> > '[EMAIL PROTECTED]' (Using password: YES)  So is there any
>> > limitation for the number of DBases that each user should
>> > run ?
>> >
>>=0D
>
>
> --=0D
> For technical support contracts, goto
> https://order.mysql.com/?ref=3Densita
> This email is sponsored by Ensita.NET http://www.ensita.net/
>   __  ___ ___   __
>  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
> / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
>   <___/   www.mysql.com
>
>
>
>
> --=0D
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>
>
> Confidentiality Notice=0D
>
> The information contained in this electronic message and any
attachments to=
> this message are intended
> for the exclusive use of the addressee(s) and may contain confidential
or=
> privileged information. If
> you are not the intended recipient, please notify the sender at Wipro
or=
> [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.
>


--
For technical support contracts, 

Reg creating log

2005-03-11 Thread lakshmi.narasimharao

Hi,

   What is the command to create log file while executing mysql
command.

   I.e I want to run a file using mysql as follows

 Mysql -uroot db_name < "Inputfile"


   I want to log the above results into a log file, to do the same
what option I have to use here with mysql command.


 PS: Input file contains some sql statements.


Please help me in this. This is very urgent.

Thanks,
Narasimha

-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 09, 2005 11:16 PM
To: mysql@lists.mysql.com
Subject: Re: Access Denied

Hello.

Right. No need to FLUSH PRIVILEGES after GRANT.

My fault, sorry.


Michael Stassen <[EMAIL PROTECTED]> wrote:
>
> Gleb Paharenko wrote:
>> Hello.
>>
>> Execute FLUSH PRIVILEGES after granting.
>> See:
>>   http://dev.mysql.com/doc/mysql/en/flush.html
>>   http://dev.mysql.com/doc/mysql/en/privilege-changes.html
>
> Yes, please read this one.  FLUSH PRIVILEGES is NOT needed after
GRANT,
> REVOKE, or SET PASSWORD.  You only need to FLUSH if you directly edit
the
> grant tables (INSERT, UPDATE, DELETE).  Since he/she is using GRANT,
FLUSH
> PRIVILEGES is unlikely to be relevant.
>
>>   http://dev.mysql.com/doc/mysql/en/access-denied.html
>>   http://dev.mysql.com/doc/mysql/en/user-resources.html
>>
>> Connect to the server using mysql command line client using specified
in GRANT statement
>> username and password to check that the problem not in MySQL server.
What output does the
>> following statement produce:
>>
>>   SHOW GRANTS FOR 'metal-host'@'localhost';
>
> Run this when it works, and then again when it doesn't.  If the result
is
> different, then something is changing the privileges assigned to
> [EMAIL PROTECTED], so the solution will involve finding what is
doing
> that.  If the privs are the same, then we need to look elsewhere.
>From the
> (not entirely clear) description, I expect the first case.
>
>> What exact version of MySQL server do you use?
>>
>> [snip]
>>
>> Hello Gleb, no i m not doing flush..i dont even know what flush is.
>> do u have anything in mind ?
>>
>> [snip]
>>
>
> Michael
>
>
> Metal Host Contact wrote:
>
> > I have installed in a single user called "metal-host" more than 10
> > databases all with different names and in different php scripts
(phpbb
> > phpnuke mambo etc).
> > the problem is that they only work as I install them,after some hour
later
> > all the scripts show me that error : Access denied for user:
> > '[EMAIL PROTECTED]' (Using password: YES) 
> > then im trying to do : GRANT ALL PRIVILEGES ON somethign.* TO
> > [EMAIL PROTECTED] IDENTIFIED BY "password"; and then each
database that
> > i re-give  the GRANT all command works perfectly..but for 1 minute
> > only,then it gives me the same : Access denied for user:
> > '[EMAIL PROTECTED]' (Using password: YES)  So is there any
> > limitation for the number of DBases that each user should
> > run ?
> >
>


--
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Reg Text field data

2005-02-24 Thread lakshmi.narasimharao

Hi,
   How to read a text type field from the data base. By simple
select I am not able to see the whole data at a time. Please advise me
here.


Thanks,
Narasimha

-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 23, 2005 9:06 PM
To: mysql@lists.mysql.com
Subject: Re: Change default character_set_client, connection, results

Hello.

Use MYSQL_SET_CHARSET_NAME option for  mysql_options() function. See:

  http://dev.mysql.com/doc/mysql/en/mysql-options.html
 




[snip]

  Hello,

  could someone tell me if it is possible to change default settings for
  character_set_client, character_set_connection and
character_set_results variables? They
  are always set to latin1 and I didn't find any way how to change their
default value.
  I'm using MySQL 4.1.9-nt and MySQL ODBC 3.51. My applications are
written in C++ Builder
  and I don't want to send command SET NAMES 'cp1250' whenever
application opens
  connection.

  Thanks in advance

[snip]
 


--
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: SQLSTATE mapping problem

2005-02-01 Thread lakshmi.narasimharao

Hi all,
Can anybody suggest whether it is due to version incompatibility?? We
are using MySQL 4.0.21 and MySQL ODBC Driver 3.51.
Thanks in advance
Narasimha

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 01, 2005 2:53 PM
To: mysql@lists.mysql.com
Subject: SQLSTATE mapping problem


Hi all,

We are using MySQL ODBC 3.51 driver for db connection. When executing an
SQL statement using

SQLExecDirect() function and if there is a syntax error in the SQL
statement, the SQLSTATE returned by the
driver is "23000" (which stands for invalid constraint/duplicate keys.)
instead of "42000" (which stands for syntax error or access violation)
. Like this we are getting different SQLSTATE values for other errors.
Can anybody suggest what is going wrong with this?
We are using SQLGetDiagRec() method to fetch the native error code,
Error message and the SQLSTATE.


Also we are not able to find the native error code list for the MySQL
ODBC 3.51 driver. Can anyone please suggest a clue?

Regards
Narasimha





Confidentiality Notice


The information contained in this electronic message and any attachments
to this message are intended
for the exclusive use of the addressee(s) and may contain confidential
or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.



Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



SQLSTATE mapping problem

2005-02-01 Thread lakshmi.narasimharao

Hi all,




We are using MySQL ODBC 3.51 driver for db connection. When executing an
SQL statement using
SQLExecDirect() function and if there is a syntax error in the SQL
statement, the SQLSTATE returned by the
driver is "23000" (which stands for invalid constraint/duplicate keys.)
instead of "42000" (which stands for syntax error or access violation)
. Like this we are getting different SQLSTATE values for other errors.
Can anybody suggest what is going wrong with this?
We are using SQLGetDiagRec() method to fetch the native error code,
Error message and the SQLSTATE.

Also we are not able to find the native error code list for the MySQL
ODBC 3.51 driver. Can anyone please suggest a clue?




Regards
Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

SubQueries

2005-01-20 Thread lakshmi.narasimharao


Hi,

Could you please help me in writing an equvivalent query in mysql 4.0.21
for  the following oracle subquery?.

update macvm set embedded='Y' where vm_server in
(select a.vm_server from macvm a, component b, element c where
a.vm_server = b.name (+) and b.id = c.id (+) and c.sxvariant = 'I3');


Thanks,

Narasimha









Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



SubQueries

2005-01-20 Thread lakshmi.narasimharao

Hi,

 Thank you. Could you please help me in writing an equvivalent
query in mysql for the following oracle subquery?.



  update macvm set embedded='Y' where vm_server in

  (select a.vm_server from macvm a, component b, element c where
a.vm_server = b.name (+)

   and b.id = c.id (+) and c.sxvariant = 'I3');



Thanks,

Narasimha



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 9:28 PM
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS)
Cc: mysql@lists.mysql.com
Subject: Re: SubQueries




Since 4.0.22 does NOT have subqueries, you will have to use a JOIN 

http://dev.mysql.com/doc/mysql/en/JOIN.html
http://dev.mysql.com/doc/mysql/en/Rewriting_subqueries.html

... as in this example

SELECT PAGE_SERVICE.TIMEOUT
, PAGE_SERVICE.PAGE_SERVICE_COMMENT
, PAGE_SERVICE.NUMERICMSGMAXSIZE
, PAGE_SERVICE.ALPHAMSGMAXSIZE
, PAGE_SERVICE.PASSWORD
, PAGE_SERVICE.PHONE_NO
, PAGE_SERVICE.NAME
, PAGE_SERVICE.PAGE_SERVICE_ID

FROM PAGE_SERVICE
LEFT JOIN PAGER
ON PAGE_SERVICE.PAGE_SERVICE_ID =  PAGER.PAGE_SERVICE_ID
WHERE PAGER.PAGE_SERVICE_ID IS NULL;

... best wishes!
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


<[EMAIL PROTECTED]> wrote on 12/08/2004 09:36:09 AM:

>
> Hi,
>
>  I have a sub query in oracle, I want to convert it into Mysql
> 4.0.21 compatible
>
>
>
>
>SELECT PAGE_SERVICE.TIMEOUT, PAGE_SERVICE.PAGE_SERVICE_COMMENT,
>
>
> PAGE_SERVICE.NUMERICMSGMAXSIZE, PAGE_SERVICE.ALPHAMSGMAXSIZE,
> PAGE_SERVICE.PASSWORD, PAGE_SERVICE.PHONE_NO, PAGE_SERVICE.NAME,
> PAGE_SERVICE.PAGE_SERVICE_ID
>
>FROM PAGE_SERVICE
>
>WHERE NOT EXISTS (SELECT 1 FROM PAGER WHERE
> PAGE_SERVICE.PAGE_SERVICE_ID =  PAGER.PAGE_SERVICE_ID)
>
>WITH CHECK OPTION;
>
>
>
>
>The above query is not displaying all the records whose
> PAGER.PAGE_SERVICE_ID is equal to PAGE_SERVICE.PAGE_SERVICE_ID.
>
>
>
>
>As subqueries are not supporting in mysql, could any one of you
> please give a solution .
>
>
>
>
> Waiting for the reply. Thanks in Advance
>
>
>
>
> Thanks,
>
> Narasimha
>
>
>
>
>
>
>
>
> Confidentiality Notice
>
>
> The information contained in this electronic message and any
> attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain
> confidential or privileged information. If
> you are not the intended recipient, please notify the sender at
> Wipro or [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Regarding replication

2005-01-18 Thread lakshmi.narasimharao

Hi,

 Is replication of database is possible in MySQL 4.0.21?. If not
from which version it is available?. Could any one of you please provide
some helpful information about how to do the replication?.



Thanks,

Narasimha







Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Regarding rowid

2005-01-10 Thread lakshmi.narasimharao

Hi,
What is the equivalent of oracle's rowid (which is a 16digit unique
one) in mysql 4.0.20?. To achieve the same functionality is there any
alternative method in MySQL?. Please help me in this.

Thanks,
Narasimha



Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL database and user creation from script file

2005-01-04 Thread lakshmi.narasimharao

Hi,



I have to create user and database using script file.



My requirements are given below.



1. Login as root



2. Execute the script file for database and user creation.



3. Exit



My script file should have



mysql -u root

create database mnms;

user creation command



The script file will be called in Win batch file and the same batch file
will be executed.



 Thanks,

Narasimha











Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

RE: backup/restore

2005-01-03 Thread lakshmi.narasimharao

Hi,
 Thank you for your reply. Even though I used the --add-drop-table
option, I am getting the error messages. Actually I am taking the backup
for a group of tables as following


D:\Code\OPS\6.9.1.12\NetMgmt\OPS_src\C_src\backupmnms\Debug>mysqldump
-uMNMSDBA -p
MNMSDBA  --databases mnms --add-drop-table --add-locks --disable-keys -f

--tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY
ALARMINFO  >  c:\progra~1\mitel\opsman~1\temp\almhist.dmp


And doing the restoring as

D:\Code\OPS\6.9.1.12\NetMgmt\OPS_src\C_src\backupmnms\Debug>mysql
-uMNMSDBA -pMNMS
DBA  -f mnms  <  c:\progra~1\mitel\opsman~1\temp\almhist.dmp
ERROR 1051 at line 11: Unknown table 'alarm'// Trying to drop alarm
table
ERROR 1050 at line 12: Table 'alarm' already exists //Creating alarm
ERROR 1051 at line 72: Unknown table 'alarm_report' //Drop
alarm_category
ERROR 1050 at line 73: Table 'alarm_report' already exists//Create
ERROR 1062 at line 94: Duplicate entry '1' for key 1 // Insert
ERROR 1062 at line 95: Duplicate entry '4' for key 1 // Insert
ERROR 1062 at line 96: Duplicate entry '5' for key 1  // Insert
ERROR 1062 at line 97: Duplicate entry '8' for key 1 // Insert
ERROR 1062 at line 98: Duplicate entry '10' for key 1 // Insert
ERROR 1062 at line 99: Duplicate entry '11' for key 1 // Insert
ERROR 1062 at line 100: Duplicate entry '13' for key 1 // Insert
ERROR 1062 at line 101: Duplicate entry '15' for key 1 // Insert
ERROR 1062 at line 102: Duplicate entry '16' for key 1 // Insert
ERROR 1062 at line 103: Duplicate entry '17' for key 1 // Insert

Note : ALARM, ALARM_CATEGORY, ALARM_REPORT, ALARM_REPORT_CATEGORY,
ALARMINFO   all belongs to one group.

Alarm and Alarm_category are parent and child tables.

ALARM_REPORT, ALARM_REPORT_CATEGORY are parent and child tables



Please advise me, how to get rid of the above error messages.



Thanks,
Narasimha
-Original Message-
From: Anil Doppalapudi [mailto:[EMAIL PROTECTED]
Sent: Monday, January 03, 2005 7:03 PM
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS);
[EMAIL PROTECTED]
Cc: mysql@lists.mysql.com; [EMAIL PROTECTED]
Subject: RE: backup/restore

Hi,

with which options of mysqldump you have taken backup. if you
use --add-drop-table option then it will add drop table statement in
dump
file. otherwise it wont add that statement and you will get that type of
errors.

if you didn't use that option then drop the schema and then try to
restore
it from backup file.


Thanks
Anil




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, January 03, 2005 12:58 PM
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com; [EMAIL PROTECTED]
Subject: RE: backup/restore



Hi,
 Thank you for your reply. If I have the create table info in my
dump file, while doing the restore using mysql dbname < dump.dmp, I am
getting errors like

mysql  -uMNMSDBA -pMNMSDBA  -f mnms  <
c:\progra~1\mitel\opsman~1\temp\almhist.dmp

ERROR 1050 at line 11: Table 'alarm' already exists
ERROR 1050 at line 40: Table 'alarm_category' already exists
ERROR 1050 at line 70: Table 'alarm_report' already exists
ERROR 1062 at line 91: Duplicate entry '1' for key 1
ERROR 1062 at line 92: Duplicate entry '4' for key 1
ERROR 1062 at line 93: Duplicate entry '5' for key 1
ERROR 1062 at line 94: Duplicate entry '8' for key 1
ERROR 1062 at line 95: Duplicate entry '10' for key 1
ERROR 1062 at line 96: Duplicate entry '11' for key 1
ERROR 1062 at line 97: Duplicate entry '13' for key 1
ERROR 1062 at line 98: Duplicate entry '15' for key 1
ERROR 1062 at line 99: Duplicate entry '16' for key 1
ERROR 1062 at line 100: Duplicate entry '17' for key 1
ERROR 1050 at line 108: Table 'alarm_report_category' already exists
ERROR 1050 at line 137: Table 'alarminfo' already exists
ERROR 1062 at line 155: Duplicate entry '56' for key 1
ERROR 1062 at line 156: Duplicate entry '57' for key 1
ERROR 1062 at line 157: Duplicate entry '58' for key 1
ERROR 1062 at line 158: Duplicate entry '59' for key 1
ERROR 1062 at line 159: Duplicate entry '75' for key 1
ERROR 1062 at line 160: Duplicate entry '76' for key 1
ERROR 1062 at line 161: Duplicate entry '77' for key 1


Please advise me, how to suppress the above error messages.

While taking backup used

mysqldump  -uMNMSDBA -pMNMSDBA  --databases mnms --add-locks
--disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT
ALARM_REPORT_CATEGORY ALARMINFO   >
c:\progra~1\mitel\opsman~1\temp\almhist.dmp


Please help me in this.

Thanks,
Narasimha



-Original Message-
From: Tom Crimmins [mailto:[EMAIL PROTECTED]
Sent: Monday, January 03, 2005 10:55 AM
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS)
Cc: mysql@lists.mysql.com
Subject: RE: backup/restore

[snip]
I am doing backup for tables using Mysqldump. But while doing the
restore I
am not able to do that using the same Mysqldump. Could you please help
me in
that.
[/snip]

mysqldump is not intended to be used for the restore.

You need to run the following:

mysql -D dbname < mys

RE: backup/restore

2005-01-02 Thread lakshmi.narasimharao

Hi,
 Thank you for your reply. If I have the create table info in my
dump file, while doing the restore using mysql dbname < dump.dmp, I am
getting errors like

mysql  -uMNMSDBA -pMNMSDBA  -f mnms  <
c:\progra~1\mitel\opsman~1\temp\almhist.dmp

ERROR 1050 at line 11: Table 'alarm' already exists
ERROR 1050 at line 40: Table 'alarm_category' already exists
ERROR 1050 at line 70: Table 'alarm_report' already exists
ERROR 1062 at line 91: Duplicate entry '1' for key 1
ERROR 1062 at line 92: Duplicate entry '4' for key 1
ERROR 1062 at line 93: Duplicate entry '5' for key 1
ERROR 1062 at line 94: Duplicate entry '8' for key 1
ERROR 1062 at line 95: Duplicate entry '10' for key 1
ERROR 1062 at line 96: Duplicate entry '11' for key 1
ERROR 1062 at line 97: Duplicate entry '13' for key 1
ERROR 1062 at line 98: Duplicate entry '15' for key 1
ERROR 1062 at line 99: Duplicate entry '16' for key 1
ERROR 1062 at line 100: Duplicate entry '17' for key 1
ERROR 1050 at line 108: Table 'alarm_report_category' already exists
ERROR 1050 at line 137: Table 'alarminfo' already exists
ERROR 1062 at line 155: Duplicate entry '56' for key 1
ERROR 1062 at line 156: Duplicate entry '57' for key 1
ERROR 1062 at line 157: Duplicate entry '58' for key 1
ERROR 1062 at line 158: Duplicate entry '59' for key 1
ERROR 1062 at line 159: Duplicate entry '75' for key 1
ERROR 1062 at line 160: Duplicate entry '76' for key 1
ERROR 1062 at line 161: Duplicate entry '77' for key 1


Please advise me, how to suppress the above error messages.

While taking backup used

mysqldump  -uMNMSDBA -pMNMSDBA  --databases mnms --add-locks
--disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT
ALARM_REPORT_CATEGORY ALARMINFO   >
c:\progra~1\mitel\opsman~1\temp\almhist.dmp


Please help me in this.

Thanks,
Narasimha



-Original Message-
From: Tom Crimmins [mailto:[EMAIL PROTECTED]
Sent: Monday, January 03, 2005 10:55 AM
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS)
Cc: mysql@lists.mysql.com
Subject: RE: backup/restore

[snip]
I am doing backup for tables using Mysqldump. But while doing the
restore I
am not able to do that using the same Mysqldump. Could you please help
me in
that.
[/snip]

mysqldump is not intended to be used for the restore.

You need to run the following:

mysql -D dbname < mysqldumpfile

You may have to specify a user and password as well, depending on your
setup.

---
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa


-Original Message-
Hi,

   I am doing backup for tables using Mysqldump. But while doing the
restore I am not able to do that using the same Mysqldump. Could you
please
help me in that.




For backup : using   Mysqldump -databases  ---tables table1
table2 > dump.dmp

For restore : used  Mysqldump -databases  < dump.dmp




In the above, I am not able to restore the data.




Please help us for a good solution.




Thanks,

Narasimha





Confidentiality Notice


The information contained in this electronic message and any attachments
to
this message are intended for the exclusive use of the addressee(s) and
may
contain confidential or privileged information. If you are not the
intended
recipient, please notify the sender at Wipro or [EMAIL PROTECTED]
immediately and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



backup/restore

2005-01-02 Thread lakshmi.narasimharao

Hi,

   I am doing backup for tables using Mysqldump. But while doing the
restore I am not able to do that using the same Mysqldump. Could you
please help me in that.



For backup : using   Mysqldump -databases  ---tables table1
table2 > dump.dmp

For restore : used  Mysqldump -databases  < dump.dmp



In the above, I am not able to restore the data.



Please help us for a good solution.



Thanks,

Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

auto commit

2004-12-31 Thread lakshmi.narasimharao

Hi All,



I am using ODBC interface to access MySQL database. All DML oparations
like insert, update and delete are performed using ODBC API's (  C
program and ODBC API's).



We start the transaction in the following order.



1.create savepoint a

2. do dml operation

3. commit if dml is success else rollback upto savepoint.



In the above sequence we need to set autocommit= 0. This we executed in
mysql prompt.



How can we set autocommit = 0 feature in  ODBC interface before doing
any DML operation?









Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Query

2004-12-29 Thread lakshmi.narasimharao

Hi all,



We are using MySQL 4.0.21 with MyODBC connectivity. We are getting a
crash when attempting to perform batch fetch

using SQLFetchScroll() funciton. Since the function is a generic one for
which we have defined a global variable

(a two dimentional void* array to hold the field values for multiple
rows as void *ResultSet[MAX_FIELDS][MAX_ROWS])

and binding the columns to the result set array by allocating enough
memory and typecasting to the coresponding type.

Then we execute the statement and tries to retrieves values using
fetchscroll funciton.We are getting a crash here.

We have tried even without using the void pointer and using the
appropriate data type array instead. Still we observed the crash.

Can anyobody help us in identifying the root cause. The source code is
attached below.



Regards,

Narasimha



int ExecuteBatchFetchStatement(char *sqlStmt, int iViewIndex,int
dbConnectionID,int numRows)

{

   tupleFldDesc_t *tupleFldDesc;

   SQLHSTMT hstmt;

   SQLRETURN retcode;

   SQLINTEGER intArr1[100],intArr2[100];

   SQLCHAR charArr[100][21];

   int iCount,NumberOfRows,dataTypeSize; //,  size;

   void *fieldType=NULL;

   SQLSMALLINT datType;

   NumberOfRows = 100;

   retcode = SQLAllocHandle(SQL_HANDLE_STMT,
hdbcArray[dbConnectionID], &hstmt);

   if (!(retcode == SQL_SUCCESS || retcode ==
SQL_SUCCESS_WITH_INFO))

   return FALSE;  



   SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_BIND_TYPE, SQL_BIND_BY_COLUMN,
0);

   SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_ARRAY_SIZE, &NumberOfRows, 0);

   SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_STATUS_PTR, rowStatusArray,
0);

   SQLSetStmtAttr(hstmt, SQL_ATTR_ROWS_FETCHED_PTR, &numRowsFetched,
0);



   SQLBindCol(hstmt, 1, SQL_C_SLONG,&intArr1,0,
fieldSizeArray[iCount]);

   SQLBindCol(hstmt, 2, SQL_C_SLONG,&intArr2,0,
fieldSizeArray[iCount]);

   SQLBindCol(hstmt, 3, SQL_C_CHAR,charArr,21,
fieldSizeArray[iCount]);



   strcpy(sqlStmt,"SELECT a.ID, a.TYPE, a.NAME FROM COMPONENT a
ORDER BY  a.NAME  LIMIT 1;");

   retcode = SQLExecDirect(hstmt,(SQLCHAR *)sqlStmt,
strlen(sqlStmt));

   if (retcode == SQL_ERROR || retcode == SQL_INVALID_HANDLE ||
retcode == SQL_NEED_DATA || retcode == SQL_NO_DATA_FOUND)

  return FALSE;

   retcode = SQLFetchScroll(hstmt,SQL_FETCH_NEXT,0); -->Observed
crash here



   while ((retcode = SQLFetchScroll(hstmt,SQL_FETCH_NEXT,0)) !=
SQL_NO_DATA)

  iCount++;



   SQLCloseCursor(hstmt);

   SQLFreeHandle(SQL_HANDLE_STMT, hstmt);

   return TRUE;

}





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

RE: Regarding User creation and loading data

2004-12-22 Thread lakshmi.narasimharao

Hi,
   Thank you for your reply. When I log in as a DBA user and try to load
data from a file, I am getting an error as "Access Denied", so, here I
want to know what type of permissions I have to give for a user to load
data infile form a file.

Thanks,
Narasimha

-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 22, 2004 1:35 AM
To: mysql@lists.mysql.com
Subject: Re: Regarding User creation and loading data

Hello.

What error have you got? Send us compete command that you issued and
the error message.
>Could any one of you help me in creating two users like First user with
>all dba privileges as root and the Second user with only dml
operations.

For root user use:
 grant all privileges on *.* to 'vasja'@'vasinhost' identified by
'vasinpass' with grant option;

For dml user use something like this:
   grant select,insert,update,delete on test.* to 'dml'@'localhost'
identified by 'v';
See:
  http://dev.mysql.com/doc/mysql/en/GRANT.html


>And in loading data using LOAD DATA INFILE, if I use the file full
path,
>I am getting error. And if I put the file in mysql\bin it is executing.
>How to load a dta in a file which is located in some other directories.


--
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Regarding User creation and loading data

2004-12-20 Thread lakshmi.narasimharao

Hi,



Could any one of you help me in creating two users like First user with
all dba privileges as root and the Second user with only dml operations.



And in loading data using LOAD DATA INFILE, if I use the file full path,
I am getting error. And if I put the file in mysql\bin it is executing.
How to load a dta in a file which is located in some other directories.



Thanks,

Narasimha











Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

RE: User variables

2004-12-13 Thread lakshmi.narasimharao

Hi,
 Set the value as

  SET @SoftwareID:=7;

Now, use

  WHERE
s.softwareID = @SoftwareID  at the end of your query.

Thanks,
Narasimha

-Original Message-
From: Erich Beyrent [mailto:[EMAIL PROTECTED]
Sent: Monday, December 13, 2004 8:30 PM
To: [EMAIL PROTECTED]
Subject: User variables

I am having a problem with a query:

SET @SoftwareID = 7;

SELECT
s.softwareID,
s.softwareName,
s.softwareVersion,
s.softwareCreated,
s.softwareChanged,
b.buildName,
s.supportFlag,
s.softwareDesc,
s.softwareLicense,
s.softwareLocations,
s.softwareProductKey,
p.platformName,
v.vendorName,
v.vendorURL
FROM
software s
INNER JOIN platform_groups pg
on s.softwareID = pg.softwareID
INNER JOIN platforms p
on pg.platformID = p.platformID
INNER JOIN vendors v
on s.vendorID = v.vendorID
INNER JOIN builds b
on s.buildTypeID = b.buildTypeID
WHERE
s.softwareID = @SoftwareID


This does not work.  It appears that the user variable is not picked up
in
the WHERE clause - the query works fine if I have:

WHERE s.softwareID = 7


Is what I am trying to do not supported?  I am using version 4.1.7 on
FreeBSD 5.3.

Best regards,

Erich Beyrent


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Help Required!

2004-12-13 Thread lakshmi.narasimharao

Hi,

I am building the insert string for inserting into particular table t1
using C program. The below string is stored in a variable.

say sqlstmt = 'INSERT INTo T1 values(:id,:ename);'

The values for the field's id, name will come from the front end. The
sql string will be executed using Pro *C in Oracle. Pro *C can get the
values of Id and ename fields which are initialized in the C program and
can execute the sql statement in Oracle database. The record got
inserted successfully.

Can we get the MySQL Equivalent so that we can use the same in our C
program? Do we have bind variable or host variable concepts in MySQL?

In MySQL prompt we tried with @, i.e. set the values of id,
ename as set @id = 10, @ename = 'Sample'; Next we used the below command
and it worked fine.
   Insert into t1 values(@id,@ename).


Can we use the same "@" for the binding values in "C' Program for mysql
so that it substitutes the value of fields?

Thanks for help in advance. Please help.

Regards,

Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Building C string for Insert!!

2004-12-13 Thread lakshmi.narasimharao

Hi,

I am building the insert string for inserting into particular table t1
using C program. The below string is stored in a variable.

say sqlstmt = 'INSERT INTo T1 values(:id,:ename);'

The values for the field's id, name will come from the front end. The
sql string will be executed using Pro *C in Oracle.

Can we get the MySQL Equivalent so that we can use the same in our C
program? Do we have bind variable or host variable concepts in MySQL?

In MySQL tried with @, i.e set the values of id, ename as
@id = 10, @ename = 'Sample' after that used

 Insert into t1 values(@id,@ename). This worked
fine.  Can we use the same "@" for the binding values in "C' Program for
mysql?.

Thanks for help in advance.

Regards,

Narasimha









Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Building C string for Insert!!

2004-12-13 Thread lakshmi.narasimharao

I am building the insert string for inserting into particular table t1
using C program. The below string is stored in a variable.

say sqlstmt = 'INSERT INTo T1 values(:id,:ename);'

The values for the field's id, name will come from the front end. The
sql string will be executed using Pro *C in Oracle.

Can we get the MySQL Equivalent so that we can use the same in our C
program? Do we have bind variable or host variable concepts in MySQL?

Thanks for help in advance.

 Regards,

Narasimha









Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

RE: Regarding Connection Context

2004-12-11 Thread lakshmi.narasimharao

Hi,
  Thanks for your reply.

   A runtime context, usually simply called a context, is a handle to a
an area in client memory which contains zero or more connections, zero
or more cursors, their inline options (such as MODE, HOLD_CURSOR,
RELEASE_CURSOR, SELECT_ERROR, and so on.) and other additional state
information.

To define a context host variable use pseudo-type sql_context.

For example:
sql_context my_context

Use the CONTEXT ALLOCATE precompiler directive to allocate and
initialize
memory for a context:

EXEC SQL CONTEXT ALLOCATE :context ;

where context is a host variable that is a handle to the context. For
example:

EXEC SQL CONTEXT ALLOCATE :my_context ;

Use the CONTEXT USE precompiler directive to define which context is to
be used by the embedded SQL statements (such as CONNECT, INSERT, DECLARE

CURSOR, and so on.) from that point on in the source file, not in the
flow of program logic. That context is used until another CONTEXT USE
statement is encountered. The syntax is:

EXEC SQL CONTEXT USE {:context | DEFAULT} ;

The keyword DEFAULT specifies that the default (also known as global)
context is to be used in all the embedded SQL statements that are
executed subsequently, until another CONTEXT USE directive is
encountered. A simple example is:

EXEC SQL CONTEXT USE :my_context ;

If the context variable my_context has not been defined and allocated
already, an error is returned.

The CONTEXT FREE statement frees the memory used by the context after it
is no longer needed:

EXEC SQL CONTEXT FREE :context ;

An example is:

EXEC SQL CONTEXT FREE :my_context ;


Please let me know if there is any alternative in MySQL for the above.

Thanks in Advance.

Thanks,
Narasimha


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Shankar Unni
Sent: Saturday, December 11, 2004 3:18 AM
To: [EMAIL PROTECTED]
Subject: Re: Regarding Connection Context

[EMAIL PROTECTED] wrote:

> CONTEXT USE Example:

Do *you* really understand what this feature is supposed to do? Can you
explain it to us in (low-level) detail?

No, MySQL doesn't have a feature like this.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Regarding Connection Context

2004-12-09 Thread lakshmi.narasimharao



Hi ALL,

CONTEXT USE Example:

#include 
#include 
main()
{
sql_context ctx1;
char *usr1 = "scott/tiger";

EXEC SQL CONTEXT ALLOCATE :ctx1; //Create Context
EXEC SQL CONTEXT USE :ctx1; // Use Context
EXEC SQL CONNECT :usr1;
EXEC SQL CONTEXT USE DEFAULT;
EXEC SQL INSERT INTO emp (empno, ename) VALUES (1234, 'WALKER');
}

The above code connects to Oracle database using the context.

Can we do similar stuff in MySQL 4.0.21 version? Did MySQL support the
usage of Context while
connecting to the database?

Please help. I need to connect to MySQL database using C program with
context.

Thanks,
Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Please put this question in MySQL

2004-12-09 Thread lakshmi.narasimharao

Hi ALL,



CONTEXT USE Example:


#include 
#include 
main()
{
sql_context ctx1;
char *usr1 = "scott/tiger";




EXEC SQL CONTEXT ALLOCATE :ctx1; //Create Context
EXEC SQL CONTEXT USE :ctx1; // Use Context
EXEC SQL CONNECT :usr1;
EXEC SQL CONTEXT USE DEFAULT;
EXEC SQL INSERT INTO emp (empno, ename) VALUES (1234, 'WALKER');
}



The above code connects to Oracle database using the context.
Can we do similar stuff in MySQL 4.0.21 version? Did MySQL support the
usage of Context while
connecting to the database?



Please help. I need to connect to MySQL database using C program with
context.



Thanks,

Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

SubQueries

2004-12-08 Thread lakshmi.narasimharao

Hi,

 I have a sub query in oracle, I want to convert it into Mysql
4.0.21 compatible



   SELECT PAGE_SERVICE.TIMEOUT, PAGE_SERVICE.PAGE_SERVICE_COMMENT,

PAGE_SERVICE.NUMERICMSGMAXSIZE, PAGE_SERVICE.ALPHAMSGMAXSIZE,
PAGE_SERVICE.PASSWORD, PAGE_SERVICE.PHONE_NO, PAGE_SERVICE.NAME,
PAGE_SERVICE.PAGE_SERVICE_ID

   FROM PAGE_SERVICE

   WHERE NOT EXISTS (SELECT 1 FROM PAGER WHERE
PAGE_SERVICE.PAGE_SERVICE_ID =  PAGER.PAGE_SERVICE_ID)

   WITH CHECK OPTION;



   The above query is not displaying all the records whose
PAGER.PAGE_SERVICE_ID is equal to PAGE_SERVICE.PAGE_SERVICE_ID.



   As subqueries are not supporting in mysql, could any one of you
please give a solution .



Waiting for the reply. Thanks in Advance



Thanks,

Narasimha







Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Backup and Restore

2004-12-05 Thread lakshmi.narasimharao

Hi All,



I need to backup and restore MySQL database using ODBC from my client
machine. My database is in the remote server.

I am building my backup command using C program.



Example: My backup will have the following.



Mysqldump -h host name -u username -p password  --databases  > dump.dmp



My doubts are as follows.



1.  How to take the backup and restore from the client machine using
ODBC?
2.  If I have connection already established using ODBC, can I run
the Mysqldump command with the connection id? If yes, do let me know the
solution.





Pl let me know the solution.



Regards,

Narasimha






Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

RE: Indices and Constraints.

2004-12-02 Thread lakshmi.narasimharao

Hi,
Thank you. But I want select the constraints and indices used on the
table. How can we get this information?. Please help me in this.

Thanks,
Narasimha

-Original Message-
From: Ian Sales [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 02, 2004 5:07 PM
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS)
Cc: [EMAIL PROTECTED]
Subject: Re: Indices and Constraints.

[EMAIL PROTECTED] wrote:

>Need to know the similar one in MySQL. Do we have views or any other
>system tables in MySQL 4.0.21 which OUTPUTS  the constraints and
indices
>in a particular table?
> 
>
- show indexes from DATABASE_NAME.TABLE_NAME

- or, show create table DATABASE_NAME.TABLE_NAME;

- ian



Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Indices and Constraints.

2004-12-02 Thread lakshmi.narasimharao

Hi All,



In oracle I can query user_constraints, user_indexes for getting the
constraints and indices for a particular table.

User_constraints and user_idexes are view which holds all the
constraints and indices for a particular table.



Need to know the similar one in MySQL. Do we have views or any other
system tables in MySQL 4.0.21 which OUTPUTS  the constraints and indices
in a particular table?



Please reply ASAP.



Regards,

Narasimha

Ver: MYSQL 4.0.21





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

RE: Reg SubQuery

2004-12-01 Thread lakshmi.narasimharao

Hi,
Thanks for the reply. The main aim is to select the first record or
the last record. Is there any direct command for these. Please help me
in this.

Thanks,
Narasimha



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 01, 2004 7:30 PM
To: [EMAIL PROTECTED]
Subject: RE: Reg SubQuery
Importance: High

Or.. Select * from emp order by id asc limit 0,1 if you want to  fetch
all details.

-Original Message-
From: Jason McKnight [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 01, 2004 7:21 PM
To: [EMAIL PROTECTED]
Subject: Re: Reg SubQuery

You could also do it like this:

select min(id) from emp;


Roger Baklund wrote:

> [EMAIL PROTECTED] wrote:
>
>> I need to get all the details of an employee whose salary is the
lowest.
>> I can do like this in Oracle
>>
>>
>> select * from emp where id = (select min(id) from emp).
>>
>>
>> Can we have any alternative in MySQL for the above query, as sub
>> queries are not supported in MySQL 4.0.21
>
>
> There is no need for a subquery in this case:
>
> select * from emp order by id limit 1;
>


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Reg SubQuery

2004-11-30 Thread lakshmi.narasimharao



Hi,



I need to get all the details of an employee whose salary is the lowest.
I can do like this in Oracle



select * from emp where id = (select min(id) from emp).



Can we have any alternative in MySQL for the above query, as sub queries
are not supported in MySQL 4.0.21



Regards,

Narasimha











Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Diffrence between MySQL 4.0.21 and MySQL 4.0.17

2004-11-25 Thread lakshmi.narasimharao

Hi,
 Is there any functional differences between 4.0.21 and 4.0.17?.
Please help me in knowing it.

Thanks,
Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Reg Table spaces and Rollback segments in MySQL 4.0.21

2004-11-18 Thread lakshmi.narasimharao

Hi ALL,
We are using MySQL 4.0.21 with InnoDB. For creating the
tablespace mentioned as innodb_data_file_path = ibdata1:10M:autoextend
in my.cnf file. Here, is there a facility to know the table space name?.
Shall we create multiple table spaces like the  above in MySQL 4.0.21
and assign different tables to different table spaces?.

Actually if we set autocommit=0, we are able to do the perform rollback
and commit and is working as expected in different sessions. I think
rollback segments are creating internally. Is there any facility to
mention the rollback segment size?. Shall we create our own rollback
segments in MYSQL 4.0.21?

PS: Whenever Oracle Database is created Rollback segments were created
in the "System" tablespace". Also, have the option of creating more
Rollback segments in the non system tablespace.  Do we have the same
facility in MySQL 4.0.21?

Please advise us for the solution.

Thanks,
Narasimha



Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Database Connection using DSN

2004-11-05 Thread lakshmi.narasimharao

Hi,
 Thank you for your reply.

After establishing a connection to the Database using ODBC API, can we
use the mysql API's like "mysql_query()" instead of using MyODBC API's.

Thanks in Advance.

Regards,
Narasimha

-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 04, 2004 11:00 PM
To: [EMAIL PROTECTED]
Subject: Re: Database Connection using DSN

Hi.
See:
 http://dev.mysql.com/doc/mysql/en/ODBC_Connector.html

When you call mysql_real_connect you use mysqlclient library,
which connects to server directly (you don't need to configure ODBC).
To connect using DSN, you should use ODBC API. ODBC and MySQL
are completly different things. MySQL - database system, and
ODBC is an interface to interact with different databases.


[EMAIL PROTECTED] wrote:
>
>
>
> Hi,
>  I would like to know how to connect to the mysql database using a
> DSN in mysql API's. I am using myodbc 3.51 driver.
>
> Used the following API code for the connection
>
> MYSQL *link  =3D mysql_init(NULL);
> MYSQL *connectHandle =3D
> mysql_real_connect(link,"localhost","root","","test",0,NULL,0);
>
> But this is not having the option for specifying the DSN or Driver.=0D
> Please provide me the solution.
>
>
> Thanks,
> Narasimha
>
>
> Confidentiality Notice=0D
>
> The information contained in this electronic message and any
attachments to=
> this message are intended
> for the exclusive use of the addressee(s) and may contain confidential
or=
> privileged information. If
> you are not the intended recipient, please notify the sender at Wipro
or=
> [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.
>


--
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Database Connection using DSN

2004-11-04 Thread lakshmi.narasimharao



Hi,
  I would like to know how to connect to the mysql database using a
DSN in mysql API's. I am using myodbc 3.51 driver.

Used the following API code for the connection

MYSQL *link  = mysql_init(NULL);
MYSQL *connectHandle =
mysql_real_connect(link,"localhost","root","","test",0,NULL,0);

But this is not having the option for specifying the DSN or Driver.
Please provide me the solution.


Thanks,
Narasimha


Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Mysql Sysem files and packages

2004-10-28 Thread lakshmi.narasimharao

Hi,
 I am doing a dbconversion form oracle to mysql.

I would like to know the equivivalents in mysql for
1) Parameter file like init.ora in oracle
2) system package like diutil in oracle


Thanks,
Narasimha




Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Sequences and Synomyms

2004-10-19 Thread lakshmi.narasimharao


Hi,
I am new to mysql. I want to create sequences in mysql 4.0 which
should be equivalent to oracle sequences. I gone through the mysql
manual, Auto_Increment(), C API mysql_insert_id() and LAST_INSERT_ID()
are there for sequences. Last_insert_id() gives the last value.
I want actual migration to mysql for the following oracle statements

create sequence msdba.msuser_sequence maxvalue 1 cycle order;
msuser_sequence.currval
select msuser_sequence.nextval from dual;
grant all on msuser_sequence to msuser;

Could you please suggest how to do it.

And also I want to create synonym in mysql for the following oracle
statement

create synonym msuser.ms_sequence for msdba.msuser_sequence;

Please help me in this.

Thanks,
Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Sequences and Synomyms

2004-10-19 Thread lakshmi.narasimharao

Hi,
I am new to mysql. I want to create sequences in mysql 4.0 which
should be equivalent to oracle sequences. I gone through the mysql
manual, Auto_Increment(), C API mysql_insert_id() and LAST_INSERT_ID()
are there for sequences. Last_insert_id() gives the last value.
I want actual migration to mysql for the following oracle statement
create sequence msdba.ms_sequence maxvalue 1 cycle order;

Could you please suggest how to do it.

And also I want to create synonym in mysql for the following oracle
statement

create synonym msuser.ms_sequence for msdba.msuser_sequence;

Please help me in this.

Thanks,
Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



offer

2004-10-19 Thread lakshmi.narasimharao

Hi,
 I need a person who worked on oracle and mysql for a PCMM Level
company in Bangalore, India on a contract basis for 4 months. If any one
is interested please forward the resume asap. Min 3 years exp is
required. It is a very urgent requirement.

Thanks,
Narasimha




Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



User Defined functions

2004-10-14 Thread lakshmi.narasimharao

Hi,
  How to call a user defined function. I am using C as the programming 
language. I write a small function in C. Created .dll. Then how to run it from mysql 
pompt?. How to call or use it?. will any one of you help me in this.
 
Thanks,
Narasimha

-Original Message- 
From: Aftab Jahan Subedar [mailto:[EMAIL PROTECTED] 
Sent: Mon 9/6/2004 1:14 AM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Re: Help needed with MySQL C API-based client (segfault)



have you tried ?
http://www.geocities.com/jahan.geo/mysql_c_by_example.html

Ruben Safir Secretary NYLXS wrote:

> On Fri, Sep 19, 2003 at 09:18:22AM +0500, Vikram Vaswani wrote:
>
>>Hello,
>>
>>I need to write a simple C client for a project. I am using the MySQL C
>>API. Attached is the code. It occassionally segfaults with no visible
>>pattern. Could someone help me figure out why? Or any other comments on the
>>code to help me make it better?
>
>
> You know, I used to read this mailing list religiously before it became
> flooded with W32 questions and PHP users.  And I've stay susbscribed
> but I haven't posted to it in many many months.  iIn fact, I didn't notice
> I wasn't any longer subscribed.   So I'm writing this application in C
> and GTK and I was thinking, it's finally time to learn to write some MYSQL
> C API stuff.
>
> I've written a lot of Oracle C programs in years past.  And now I'm looking
> at the C API stuff and wow, it is not readly understandable.  I open up
> the mysql mail file with mutt, and bang, this is on the top!
>
> I was going to ask the list if anyone has an exmaple of the basic needs
> for a MYSQL program which makes a connection, sends a querry.  Checks the
> potention errors, and maps the most basic column types to C types.
>
> The docs say to look at examples in the source directory, but those
> aren't yet clear to me to understand.
>
>
> Ruben
>
>
>>/* client.c */
>>
>>#include 
>>#include 
>>
>>int main()
>>{
>>/* declare
>>structures and variables */
>>  char query[255];
>>  int i, j, count;
>>
>>MYSQL mysql;
>>MYSQL_RES *result;
>>MYSQL_ROW row;
>>  MYSQL_FIELD
>>*field;
>>
>>/* initialize MYSQL structure */
>>
>>mysql_init(&mysql);
>>
>>/* connect to database */
>>if
>>(!(mysql_real_connect(&mysql, NULL, "root", "", "db1", 0, NULL, 0)))
>>
>> {
>>fprintf(stderr, "Error in connection: %s\n",
>>mysql_error(&mysql));
>>}
>>
>>for( ;; )
>>  {
>>
>>printf("query? ");
>>  gets(query);
>>  if (strcmp(query,"exit")
>>== 0)
>>  {
>>  break;
>>  }
>>
>>  /* execute query
>>*/
>>  /* if error, display error message */
>>  /* else check the type of
>>query and handle appropriately */
>>  if (mysql_query(&mysql, query) != 0)
>>
>>{
>>  fprintf(stderr, "Error in query: %s\n", 
mysql_error(&mysql));
>>  }
>>
>>else
>>  {
>>  if (result = mysql_store_result(&mysql))
>>  {
>>  /* SELECT
>>query */
>>  /* retrieve result set */
>>  int numRecords =
>>mysql_num_rows(result);
>>  int numFields = mysql_num_fields(result);
>>
>>for (i = 0; i < numRecords; i++)
>>  {
>>  row =
>>mysql_fetch_row(result);
>>
>>  for (j = 0; j < numFields; j++)
>>  {
>>
>>//field= mysql_fetch_field(result);
>>  fprintf(stdout, "%s", row[j]);
>>
>>  j != (numFields-1) ? printf(", ") : printf("\n");
>>  }
>>  }
>>
>>fprintf(stdout, "** Query successful, %d rows retrieved **\n",
>>numRecords);
>> 

RE: Migrating from Oracle to mySql [online stats]

2004-10-05 Thread lakshmi.narasimharao

Hi,
I am also doing migration from oracle 7.3 to mysql 4.0 classic. 
 
May i know how to handle Oracle Views, stored procedures/triggers in MySQL 4.0 ?.
 
May i know how to create database, table space, roll back segments, users, allocating 
tables to table spaces (as we do in oracle) in mysql 4.0 with out innodb?.
 
Can we write into multiple tables in mysql 4.0?. If so how?.
 
I have a backup to my database, after that i added some new columns to some tables and 
created one more new table. Now, i want to restore the old data without distrubing the 
new changes. Could you please help me how to do this in mysql?.
 
Thanks,
Narasimha
 
 
 
 

-Original Message- 
From: martin fasani [mailto:[EMAIL PROTECTED] 
Sent: Tue 10/5/2004 4:32 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Migrating from Oracle to mySql [online stats]




First of all a kind salute to the master yoda of SQL query's Shawn Green :)
He saved me a couple of hours the other day with a linking a table to itself
query !
I've been in the Telecommunications industry for more than 2 years now. I
hope that I can provide feedback any questions regarding DB
knowledge/query's in this area for this list.

Now to the point. I'm researching how to do another query that I 've in the
Oracle DB on pl/SQL.

The task is to provide a report based on the call origin. We get last 4
numbers of each call origin and from that we can determine where the call
was originated (in spain: 6% is mobile, 913% is madrid, and so on). My
mission is to create something that will use the less possible resources for
each query.
This is IMDTAB:
++---+--+++-
---++
| IMDFLL | IMD906| IMDTER   | IMDTAR | IMDDUR |
IMDORI | IMDCLI |
++---+--+++-
---++
| 2004-08-01 | 80xxx |913xx | R  |  2.280 |
6277 | 01 |
| 2004-08-01 | 80xxx |913xx | R  |  2.650 |
6290 | 01 |
| 2004-08-01 | 80xxx |913xx | R  |  8.3166670 |
9710 | 01 |

In Oracle using PL /Sql I 've a select that looks like this:

SELECT GRUPO_ORI(IMDTAB.IMDORI) AS ORI, COUNT(IMDTAB.IMDORI) AS CLL FROM
IMDTAB 
WHERE
 (IMDTAB.IMRCLI =01 AND (IMD906=80xxx )) AND (IMDTAB.IMDFLL =
'@date1' )
 GROUP BY IMDTAB.IMDCLI,GRUPO_ORI(IMDTAB.IMDORI)

And this is the GRUPO_ORI function:

FUNCTION "GRUPO_ORI" (ORI IN IMDTAB.IMDORI%TYPE)
RETURN VARCHAR2
IS
STRORI CLITAB.CLIPOB%TYPE;
GRPORI CLITAB.CLIPOB%TYPE;
BEGIN
  STRORI := To_Char(ORI);
  GRPORI := SUBSTR(STRORI,1,1);
  IF GRPORI = '6' THEN
   return GRPORI;
  END IF;

  GRPORI := SUBSTR(STRORI,1,2);
  IF GRPORI = '91' OR GRPORI = '93'  THEN
   return GRPORI;
  END IF;

  GRPORI := SUBSTR(STRORI,1,3);
  IF GRPORI = '920' OR GRPORI = '921' OR GRPORI = '922' OR GRPORI = '923' OR
GRPORI = '924'
  OR GRPORI = '925' OR GRPORI = '926' OR GRPORI = '927' OR GRPORI = '928' OR
GRPORI = '941'
  OR GRPORI = '942' OR GRPORI = '943' OR GRPORI = '945' OR GRPORI = '947' OR
GRPORI = '948'
  OR GRPORI = '949' OR GRPORI = '950' OR GRPORI = '953' OR GRPORI = '956' OR
GRPORI = '957'
  OR GRPORI = '958' OR GRPORI = '959' OR GRPORI = '964' OR GRPORI = '967' OR
GRPORI = '968' 
  OR GRPORI = '969' OR GRPORI = '971' OR GRPORI = '972' OR GRPORI = '973' OR
GRPORI = '974' 
  OR GRPORI = '975' OR GRPORI = '976' OR GRPORI = '977' OR GRPORI = '978' OR
GRPORI = '979' 
  OR GRPORI = '980' OR GRPORI = '981' OR GRPORI = '982' OR GRPORI = '983' OR
GRPORI = '986' 
  OR GRPORI = '986' OR GRPORI = '987' OR GRPORI = '988'
  THEN
   return GRPORI;
  END IF;
  return 'Another';
END GRUPO_ORI;

I was thinking in doing this by query, striping the IMDORI to 3 numbers, but
I 've also as seen in the code copied above also 1 number, and 2 numbers
zone identifiers.
Also I can build a table with this instead of doing all the IF's, and join
depending on the starting numbers, but looks rather complicated and I think
the query might use a lot of DB power (and as described, I want to use the
less possible resources taking in account this is a CALL BY CALL table with
***lots*** of rows)

So wh

Reg Database creation

2004-10-05 Thread lakshmi.narasimharao

Hi,
 How to create database in mysql 4.0 with out classic. What i mean is
 
1. How to create database
2. How to create users and hhow to give privilages to them
3. How to create table space 
4. How to create rollback segment
5. How to allocate tables to table space
 
 
Please help me in doing all the above in mysql 4.0.
 
Thanks,
Narasimha



Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


Inserting/Updating data into/on multiple tables

2004-10-05 Thread lakshmi.narasimharao

Hi,
 In mySQL: 4.0 with out innodb, is there any facility/command to write data 
into mutiple tables at a time?.
 
Thanks,
Narasimha



Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


RE: Reg REstore

2004-10-05 Thread lakshmi.narasimharao

Hi, 
I want to restore the database from the back up of the database taken using 
mysqldump. 
I took the backup into a .sql file of my wholw database. Now, i want to run that sql 
file, i.e i want to recreate the tables/data of that database from the backup of .sql 
file. How to do this?. Is mysqldump uses for restoring also. I think it is only for 
backup. Please clarify me here.
 
Thanks,
Narasimha

-Original Message- 
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Sent: Tue 10/5/2004 9:14 AM 
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) 
Cc: 
Subject: Re: Reg REstore



1) don't -- repeat, DON'T -- CC this to the internals list. This is
so *not* appropriate. This is a trivial -- repeat, TRIVIAL -- usage
question.

2) RTFM. Your question is answered here:



> Any one can help me how to
 > restore the back up database?.

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

   dream.  code.







Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


Reg REstore

2004-10-04 Thread lakshmi.narasimharao

Hi,
  Thank you backup is working fine. Any one can help me how to restore the back up 
database?. Not at table level. At the database level. How to run a sql file from mysql 
prompt?. While restoring any more things to be taken care, regarding database?.
 
Thanks,
NARasimha
   

-Original Message- 
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Sent: Mon 10/4/2004 10:38 PM 
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) 
Cc: 
Subject: Re: Reg Backup



[EMAIL PROTECTED] wrote:

> That i donot know, that is what i want to know, is mysqldump works fine
> with MyISM in windows for backup?. Please confirm.

Yes, it works fine. And if you're concerned about Windows and you
have a copy running, it wouldn't be that hard to test, eh? :-)

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

   dream.  code.







Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


RE: Reg Backup

2004-10-04 Thread lakshmi.narasimharao

mysqlhotocpy supports only Linux and Netware software. Will it support windows 
operating system. Please clarify.
 
Thanks,
Narasimha

-Original Message- 
From: Greg Donald [mailto:[EMAIL PROTECTED] 
Sent: Mon 10/4/2004 10:06 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Re: Reg Backup



On Mon, 4 Oct 2004 21:55:58 +0530, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Is there any suitable command in MySQL 4.0 with out InnoDB for taking the
> backup. Please suggest.

Have you looked at mysqlhotcopy ?

http://dev.mysql.com/doc/mysql/en/mysqlhotcopy.html



--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]






Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


Reg Backup

2004-10-04 Thread lakshmi.narasimharao

Hi,
  Is there any suitable command in MySQL 4.0 with out InnoDB for taking the 
backup. Please suggest.
 
Thanks,
Narasimha 

 




Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


Reg Backup

2004-10-04 Thread lakshmi.narasimharao

   Thank you very much. One more question i.e Is there any command to take the 
Backup in   MySQL   4.0 (windows) classic which does not support innodb. 

 
I know 2 commands like mysqldump   and mysqlhotcopy. mysqlhotcopy seems to 
support myism but only in linux and netware os. But i need it in windows. Will 
mysqldump supports the backup in windows operatiog system with out using innodb?. If 
not any alternatives are there and how to do that?. Please explain me in detail asap.
 
Thanks,
Narasimha

-Original Message- 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Fri 10/1/2004 6:22 PM 
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) 
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
Subject: RE: views/cursors in mysql 4.0



Yes. Best of luck with your conversion! 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine 

<[EMAIL PROTECTED]> wrote on 09/30/2004 05:25:22 PM:

> 
> Hi, 
> 
> Thank you very much for your reply. So for the cursors result 
> set C API's will be suitable ..right?.
> 
> thanks,
> 
> Narasimha
> 
>  
> 
>  
> 
>  
> 
> 
> 
> 
> Confidentiality Notice 
> 
> The information contained in this electronic message and any 
> attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain 
> confidential or privileged information. If
> you are not the intended recipient, please notify the sender at 
> Wipro or [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.





Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


Reg Backup

2004-10-01 Thread lakshmi.narasimharao

Thank you very much. One more question i.e Is there any command to take the Backup in 
MySQL 4.0 (windows) classic which does not support innodb. 
 
I know 2 commands like mysqldump   and mysqlhotcopy. mysqlhotcopy seems to support 
myism but only in linux and netware os. But i need it in windows. Will mysqldump 
supports the backup in windows operatiog system with out using innodb?. If not any 
alternatives are there and how to do that?. Please explain me in detail asap.
 
Thanks,
Narasimha

-Original Message- 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Fri 10/1/2004 6:22 PM 
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) 
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
Subject: RE: views/cursors in mysql 4.0



Yes. Best of luck with your conversion! 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine 

<[EMAIL PROTECTED]> wrote on 09/30/2004 05:25:22 PM:

> 
> Hi, 
> 
> Thank you very much for your reply. So for the cursors result 
> set C API's will be suitable ..right?.
> 
> thanks,
> 
> Narasimha
> 
>  
> 
>  
> 
>  
> 
> 
> 
> 
> Confidentiality Notice 
> 
> The information contained in this electronic message and any 
> attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain 
> confidential or privileged information. If
> you are not the intended recipient, please notify the sender at 
> Wipro or [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.





Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


RE: views/cursors in mysql 4.0

2004-09-30 Thread lakshmi.narasimharao

Hi, 

Thank you very much for your reply. So for the cursors result set C API's will be 
suitable ..right?.

thanks,

Narasimha

 

 

 




Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


RE: views/cursors in mysql 4.0

2004-09-30 Thread lakshmi.narasimharao

Hi,
Thank you very much for your reply. 
 
   The existed system , a network management tool , is developed using C as 
program lanuage and oracle 7.3 as the database. There are 3 layers in the database 
like table layer, view layer and DBview layer. The DBView layer communicates through 
API's with both table and view layers. Views and tables are created dynamically 
through API's. Here Views are created for each table (reason i too donot know). And 
used some stored procedures at module level and some triggers on some table 
before/after updating. 
The above existed system's whole database layer including table layer/views layer and 
DBView layer to be migrated to mysql 4.0 with out innodb. Need to change the API's 
also. So, the views/stored procedurs (some of them used cursors)/ triggers  need to be 
converted to mysql 4.0 from oracle 7.3.  That is the requrement.
 
Views - instead of running queries against views, you will have to run your queries 
against the underlying tables. This may mean lots of changes to your SQL statements.  
What once appeared as a single query may now have to be performed in multiple steps to 
achieve the same results.  Usually, this kind of redesign actually improves 
application performance as you no longer rely on a set of table abstractions which 
require additional overhead to maintain. 

--- If i want to use the same data by querying underlying tables again how to use 
that?. where to store that data for using again?. Shall i need to write the same query 
again when i need the same data?. In the existed system views are created only once at 
runtime. could you please explain me in detail.
 
Cursors - Any SQL-scripted processing you did using cursors will have to be replaced 
with C/C++ routines that perform the same functions. You navigate recordsets according 
to the methods exposed by whichever library you use to interact with the server. 
Consult the documentation for the library you will use for specific details. 

--- Supggest me the best API's to perform SQL- scripted performance?. Could you please 
mention what are all the libraries we needed for the general  cursor processings. 
Given the oracle code which is used the cursors, could you please mention the 
equivalent libraries for those
 
   CREATE procedure pstub(pname varchar2, uname varchar2,
   stubSpec in out varchar2, stubText in out varchar2,
   flags varchar2 := '6') is
  rc varchar2(40);
  ty varchar2(5);
  cursor tub (una varchar2, dbna varchar2, luna varchar2, luty varchar2) is
 select line from sys.pstubtbl 
 where (una is null or username = una) and
   (dbna is null or dbname = dbna) and
   lun = luna and lutype = luty
 order by lineno;
begin -- main
  sys.pstubt(pname, uname, '', flags, rc);
  if rc like '$$$%' then stubText := rc; return; end if;
  if not (rc = 'PKG' or rc = 'SUB') 
then stubText := '$$$ other'; return; 
  end if;
  stubSpec := '';
  stubText := '';
  if rc = 'PKG' then
for s in tub(uname, '', pname, 'PKS') loop
  stubSpec := stubSpec || s.line;
end loop;
  end if;
  if rc = 'PKG' then ty := 'PKB'; else ty := 'SUB'; end if;
  for s in tub(uname, '', pname, ty) loop
stubText := stubText || s.line;
  end loop;
end;
 
 
Could you please let me know the alternatives for stored procedures and Triggers in 
mysql 4.0.
 
 
thanks,
Narasimha
 
 
-Original Message- 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Fri 10/1/2004 1:16 AM 
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) 
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
Subject: RE: views/cursors in mysql 4.0




Views - instead of running queries against views, you will have to run your 
queries against the underlying tables. This may mean lots of changes to your SQL 
statements.  What once appeared as a single query may now have to be performed in 
multiple steps to achieve the same results.  Usually, this kind of redesign actually 
improves application performance as you no longer rely on a set of table abstractions 
which require additional overhead to maintain. 

Cursors - Any SQL-scripted processing you did using cursors will have to be 
replaced with C/C++ routines that perform the same functions. You navigate recordsets 
according to the methods exposed by whichever library you use to interact with the 
server. Consult the documentation for the library you will use for specific details. 

Sorry I couldn't be more exact in my descriptions but you were not very clear 
on your requirements. Please respond with more detailed descriptions of exactly what 
you need from the database and I am sure someone on the list can help. 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine 


<[EMAIL PROTECTED]> wrote on 09/30/2004 03:24:52 PM:

> Hi, 
>Thank you for your response. Strictly we have to use mysql 4.
> 0 only. Actua

RE: views/cursors in mysql 4.0

2004-09-30 Thread lakshmi.narasimharao

Hi,
   Thank you for your response. Strictly we have to use mysql 4.0 only. Actually 
the source data base is oracle 7.3, we need to migrate that database to mysql 4.0 . In 
oracle 7.3 views/cursors are used. That is why i need an alternative for views/cursors 
in mysql 4.0. We use C/C++ for Programming.  could you please explain me the 
alternatives for views/cursors in mysql 4.0 and how to implement those in mysql 4.0?.
 
Thanks,
Narasimha

-Original Message- 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Fri 10/1/2004 12:40 AM 
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) 
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
Subject: Re: views/cursors in mysql 4.0



Views and Cursors are not available in MySQL 4.x.  Usually your scripting 
language handles cursors for you (having them in 4.x would do you little good as 
stored procedures don't exist yet. Look at the current 5.x development for cursors and 
stored procedures). What language do you script/program with? 

What would you like to have done with your views and/or cursors if they _were_ 
available? Workarounds exist for almost every purpose but some of them use 
language-specific or library-specific options. 

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine 

<[EMAIL PROTECTED]> wrote on 09/30/2004 03:01:51 PM:

> 
> Hi,
>How to implement views/cursors in mysql 4.0?. Normally in 
> mysql how the selected data is maintained in the recordsets?. Is 
> there any other alternatives to implement views/cursors in mysql 4.
> 0?. Please advise me for the better solution.
>  
> Thanks,
> Narasimha
> 
> 
> 
> Confidentiality Notice 
> 
> The information contained in this electronic message and any 
> attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain 
> confidential or privileged information. If
> you are not the intended recipient, please notify the sender at 
> Wipro or [EMAIL PROTECTED] immediately
> and destroy all copies of this message and any attachments.





Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


views/cursors in mysql 4.0

2004-09-30 Thread lakshmi.narasimharao

Hi,
   How to implement views/cursors in mysql 4.0?. Normally in mysql how the 
selected data is maintained in the recordsets?. Is there any other alternatives to 
implement views/cursors in mysql 4.0?. Please advise me for the better solution.
 
Thanks,
Narasimha



Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


RE: importing data into mysql from oracle using a text file

2004-09-29 Thread lakshmi.narasimharao

Thanks, it is working for the mentioned format.
 
Is there any method for importing directly the spooled file from oracle without 
changing the file format into the required format like using tab and newline. 
 
thanks,
narasimha

-Original Message- 
From: Andrey Hristov [mailto:[EMAIL PROTECTED] 
Sent: Thu 9/30/2004 2:01 AM 
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) 
Cc: [EMAIL PROTECTED] 
Subject: Re: importing data into mysql from oracle using a text file



  Hi,
I did imported your data im my server but I had to do some changes to 
sample.txt.
I have replaced in a text editor "\t" with empty string.  is a real 
tab
while \t is just a text. Additional change was to replace "\n" (which is text 
but not
newline with empty string). The I did the following (before that I have 
created the
table) :

mysql> load data local infile "/home/andrey/Desktop/sample2.txt" into table 
ALARM FIELDS
ESCAPED BY '\\';
Query OK, 1 row affected, 1 warning (0.03 sec)
Records: 1  Deleted: 0  Skipped: 0  Warnings: 1

mysql> show warnings;
+-+--++
| Level   | Code | Message|
+-+--++
| Warning | 1261 | Row 1 doesn't contain data for all columns |
+-+--++
1 row in set (0.00 sec)

mysql> select * FROM ALARM;

++++--++--+---+--+-++
| ARRIVED| DETECTED   | NAME   | TYPE | ALARMLEVEL | VERIFIED | DISCLOSED |
CATEGORY_NUM | EVENTID | REASON |

++++--++--+---+--+-++
| 2004-09-27 | 2004-09-27 | alaram |0 |  0 | NULL | 0 |
  2 |   1 | NULL   |

++++--++--+---+--+-++
1 row in set (0.02 sec)


You can see the warning since the number of fields was less the needed. Or 
maybe you
wanted by having \n to express NULL? Last thing to do over sample.text is to 
mark all
places where NULL should appear with \N .

Hope this helps,
Andrey


[EMAIL PROTECTED] wrote:
> Tha sample lines are like this in alarm.txt
> 
> ARRIVED   DETECTED  NAME  TYPE ALARMLEVEL V DISCLOSED 
CATEGORY_NUM  
> EVENTID   
> - -  - -- - - 

> -   
> REASON   
   
>   
>  
   
>   
> 27-SEP-04 27-SEP-04 alaram   0  0 N 0
2  
>   1   
>  
   
>   
>  
   
>   
> 27-SEP-04 27-SEP-04 MiTel0  0 N 0
2  
>   2   
> 
> 
> The above lines i am not able to insert into mysql.
> 
> After changing the format as below(as in the sample.txt) i am able to insert 
into mysql but not correclty. Couls you please help me in  this.
> 
> 
> 2004-09-27 \t 2004-09-27 \t alaram \t 0 \t 0 \t N \t 0 \t 2 \t 1 \n
> 
> thanks,
> narasimha
> 




Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


RE: importing data into mysql from oracle using a text file

2004-09-29 Thread lakshmi.narasimharao
Title: Re: importing data into mysql from oracle using a text file






The sample lines are like this in 
alarm.txt

   
  ARRIVED   DETECTED  
  NAME  
  TYPE ALARMLEVEL V DISCLOSED CATEGORY_NUM   
  EVENTID    - 
  -  - -- - -  
  
  -    
  REASON   
  
     
   
  
     
  27-SEP-04 27-SEP-04 
  alaram   
  0  0 
  N 
  0    
  2   
    
  1 
  
      
  
     
  27-SEP-04 27-SEP-04 
  MiTel    
  0  0 
  N 
  0    
  2   
    2    
   
   
  The above lines i am not able to insert into mysql. 
  
   
  After changing the format as below(as in the 
  sample.txt) i am able to insert into mysql but not correclty. Couls you 
  please help me in  this.
   
   
  2004-09-27 \t 2004-09-27 \t alaram \t 0 \t 0 \t N \t 0 \t 2 \t 1 \n
   
  thanks,
  narasimha
   
   
   
   


Confidentiality Notice The information contained in this electronic message and any attachments to this message are intendedfor the exclusive use of the addressee(s) and may contain confidential or privileged information. Ifyou are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediatelyand destroy all copies of this message and any attachments.

ARRIVED   DETECTED  NAME  TYPE ALARMLEVEL V DISCLOSED CATEGORY_NUM 
  EVENTID
- -  - -- - -  
-
REASON 
 
   
 
27-SEP-04 27-SEP-04 alaram   0  0 N 02 
1
   
 
   
 
27-SEP-04 27-SEP-04 MiTel0  0 N 02 
2
   
 
   
 
 2004-09-27  \t  2004-09-27  \t  alaram  \t  0   \t  0  
 \t  N   \t  0   \t  2   \t  1   \n-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

importing data into mysql from oracle using a text file

2004-09-29 Thread lakshmi.narasimharao
Title: Message





    Hi,

     I tried with the spool option to get 
  the data from the tables in the oracle.
  For this go to pl/sql editor, go to file menu, select spool, asks for a 
  file name give the file name you want, later type the select command from 
  which you want the data. and select spool of option from the file menu.
  eg; select * from alarm;
  After spooling i got the file alarm.LST as the attached (it will be there 
  in C:/orant/bin). Save that file as .txt file.
   
   
  Now go to mysql prompt as a root user. 
  1) choose any of the default database by using the command 
     eg: use test
  2) create the table alarm using the same columns, data types 
  (here data types may differ) as in oracle
  eg; 
    mysql> CREATE TABLE ALARM (    
  ->    
  ARRIVED  
  DATE NULL,    
  ->    
  DETECTED 
  DATE NULL,    
  ->    
  NAME 
  VARCHAR(20) NULL,    
  ->    
  TYPE 
  INTEGER(1) NULL,    
  ->    
  ALARMLEVEL   
  INTEGER(1) NULL,    
  ->    
  VERIFIED 
  INTEGER(1) NULL,    
  ->    
  DISCLOSED    
  INTEGER(1) NULL,    
  ->    
  CATEGORY_NUM INTEGER(1) 
  NULL,    ->    
  EVENTID  
  INTEGER(5) NOT NULL,    
  ->    
  REASON   
  VARCHAR(60) NULL    -> );
   
   3) Use the LOAD DAT INFILE command for data to import from .txt 
  file (copy the alarm.txt file into c:\mysql\data\test (if we use test 
  database))
   
   eg;  mysql> LOAD DATA INFILE 'alarm.txt' INTO TABLE 
  alarm;
   
  Here the data is not inserting properly:  Bcs
  1) The data in the alarm.txt file should be like  each colum data 
  should be seperated by \t  and each row should be separated by \n . and 
  from spool the data is not coming in the desired format. I did not find any 
  suitable command/option to get the spooling file with the desired delimiters. 
  Colud any one suggest me here.
  2) The date format is different in oracle and mysql. This also i took 
  care externally.
  3) Even i tried by formating the data in the required (see the 
  attached alarm.txt for the format), getting the result as the following . 
  Not inserting the data properly.
   
  mysql> LOAD DATA INFILE 'alarm.txt' INTO TABLE alarm;Query OK, 1 
  row affected (0.00 sec)Records: 1  Deleted: 0  Skipped: 0  
  Warnings: 1
  mysql> select * from 
  alarm;++++--++--+---+--+-++| 
  ARRIVED    | DETECTED   | 
  NAME   | TYPE | ALARMLEVEL | VERIFIED | 
  DISCLOSED | CATEGORY_NUM | EVENTID | 
  REASON |++++--++--+---+--+-++| 
  2004-09-27 | -00-00 | 2004-09-27 |    0 
  |  0 
  |    0 
  | 0 
  |    0 
  |   0 |   
  |++++--++--+---+--+-++1 
  row in set (0.00 sec)
  mysql>
   
  I tried with another command mysqlimport. but that command also seems to 
  be work with the above format only. 
  Please give me a solution for this. Is there any other way to do 
  this from oracle. My aim is dumping the data from oracle to 
  mysql.
   
  Thanks,
  Narasimha
     
   
   
   
   
  
-Original Message- From: Praneesh 
Prakashan (WT01 - TELECOM SOLUTIONS) Sent: Tue 9/28/2004 9:48 AM 
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS); Jathish 
Maruthoormana Jayanthan (WT01 - TELECOM SOLUTIONS) Cc: Deepak 
Nagarajan (WT01 - TELECOM SOLUTIONS) Subject: RE: Using XML with 
my Sql
Hi 
Narasim,
 
In 
the Pro* C files (dbids.pc, dbtutil.pc), synonyms are being 
used.
 
regards,
- 
Praneesh
 

  
  -Original Message-From: Lakshmi 
  NarasimhaRao (WT01 - TELECOM SOLUTIONS) Sent: Monday, September 
  27, 2004 10:07 PMTo: Jathish Maruthoormana Jayanthan (WT01 - 
  TELECOM SOLUTIONS)Cc: Praneesh Prakashan (WT01 - TELECOM 
  SOLUTIONS); Deepak Nagarajan (WT01 - TELECOM SOLUTIONS)Subject: 
  RE: Using XML with my Sql
  Hi,
    As per our 
  discussion,  You can create an alias or 
  synonym for a MyISAM table by defining a MERGE table 
  that maps to that single table.  Synonym is an alias for any table, 
  view or other object in database. 
   
   
  May i know where in the code they used synonyms?. Attached i sthe document 
  for merging tables.
   
  Thanks,
  Narasimha
  
-Original Message- From: Jathish 
Maruthoormana Jayanthan (WT01 - TELECOM SOLUTIONS) Sent: Fri 
9/24/2004 7:44 PM To: Lakshmi

importing data into mysql from oracle

2004-09-28 Thread lakshmi.narasimharao

Hi,
Could any one of you suggest me a better way to bump the data in oracle 7.3 to 
mysql 4.0 classic.
Thanks,
Narasimha

-Original Message- 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tue 9/28/2004 8:58 PM 
To: martin fasani 
Cc: [EMAIL PROTECTED] 
Subject: Re: Oracle query to mysql



Your original Oracle(R) query (slightly reformatted):

SELECT IMRTAB.IMR906 AS NUM906
, IMRTAB.IMRFLL AS FLL
, SUM(IMRTAB.IMRCLL) AS CLL
, ROUND(SUM(IMRTAB.IMRDSC),2) AS DUR
, ROUND(SUM(IMRTAB.IMRDSC)/SUM(IMRTAB.IMRCLL),2) AS PRO
, SUM(IMRTAB1.IMRCLL) AS CLL_N
, ROUND(SUM(IMRTAB1.IMRDSC),2) AS DUR_N
, ROUND(SUM(IMRTAB1.IMRDSC)/SUM(IMRTAB1.IMRCLL),2) AS PRO_N
, SUM(IMRTAB2.IMRCLL) AS CLL_R
, ROUND(SUM(IMRTAB2.IMRDSC),2) AS DUR_R
, ROUND(SUM(IMRTAB2.IMRDSC)/SUM(IMRTAB2.IMRCLL),2) AS PRO_R
FROM IMRTAB
, IMRTAB IMRTAB1
, IMRTAB IMRTAB2  /* here does the tables alias*/
WHERE IMRTAB.IMRIDE = IMRTAB1.IMRIDE (+)
AND IMRTAB.IMRIDE = IMRTAB2.IMRIDE (+) /* links by the uniqID both
alias */
AND (IMRTAB1.IMRTAR (+) = 'N') /* takes N calls and discard the
rest for IMRTAB1 */
AND (IMRTAB2.IMRTAR (+) = 'R') /* takes R calls and discard the
rest for IMRTAB2 */
AND (IMRTAB.IMRFLL BETWEEN '01/09/2004' and '10/09/2004')
AND (IMRTAB.IMRCLI=2584 AND (IMRTAB.IMR906=803xx ))
GROUP BY IMRTAB.IMR906,IMRTAB.IMRFLL
ORDER BY IMRTAB.IMR906,IMRTAB.IMRFLL


My MySQL translation:

SELECT IMRTAB.IMR906 AS NUM906
, IMRTAB.IMRFLL AS FLL
, SUM(IMRTAB.IMRCLL) AS CLL
, ROUND(SUM(IMRTAB.IMRDSC),2) AS DUR
, ROUND(SUM(IMRTAB.IMRDSC)/SUM(IMRTAB.IMRCLL),2) AS PRO
, SUM(IMRTAB1.IMRCLL) AS CLL_N
, ROUND(SUM(IMRTAB1.IMRDSC),2) AS DUR_N
, ROUND(SUM(IMRTAB1.IMRDSC)/SUM(IMRTAB1.IMRCLL),2) AS PRO_N
, SUM(IMRTAB2.IMRCLL) AS CLL_R
, ROUND(SUM(IMRTAB2.IMRDSC),2) AS DUR_R
, ROUND(SUM(IMRTAB2.IMRDSC)/SUM(IMRTAB2.IMRCLL),2) AS PRO_R
FROM IMRTAB
LEFT JOIN IMRTAB IMRTAB1
ON IMRTAB.IMRIDE = IMRTAB1.IMRIDE
AND IMRTAB1.IMRTAR = 'N' /* N calls only for IMRTAB1 */
LEFT JOIN IMRTAB IMRTAB2
ON IMRTAB.IMRIDE = IMRTAB2.IMRIDE
AND IMRTAB2.IMRTAR = 'R' /* R calls only for IMRTAB2 */
WHERE IMRTAB.IMRFLL BETWEEN '2004-09-01' and '2004-09-10'
AND IMRTAB.IMRCLI=2584
AND IMRTAB.IMR906=803xx
GROUP BY IMRTAB.IMR906,IMRTAB.IMRFLL
ORDER BY IMRTAB.IMR906,IMRTAB.IMRFLL


You were using the Oracle syntax ", ...(+)" to declare your outer joins.
The equivalent MySQL form is "LEFT JOIN... ON ...".

http://dev.mysql.com/doc/mysql/en/JOIN.html


I also had to reformat the dates in your WHERE clause to be MySQL
formatted:
'01/09/2004' (dd/mm/) =>> '2004-09-01' (-mm-dd)

http://dev.mysql.com/doc/mysql/en/Date_and_time_types.html
http://dev.mysql.com/doc/mysql/en/DATETIME.html


Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
"martin fasani" <[EMAIL PROTECTED]> wrote on 09/28/2004 07:23:38 AM:

>
> Hi guys,
>
> I'm working in a telecom company that has Oracle for the call
statistics.
> Now we export the daily stats to a remote mySql.
>
> The daily resume table looks like this:
>
++---+-++--+
> --+++
> | IMRFLL | IMR906| IMRTER  | IMRTAR | IMRDUR   |
> IMRFAC   | IMRCLI | IMRCLL |
>
++---+-++--+
> --+++
> | 2004-06-01 | 803xx |   x | N  |
446.9166572 |
> 40355904 | 21 | 26 |
> | 2004-06-01 | 803xx |   0 | R  | 9.414
|
> 40355904 | 21 | 10 |
>
++---+-++--+
> --+++
>
> What I need it's to get a report that joins the table to itself two
times to
> get the Normal tarif ( IMRTAR=N) and the Reduced tarif (IMRTAR=R).
>
> In Oracle is done using Outer j

reg backup

2004-09-24 Thread lakshmi.narasimharao

Hi,
   Is there any way to handle backup in the mysql 4.0 classic with out 
innoDB?. And may i know the differences between transaction - safe and transaction 
-full locks ?. And what is the best way to confirm whether innodb is running or not in 
mysql 4.0?.
 
Thanks,
Narasimha

-Original Message- 
From: Egor Egorov [mailto:[EMAIL PROTECTED] 
Sent: Fri 9/24/2004 2:41 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Re: Which file to backup



Luciano Barcaro <[EMAIL PROTECTED]> wrote:

>>>I'm trying to backup the 'binary log' and don't know which file is it.
>>>
>>>these are the files I see in my datadir
>>>
>>>-rw-rw  1 mysql   users175K Sep 14 14:21 hrrgp01-bin.07
>>>-rw-rw  1 mysql   users345K Sep 14 15:03 hrrgp01-bin.08
>>>-rw-rw  1 mysql   users1.6M Sep 14 15:18 hrrgp01-bin.09
>>>-rw-rw  1 mysql   users3.9M Sep 15 09:06 hrrgp01-bin.10
>>>-rw-rw  1 mysql   users 29K Sep 15 09:11 hrrgp01-bin.11
>>>-rw-rw  1 mysql   users676K Sep 15 15:58 hrrgp01-bin.12
>>>-rw-rw  1 mysql   users4.4M Sep 16 11:10 hrrgp01-bin.16
>>>-rw-rw  1 mysql   mysql322M Sep 16 11:10 ibdata1
>>>-rw-rw  1 mysql   users 40M Sep 16 11:10 ib_logfile0
>>>
>>>The thing is I intend to stop the server at a certain time and then
>>>make a backup copy of the actual binary log.
>>>
>>>But which is the name of the file I should use into my script?
>>>   
>>>
>>
>>Backup *-bin.* and ib_logfile*  if you use InnoDB.
>>
>>
>> 
>>
> And don?t forget ibdata1

The question was about logs.





--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


RE: ResultSet NotUpdatable problem

2004-09-23 Thread lakshmi.narasimharao

Hi,
 
help me in getting answer for the following
What is the difference in MySql between transaction-safe tables (like Innodb or BDB) 
and non-safe
 
Thanks,
Narasimha
 

 




Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


Choosing the option file

2004-09-22 Thread lakshmi.narasimharao

Hi,
 Actually i want mysql 4.0 classic version which donot support innodb engine. 
As classic version is a commercial base one, i installed the mysql 4.0 standard one 
(which includes innodb). Here my problem is , i have to inactivate the innodb engine. 
For that what we need to do is 
 
"From MySQL 4.0 on, the InnoDB storage engine is enabled by default. If you don't want 
to use InnoDB tables, you can add the skip-innodb option to your MySQL option file. "
 
but my problem is how to find out the MySQL option file, and in that how to add that 
skip-innodb option.
 
Please advise me in this asap.
 
Thanks,
Narasimha

 




Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


List of Questions

2004-09-13 Thread lakshmi.narasimharao

Hi,
   I have some questions. I need urgent solutions for these. Could you spare some 
time for me for helping me. I hope you can.
 
1) Is MySQL 4.0 Classic version is free downlodable?. If so, can you give me the url 
please?.
 
2)  What will be the equivalent of Pro*C API's in MySql?. For this what API's i have 
to use?. Could you give me the reference links/documentation?.
 
3) What are the equivalent alternatives for using Stored procedures of Oracle 7.3 in 
MySQL 4.0 classic version?.
 
4) What are the equivalent alternatives for using Triggers of Oracle 7.3 in MySQL 4.0 
classic version?.
 
5) What are the equivalent alternatives for using Views of Oracle 7.3 in MySQL 4.0 
classic version?.
 
6) What are the equivalent alternatives for using Transaction locks of Oracle 7.3 in 
MySQL 4.0 classic version?.
 
7) What are the equivalent alternatives for using primary/foriegn keys of Oracle 7.3 
in MySQL 4.0 classic version?.
 
Thanks,
Narasimha
 
 
 
 
 

 




Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


RE: Migration tools/plan from oracle 7.3 to Mysql 4.0

2004-08-24 Thread lakshmi.narasimharao

Hi,
   I have to migrate oracle 7.3 database to MySql , for oracle used Pro*C.
In the front end used Java, JNI, RMI and Pro*C. 
In the migration process what will be the best equivalent of Pro*C in MySql.
Ans also need to use XML, for the above environment what are the best langauge suit 
for XML handling( c++ or java) and what will be the best parsers for XML (like jaxp 
..etc). Please advise me here.
 
Thanks,
Narasimha
91 98456 82459

-Original Message- 
From: Lakshmi NarasimhaRao (WT01 - TELECOM SERVICE PROVIDER) 
Sent: Tue 8/17/2004 3:08 PM 
To: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
Cc: 
Subject: RE: Migration tools/plan from oracle 7.3 to Mysql 4.0




Hi,
 Thank you for your response. Could any one give more clarification on 
the alternatives for Views, Stored procedures, triggers and contraints of oracle in 
Mysql 4.0 classic, as MySql 4.0 classic wonot support the InnoDB storage engine.

Thanks,
Narasimha

-Original Message-
From: Martijn Tonies [mailto:[EMAIL PROTECTED]
Sent: Tue 8/17/2004 12:59 PM
To: Lakshmi NarasimhaRao (WT01 - TELECOM SERVICE PROVIDER); [EMAIL 
PROTECTED]
Cc:
Subject: Re: Migration tools/plan from oracle 7.3 to Mysql 4.0
   
   

First: please don't hijack threads... And don't quote them completely
if you do.
   
>  I am new to MySql. Could you please let me know the 
different
migration tools avialable for the migration of oracle 7.3 database to 
mysql
4.0 classic version.
   
You could try the Schema Migrator tool in Database Workbench
( www.upscene.com ) - it supports ADO and ODBC connectivity
to MySQL. Might not be perfect, but sure gives you a good start.
   
>Out of those which one is the best in performance and cost wise. As 
per my
knowledge views, stored procedures and triggers are not supported in 
MySql
4.0. Is it correct?.
   
That is correct. Add to that: no CHECK constraints either.
Foreign Key Constraints and transactions are only supported with
the InnoDB storage engine - read about that in the documentation.
   
If so, what are all the alternatives for converting the views, stored
procedures and triggers in oracle 7.3 to MySql 4.0. I will be very 
happy for
giving me a very good explanation on this.
>
   
With regards,
   
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & 
MS SQL
Server.
Upscene Productions
http://www.upscene.com
   
   
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
   
   





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or 
[EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.






Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


RE: Migration tools/plan from oracle 7.3 to Mysql 4.0

2004-08-17 Thread lakshmi.narasimharao

Hi, 
 Thank you for your response. Could any one give more clarification on the 
alternatives for Views, Stored procedures, triggers and contraints of oracle in Mysql 
4.0 classic, as MySql 4.0 classic wonot support the InnoDB storage engine.
 
Thanks,
Narasimha 

-Original Message- 
From: Martijn Tonies [mailto:[EMAIL PROTECTED] 
Sent: Tue 8/17/2004 12:59 PM 
To: Lakshmi NarasimhaRao (WT01 - TELECOM SERVICE PROVIDER); [EMAIL PROTECTED] 
Cc: 
Subject: Re: Migration tools/plan from oracle 7.3 to Mysql 4.0



First: please don't hijack threads... And don't quote them completely
if you do.

>  I am new to MySql. Could you please let me know the different
migration tools avialable for the migration of oracle 7.3 database to mysql
4.0 classic version.

You could try the Schema Migrator tool in Database Workbench
( www.upscene.com ) - it supports ADO and ODBC connectivity
to MySQL. Might not be perfect, but sure gives you a good start.

>Out of those which one is the best in performance and cost wise. As per my
knowledge views, stored procedures and triggers are not supported in MySql
4.0. Is it correct?.

That is correct. Add to that: no CHECK constraints either.
Foreign Key Constraints and transactions are only supported with
the InnoDB storage engine - read about that in the documentation.

If so, what are all the alternatives for converting the views, stored
procedures and triggers in oracle 7.3 to MySql 4.0. I will be very happy for
giving me a very good explanation on this.
>

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]







Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.


Migration tools/plan from oracle 7.3 to Mysql 4.0

2004-08-16 Thread lakshmi.narasimharao

Hi,
 I am new to MySql. Could you please let me know the different migration tools 
avialable for the migration of oracle 7.3 database to mysql 4.0 classic version. Out 
of those which one is the best in performance and cost wise. As per my knowledge 
views, stored procedures and triggers are not supported in MySql 4.0. Is it correct?. 
If so, what are all the alternatives for converting the views, stored procedures and 
triggers in oracle 7.3 to MySql 4.0. I will be very happy for  giving me a very good 
explanation on this.
 
Thanks,
Narasimha
 

-Original Message- 
From: Bob Afifi [mailto:[EMAIL PROTECTED] 
Sent: Mon 8/16/2004 10:13 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Update MySQL row using URL link?



I currently update MySQL rows using phpMyAdmin.
For example, dropping the following into the
phpMyAdmin GUI:

UPDATE mysql_db SET publish = 1 WHERE Date =
'Sunday, August 15, 2004 21:04:32'

Since I get the update info in an e-mail send
whenever the form is submitted, I'd like to turn
querys like the above encoded into a URL -
bypassing phpMyAdmin - which when clicked, will
update the row.

I found this article last night: "Make SQL
Queries over HTTP with XML with VS.NET "
(http://www.aspfree.com/c/a/ASP/Make-SQL-Queries-over-HTTP-with-XML-with-VSNET/
)

"SELECT CustomerId, CompanyName FROM Customer"


http://localhost/sql?sql=select%20CustomerId,%20CompanyName%20from%20Customers%20FOR%20XML%20AUTO

=

The above looks very much like what I have in
mind, but for MySQL.  Anybody know how to do
this?

Many thanks in advance,

-Bob

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]







Confidentiality Notice 

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.