473,748 Members | 2,502 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mass update of all database,table, columns for Collation?

Has anyone ever accomplished a mass update off all databases, tables and
columns for collation?

If I try to change the collation/character set for the mysql daemon it
breaks all of our queries because they conflict with the swedish default
that they have been created with. The problem is we have about 90 databases
with hundreds of tables. Is there an easy way to update all of these at once
and that would allow me to start with the correct default at startup.

Thanks

Chris
Jul 23 '05 #1
1 3136
Chris wrote:
Has anyone ever accomplished a mass update off all databases, tables and
columns for collation?


I would do this with a script. Dump a list of all your databases and
tables with mysqlshow. Then use a script (Perl or whatever) to loop
through the table names, and format all those hundreds of statements,
one for each table that needs updating.

I don't know any elegant way of doing this with a single statement. But
since I assume you don't need to do it frequently, an inelegant solution
works just as well.

The time it takes to write the script is probably less than the time it
would take to research a "better" way to do it.

Regards,
Bill K.
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3003
by: Pat Traynor | last post by:
I've got a web-based form that will allow people to update a database that is displayed as a table. Let's say that there are several columns across titled Red, Blue, Green... and several rows titled 01, 02, 03... In each cell, they can fill in some simple text data. The only way that I can think of to update the database with this information is using two imbedded loops in Perl: pseudocode: for($color=1;$color<=10;++$color) {
2
32244
by: Captain Flack | last post by:
I have a SQL Server database hosted with a web hosting company. The SQL Server was clearly set up to be case sensitive, however, I want this particular database to be case-insensitive. I have searched high and low, the best suggestion I can find is to reinstall SQL Server and select case-insensitive. But since this is the web host's SQL, that isn't an option here. With default language I can use the sp_defaultlanguage to change to...
8
3351
by: Jan van Veldhuizen | last post by:
The UPDATE table FROM syntax is not supported by Oracle. I am looking for a syntax that is understood by both Oracle and SqlServer. Example: Table1: id name city city_id 1 john newyork null
4
8543
by: serge | last post by:
If I have to send a database to someone and that person can be using a Case Sensitive or a Case Insensitive SQL Server 2000, what do I do? Should i create two databases: 1 CS and 1 CI? Can't I simply work on 1 CS database all the time and whatever the person's SQL Server Sensitivity is setup, my database would work fine? I want to avoid having to have and work on two databases for this particular purpose.
16
3874
by: robert | last post by:
been ruminating on the question (mostly in a 390/v7 context) of whether, and if so when, a row update becomes an insert/delete. i assume that there is a threshold on the number of columns of the table, or perhaps bytes, being updated where the engine just decides, screw it, i'll just make a new one. surfed this group and google, but couldn't find anything. the context: we have some java folk who like to parametize/
8
3684
by: Denis | last post by:
I wish to create a table in which field contents may be in any of the following languages: English, Greek and Chinese. Which architecture/structure do you suggest I use? Should I perhaps split this into 3 tables each one with different collations? Or would it be best to set the table to unicode? Or is there a better option you think?
4
4996
by: wrldruler | last post by:
Hello, First, I know it's against "Access Law" to save calculations in a table, but....I want/need to. I currently have sub-totals being calculated inside a form, using DMax, DCount, and DSum. But these aggregate functions are slowing down the interface and annoying me. So I have decided not to show sub- totals on the form.
39
5865
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
3
3967
by: Michel Esber | last post by:
Hi all, DB2 V8 LUW FP 15 There is a table T (ID varchar (24), ABC timestamp). ID is PK. Our application needs to frequently update T with a new value for ABC. update T set ABC=? where ID = ?
0
8831
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9250
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8247
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4878
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.