怎样在sql*plus中导人数据库?急

解决方案 »

  1.   

    不用sqlplus
    直接敲命令
    imp ....
    导出的命令是exp...
      

  2.   

    编辑脚本文件.   (C:\Test.sql)   
      conn   system/manager   
      --创建新的用户:如user1/pass1,赋予connect,resource权限。   
      grant   connect,resource   to   user1   identified   by   pass1;   
      create   table   test(a   number,b   char(19));   
      insert   into   test   values(1,to_char(sysdate,'yyyy-mm-dd   hh24:mi:ss'));   
      insert   into   test   values(2,to_char(sysdate,'yyyy-mm-dd   hh24:mi:ss'));   
      insert   into   test   values(3,to_char(sysdate,'yyyy-mm-dd   hh24:mi:ss'));   
      commit;   
      2.   调用脚本文件.   
    在sql plus里输入 @C:\test.sql"
    不过一般在  9i里
    导入 :  imp user/pass@服务名 file=导入dmp的路径 log=生成log文件的位置(导入时加个日志查看) 
    导出:   exp user/pass@服务名 file=导出文件存放的路径 log= 生成log文件的位置(导入时加个日志查看)
    具体参数在命令行输入: 
    imp help=y
    or
    exp help=y
      

  3.   


     这个要看你是什么样的数据了 要是在数据库中的数据,EXP和IMP就比较方便 要是EXCEL中的数据,就有很多方法了
     可以用ORACLE自带的sqlploader
     可以先导入到sqlserver,在由sqlserver导入到oracle,这个很方便,不需要进行数据转换。
     也可以用pl/sql developer中的文本导入器。
      

  4.   

    你可以搜一个文件,IMP.exe,然后双击运行就可以了。
      

  5.   

    什么样的数据格式?应该是cvs?吧
    用sqlldr导吧.
      

  6.   

    数据的导入: 1.将D:\daochu.dmp 中的数据导入 TEST数据库中。 imp system/manager@TEST file=d:\daochu.dmp imp aichannel/aichannel@HUST full=y file=file= d:\data\newsmgnt.dmp ignore=y 上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入。 在后面加上 ignore=y 就可以了。 2.将d:\daochu.dmp中的表table1导入 imp system/manager@TEST file=d:\daochu.dmp tables=(table1) 数据导出
    1.将数据库中system用户与sys用户的表导出 exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys) 2.将数据库中的表inner_notify、notify_staff_relat导出 exp aichannel/aichannel@TESTDB2 file= d:\data\newsmgnt.dmp tables=(inner_notify,notify_staff_relat)