现在用户要求用程序(C#)实现导出oracle下的用户!例如(scott)请大家给个存储过程!或其他高见

解决方案 »

  1.   

    在程序中直接从数据字典中查询就可以
    select * from all_users;
      

  2.   

    导出oracle下的用户?
    什么意思,是导出用户下的数据吗?
    还是查出用户名,如果是那样的话,那就不是导出了。
      

  3.   

    CREATE OR REPLACE PROCEDURE Users_Info
    AS
      v_OutFile UTL_FILE.FILE_TYPE;
      Cursor User_Info is
      SELECT *
      FROM ydgh.USERS@land where userid=201;
      RefUser User_Info%rowtype;    --代表检索集
      incount number;
    BEGIN
       incount := 0;
       open User_Info;
       v_OutFile := UTL_FILE.FOPEN('d:\log','Users_Info','w');
       UTL_FILE.PUTF(v_OutFile,'%s            %s\n','userid','数据有错误表现出来');
       loop
         <<continue_label>>            --重复调用
        fetch User_Info into RefUser;
        exit when User_Info%notfound;
         INSERT INTO POWER.USERT(ID,NAME,LOGNAME,PASSWORD,GROUPID,ISOBSOLETE)
         VALUES(330,RefUser.USERNAME,'abc',RefUser.PASSWORD,2,0);
        end loop;
       close User_Info;
       UTL_FILE.FCLOSE(v_OutFile);
    END Users_Info;
    /