Script to REPAIR and OPMIZE your database
November 22, 2007 02:47AM
Script to REPAIR and OPMIZE your database.

<?
$settings_dir = "./settings";
require_once("$settings_dir/database.php"winking smiley;
mysql_query("REPAIR TABLE categories , domains , keywords , links , link_keyword0 , link_keyword1 , link_keyword2 , link_keyword3 , link_keyword4 , link_keyword5 , link_keyword6 , link_keyword7 , link_keyword8 , link_keyword9 , link_keyworda , link_keywordb , link_keywordc , link_keywordd , link_keyworde , link_keywordf , pending , query_log , sites , site_category , temp"winking smiley;
mysql_query("OPTIMIZE TABLE categories , domains , keywords , links , link_keyword0 , link_keyword1 , link_keyword2 , link_keyword3 , link_keyword4 , link_keyword5 , link_keyword6 , link_keyword7 , link_keyword8 , link_keyword9 , link_keyworda , link_keywordb , link_keywordc , link_keywordd , link_keyworde , link_keywordf , pending , query_log , sites , site_category , temp"winking smiley;
?>
Re: Script to REPAIR and OPMIZE your database
November 30, 2007 10:04AM
when you got the links table of 2.5 GB
it's no so good this comand
i will better use phpmyadmin
but anyway you have better ideas

HaVe FuN
Re: Script to REPAIR and OPMIZE your database
January 10, 2008 01:30PM
i think this better grinning smiley
<?
// mod by CyBerNe7
$settings_dir = "./settings";
require_once("$settings_dir/database.php"winking smiley;
mysql_query("REPAIR TABLE " . $mysql_table_prefix . "categories , " . $mysql_table_prefix . "domains , " . $mysql_table_prefix . "keywords , " . $mysql_table_prefix . "links , " . $mysql_table_prefix . "link_keyword0 , " . $mysql_table_prefix . "link_keyword1 , " . $mysql_table_prefix . "link_keyword2 , " . $mysql_table_prefix . "link_keyword3 , " . $mysql_table_prefix . "link_keyword4 , " . $mysql_table_prefix . "link_keyword5 , " . $mysql_table_prefix . "link_keyword6 , " . $mysql_table_prefix . "link_keyword7 , " . $mysql_table_prefix . "link_keyword8 , " . $mysql_table_prefix . "link_keyword9 , " . $mysql_table_prefix . "link_keyworda , " . $mysql_table_prefix . "link_keywordb , " . $mysql_table_prefix . "link_keywordc , " . $mysql_table_prefix . "link_keywordd , " . $mysql_table_prefix . "link_keyworde , " . $mysql_table_prefix . "link_keywordf , " . $mysql_table_prefix . "pending , " . $mysql_table_prefix . "query_log , " . $mysql_table_prefix . "sites , " . $mysql_table_prefix . "site_category , " . $mysql_table_prefix . "temp"winking smiley;
mysql_query("OPTIMIZE TABLE " . $mysql_table_prefix . "categories , " . $mysql_table_prefix . "domains , " . $mysql_table_prefix . "keywords , " . $mysql_table_prefix . "links , " . $mysql_table_prefix . "link_keyword0 , " . $mysql_table_prefix . "link_keyword1 , " . $mysql_table_prefix . "link_keyword2 , " . $mysql_table_prefix . "link_keyword3 , " . $mysql_table_prefix . "link_keyword4 , " . $mysql_table_prefix . "link_keyword5 , " . $mysql_table_prefix . "link_keyword6 , " . $mysql_table_prefix . "link_keyword7 , " . $mysql_table_prefix . "link_keyword8 , " . $mysql_table_prefix . "link_keyword9 , " . $mysql_table_prefix . "link_keyworda , " . $mysql_table_prefix . "link_keywordb , " . $mysql_table_prefix . "link_keywordc , " . $mysql_table_prefix . "link_keywordd , " . $mysql_table_prefix . "link_keyworde , " . $mysql_table_prefix . "link_keywordf , " . $mysql_table_prefix . "pending , " . $mysql_table_prefix . "query_log , " . $mysql_table_prefix . "sites , " . $mysql_table_prefix . "site_category , " . $mysql_table_prefix . "temp"winking smiley;
?>

Database contains: 325 sites, 122837 links, 37 categories and 3307500 keywords
http://www.cyberfun.ro/
Re: Script to REPAIR and OPMIZE your database
February 08, 2008 02:33PM
could you please tell me wher should i put this code please, thanks in advance
Re: Script to REPAIR and OPMIZE your database
February 10, 2008 04:32AM
Yes, please advise us where to put this code??
Re: Script to REPAIR and OPMIZE your database
February 12, 2008 12:28AM
anyone please
Re: Script to REPAIR and OPMIZE your database
February 12, 2008 03:46PM
You put the code in a PHP file and then execute it winking smiley
Re: Script to REPAIR and OPMIZE your database
February 13, 2008 08:40PM
And...? Is it working or must we be carefull? It sounds very good, but I don't want to mess up +500.000 links/database. It's alot of work winking smiley
Re: Script to REPAIR and OPMIZE your database
February 14, 2008 09:10AM
I've set it in a cron and it doesn't seem to mess it up (I'm using cybernet's code). Go for it.
Re: Script to REPAIR and OPMIZE your database
February 14, 2008 06:14PM
thx!
Re: Script to REPAIR and OPMIZE your database
February 15, 2008 12:54AM
thanks man
Re: Script to REPAIR and OPMIZE your database
November 19, 2009 05:06PM
looks fine, but we should re-invent the wheel? the corruption of databases can be fixed by Recovery Toolbox for SQL Server application, for example. Get the [url=http://www.recoverytoolbox.com/microsoft_sql_server_database_repair_tool.html]best sql database repair tool[/url] and try to reindex the database beyond question
t-p
Re: Script to REPAIR and OPMIZE your database
November 20, 2009 12:26AM
in the code, what does the "smile" gif mean?

thanks.

-tp
Re: Script to REPAIR and OPMIZE your database
November 20, 2009 07:40AM
If you quote the message with the code in it you will see the code without the smiley.
Apparently the smiley is only a (
t-p
Re: Script to REPAIR and OPMIZE your database
November 20, 2009 04:20PM
Willy Wrote:
-------------------------------------------------------
> If you quote the message with the code in it you
> will see the code without the smiley.
> Apparently the smiley is only a (


Thanks Willy.

But in some posts I remember it was indicated to read smiley as winking smiley

and ),

Does this smiley means different in different posts then? O do mean just one thing as you indicated "(" (without quotation) in all posts? I am really confused on this. I just want to get it right.

Thanks again for your help.

-tp
Re: Script to REPAIR and OPMIZE your database
November 20, 2009 05:46PM
I believe it should read as ) in all cases.

Anyway, the way to check the correct code is to quote the message and copy the code from there, I think.
t-p
Re: Script to REPAIR and OPMIZE your database
November 21, 2009 12:08AM
Thanks Willy.
appreciate your help.

-tp
Re: Script to REPAIR and OPMIZE your database
December 18, 2009 06:34PM
I know easier ways to restore corrupted databases, this task can be performed by the [url=http://www.recoverytoolbox.com/microsoft_tool_for_ms_sql_recovery_for_sql_server_2000_corrupt_database.html]best mssql recovery[/url] program.
Re: Script to REPAIR and OPMIZE your database
February 11, 2010 05:30PM
Thank for the code. It helps now. saved as PHP file and it doesn't make my site a mess. Nice one! smiling smiley

"Always turn a negative situation into a positive situation."
Editor @ [url=http://www.daily-reviews.com]Daily Reviews[/url]
Re: Script to REPAIR and OPMIZE your database
May 27, 2010 04:47AM
suretalu Wrote:
-------------------------------------------------------
> I know easier ways to restore corrupted databases,
> this task can be performed by the best mssql
> recovery program.


SQL ist "not" MySQL!
Re: Script to REPAIR and OPMIZE your database
August 23, 2011 03:35PM
SQL files may be fixed owing to [url=http://www.mdfrecoverytool.com]mdf recovery[/url]. The tool can work with sql databases from local area network. It can't modify your source data during restoration. The utility supports all popular versions of Windows OS.
Re: Script to REPAIR and OPMIZE your database
January 19, 2012 10:50AM
There are two most important files in SQL i.e. .mdf and .LDF. Any corruption in these files makes you database inaccessible. You will encounter several error messages while trying to execute the query. In serious situation you may even fails to launch the application. For the safety of data it is very essential for you to [url=http://www.mssqldatabaserepair.org]repair SQL database[/url] as soon as possible. In order to repair database you can try third party sql repair tool.


[img]http://4.bp.blogspot.com/_IfZogJM_8EM/TKqi8S3uOzI/AAAAAAAAACU/3RBDYbCG824/s320/sql.jpg[/img]
Re: Script to REPAIR and OPMIZE your database
August 24, 2013 04:53AM
SQL Recovery software is easier way to Fix & [url=http://www.mdf.sqlrepairtool.net/]Repair MDF file[/url] along with all components.

[url=http://www.ms.sqlrestore.org]http://www.ms.sqlrestore.org[/url]

[url=http://www.article.fixsqlserver.net/corrupted-mdf-file-repair.html]http://www.article.fixsqlserver.net/corrupted-mdf-file-repair.html[/url]



Edited 1 time(s). Last edit at 11/14/2013 08:56AM by sapvikpramay.
Sorry, only registered users may post in this forum.

Click here to login