473,785 Members | 2,824 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Drop & Rebuild Index Failure

Once a week, we run a script to drop all the indexes on tables in our
db, followed by another to add those indexes back (we insert every
day, so we do this to prevent index fragmenttation) .

The database is named BX, and the script runs these two commands:

c:\mysql\bin\my sql BX < dropIndex.sql
c:\mysql\bin\my sql BX < addIndex.sql

We're running version 3.23.29 on Windows 2000.

The files 'dropIndex.sql' and 'addIndex.sql' consist of lines such as:

'ALTER TABLE TABLE_NAME DROP/INDEX INDEX_NAME'

This usually works well, but today we got this error from
'dropIndex.sql' :

ERROR 7 at line 32: Error on rename of '.\bx\#sql-51c_b8a.MYD' to
'.\bx\equity_or der.MYD' (Errcode: 13)

and this one from 'addIndex.sql':

ERROR 1061 at line 32: Duplicate key name 'EQ_SPX'

So it appears that the index called 'EQ_SPX' was never dropped, and
that's why it wasn't added and gave the duplicate error.

But, all the other indexes (including other indexes on the same table
as EQ_SPX) were dropped and added successfully (there are 40 in
total).

I've read that 'Errcode: 13' is a permission problem, but why would it
come up in the middle of a batch job?

How can I prevent this from re-occurring?

Also, how can I make sure the indexes and the tables are ok?
Jul 20 '05 #1
1 5474
my 2c...
Temporary disk space? (not nec. the same partition of the data)
good luck
bobb

"Rod Davis" <ro*******@mail inator.com> wrote in message
news:9c******** *************** ***@posting.goo gle.com...
Once a week, we run a script to drop all the indexes on tables in our
db, followed by another to add those indexes back (we insert every
day, so we do this to prevent index fragmenttation) .

The database is named BX, and the script runs these two commands:

c:\mysql\bin\my sql BX < dropIndex.sql
c:\mysql\bin\my sql BX < addIndex.sql

We're running version 3.23.29 on Windows 2000.

The files 'dropIndex.sql' and 'addIndex.sql' consist of lines such as:

'ALTER TABLE TABLE_NAME DROP/INDEX INDEX_NAME'

This usually works well, but today we got this error from
'dropIndex.sql' :

ERROR 7 at line 32: Error on rename of '.\bx\#sql-51c_b8a.MYD' to
'.\bx\equity_or der.MYD' (Errcode: 13)

and this one from 'addIndex.sql':

ERROR 1061 at line 32: Duplicate key name 'EQ_SPX'

So it appears that the index called 'EQ_SPX' was never dropped, and
that's why it wasn't added and gave the duplicate error.

But, all the other indexes (including other indexes on the same table
as EQ_SPX) were dropped and added successfully (there are 40 in
total).

I've read that 'Errcode: 13' is a permission problem, but why would it
come up in the middle of a batch job?

How can I prevent this from re-occurring?

Also, how can I make sure the indexes and the tables are ok?

Jul 20 '05 #2

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

Similar topics

1
3527
by: Woody Rao | last post by:
I'm trying to drop all indexes and primary keys so that i can rebuild them (from a script created from same database on another server). when i go to the 'generate sql scripts', it has the ability to drop or generate all tables. it also has the ability to generate all keys only. but i cant find a way to drop all of these keys... any ideas?
1
4685
by: Martial Spirit | last post by:
Hello- I was amazed at the suckerfish drop-downs from AListApart.com. They work great except for one thing, if I position the drop-downs over an iframe element, on mouseover the menus disappear. It works fine in IE, but not FireFox. I would like to implement these menus, but if I can't get this to work, I gotta look at something else. If anyone has some suggestions, I would appreciate it.
6
3561
by: jojobar | last post by:
Hello, I look at the asp.net 2.0 web parts tutorial on the asp.net web site. I tried to run it under firefox browser but it did not run. If I want to use this feature in a commercial product where the user can run on firefox/mozilla, what would be a good approach. 1. Should I overwrite the javascript code drag-and-drop to make it more browser independent. If I want to go this route, can anybody provide me a
3
10599
by: VB Programmer | last post by:
In VB.NET 2005 (winform) any sample code to drag & drop items between 2 listboxes? Thanks!
2
13318
by: Eero Tuomenoksa | last post by:
Hi Does someone knows how i can show/hide multible divs at one click? -- Käytössä Operan vallankumouksellinen sähköpostiohjelma: http://www.opera.com/mail/
1
5375
by: Sim | last post by:
Hello NG, I try to use drag and drop function between two list views. For this I found following code: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchimpdragdrop.asp It works fine, but I have another problem. I want to create functionality like a Windows Explorer. This means, if I select some items from list view No 1 and drag&drop this to the list view No 2, then I want to mark automatically
0
3144
by: mjohnson0321 | last post by:
I am trying to incorporate a CSS drop-down menu into a site (suckerfish menu). The menu gets lost behind the content below it, but only on one of the drop downs (News). The error occurs on all of the browsers I have tested it on (IE6, IE7, Firefox, Opera and Safari). It is probably something simple, but I can't find it! Here is the CSS (using external style sheets): style-temp.css (Main style sheet for the site): * { font-family:...
5
13809
by: Romulo NF | last post by:
Greetings, I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with drag&drop on the same page (which was not possible). Now i´ve a new concept of the script, more object oriented. I´ve also commented the whole code so you guys can easier understand it engine. What exactly we need when trying to make a column drag &...
1
7180
by: dsdevonsomer | last post by:
Hello all, I am new to managing indexes on large tables and need some help. Hopefully, I am not repeating question here. I searched as much as I can, but not finding relatively best answer.. Here is my scenario. I have 2 tables with more than 4 mil rows (1 - 2.8 Mil, 2 2.1 mil). Of these tables, there are about 25 ( select ) queries run to help generate reports every week.
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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
10324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9949
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...
1
7499
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
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
3
2879
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.