本帖最后由 pensheng 于 2012-11-06 17:11:31 编辑

解决方案 »

  1.   

    在SQL SERVER中 需要开启高级选项。
      

  2.   

    --开启xp_cmdshell
    --SQL Server blocked access to procedure 'xp_cmdshell'
    sp_configure 'show advanced options', 1
    go
    reconfigure
    go
    sp_configure 'xp_cmdshell', 1
    go
    reconfigure
    go--开启sp_OACreate
    --SQL Server blocked access to procedure 'sys.sp_OACreate'
    sp_configure 'show advanced options', 1;
    go
    reconfigure;
    go
    sp_configure 'ole automation procedures', 1;
    go
    reconfigure;
    go
    sp_configure 'Ad Hoc Distributed Queries',1;
    go
    reconfigure
    go
      

  3.   

    连接服务器rpc out设置为true
      

  4.   

    版主你好,我刚才让同事按你说的测试了,调用查询成功,调用存储过程还是报一样的错,会不会是我的权限没设置对?但我99%确定我是设了权限的 。 我用 grant 赋过权限了,赋的是 dba 权限给用户
      

  5.   


    感谢兄弟回答,已经设置成了TRUE ,还是不行
      

  6.   

    创建读取HIS数据并写入的临时表
    if OBJECT_ID('tempdb.dbo.#temp') is not null 
    drop table #temp
    create table #temp (no  varchar(50))--把HIS取得的摆药数据插入到临时表中
    set xact_abort ON
    declare @ssqlA varchar(3000)
    set @ssqlA='exec (''
    DECLARE
    salarytwo  varchar2(50);salnametwo varchar2(50);
    BEGIN
      gettesttwo(1,salarytwo,salnametwo);
      DBMS_OUTPUT.PUT_LINE(salarytwo);
      DBMS_OUTPUT.PUT_LINE(salnametwo);
    END;'') AT testtwo;'
    --insert into #temp
    exec (@ssqlA)--select * from #temp以上语句能够调用到ORACLE的存储过程了,但还是不能把存储过程执行出来的内容搞到SQL的临时表中,请大侠们继续指教!!