数据导入导出问题

[复制链接]
查看11 | 回复8 | 2005-10-30 17:05:33 | 显示全部楼层 |阅读模式
现服务器有问题,准备处理,我的想法是:找一台机子,装同一版本的oracle,字符集一致,然后从服务器中把数据导出来,用用户方式,服务器处理好后,从备用机上把数据导回去,把原来的数据覆盖,以前做过,好象不是很成功,不知何故?我知道可以把服务器上的用户删除,然后重新建用户,然后再导数据是可以的,不知有没有更好的办法?
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
最初由 2020 发布把原来的数据覆盖 [/B]
???
It won't work, you need to truncate all the old data first, otherwise you have old+new data in your database.
You can also drop tables, or drop users.
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
能否具体一点?我没什么经验。谢谢!
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
if you have database A, it has user UA, the user has table TA, TA has 10 rows.
now you export all data of user UA.
Then you import it back, you will have 20 rows in TA, it won't overwrite the old data.
What you need to do :
- export, then make TA empty, then import table TA
or
- export, drop table TA, then import table TA
or
-export , drop user UA, then import user UA(you need to import from a full database export here)
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
aaahhh if you have database A, it has user UA, the user has table TA, TA has 10 rows.
now you export all data of user UA.
Then you import it back, you will have 20 rows in TA, it won't overwrite the old data.
What you need to do :
- export, then make TA empty, then import table TA
or
- export, drop table TA, then import table TA
or
-export , drop user UA, then import user UA(you need to import from a full database export here

1。user下共有400多table.
2.在备用机上,文件目录结构不一样,用full也没用,看来只能删除user,。然后重新建。
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
请大家再看看。
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
请大家帮忙再看看有没有更好的办法。
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
说得很明确了
在B上重新安装数据库,再倒入就可以了
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
以用户模式exp,删除源数据库中此用户的对象,再imp。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行