Author |
Topic |
piyushkothari
Starting Member
6 Posts |
Posted - 2005-05-17 : 04:36:17
|
Hi All,How can I find whether one particular table is corrupted or not in MSDE?I know there is a command DBCC CHECKDB and DBCC CHECKTABLE which will do clean and repair,but apart from this is there any other way to know table corruption?Also if I have to manually corrupt any table,how can I do that?Thanks in advance,Piyush. |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-05-17 : 07:16:51
|
Those DBCC commands are the only way to check for corrupted tables. Why would you want to deliberately corrupt a table anyway? |
|
|
piyushkothari
Starting Member
6 Posts |
Posted - 2005-05-17 : 07:27:35
|
I just wanted to know how the DBCC commands work.So i wnated to forcefully corrupt the tables.I have few master tables.I need to first check whether they are corrupted OR not.If they are corrupted,I need to replace the corrupted data with the fresh data. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-05-17 : 07:36:01
|
If you don't want to run DBCC on them, you can simply drop the table, recreate it, and insert the data.Table corruption usually takes the form of invalid page chains or page allocations. DBCC CHECKTABLE etc. look at these and determines if they are incorrect and fixes them if it can. Books Online has more information under "pages", and the DBCC CHECKTABLE entry describes very clearly what it does. |
|
|
piyushkothari
Starting Member
6 Posts |
Posted - 2005-05-17 : 07:39:45
|
Thanks for your reply.One more question.How can be we do export/import of data from a particualr table in MSDE?I mean what commands are there?Thanks for your help. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-05-17 : 07:43:50
|
bcp is a command-line tool that can import and export data to files. Books Online has all the details. It takes some time to get the hang of it but once you do it's very easy to use, and fast too. |
|
|
piyushkothari
Starting Member
6 Posts |
Posted - 2005-05-17 : 08:20:13
|
I tried this command for taking dump dump table EAPPLICATION.eapp_t_agent to disk = 'C:\EAPP12.dmp';but I am getting this error messageBACKUP TABLE is not yet implemented.Please advise |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-05-17 : 18:12:35
|
DUMP TABLE is not supported in SQL Server or MSDE/SQL Express. You can only backup databases and transaction logs. Exporting data from a single table requires bcp or DTS. |
|
|
piyushkothari
Starting Member
6 Posts |
Posted - 2005-05-18 : 04:01:36
|
From where can I get bcp.exe?I do not have in mS sQL Server folder? |
|
|
piyushkothari
Starting Member
6 Posts |
Posted - 2005-05-18 : 04:12:14
|
I think both BCP and DTS are external utilities.DO we have something in MSDE to do import/export?I mean using some commands or something. |
|
|
|