2012-11-26 1 views
5

Excel VBA를 사용하여 작업 공간 서버에 연결하려고합니다. this page의 정보를 사용하여, 나는이 생산 한 다음SAS IOM 및 VBA를 사용하여 작업 영역 세션 만들기

Dim obSAS As SAS.Workspace 
Dim obWorkspaceManager As New SASWorkspaceManager.WorkspaceManager 
Private Sub Form_Load() 
    Dim obConnection As New ADODB.Connection 
    Dim obRecordSet As New ADODB.Recordset 
    Dim obServerDef As New SASWorkspaceManager.ServerDef 
    Dim xmlString As String 
    obServerDef.Port = 28561 
    obServerDef.Protocol = ProtocolBridge 
    obServerDef.MachineDNSName = "blah.server.com" 
    Set obSAS = obWorkspaceManager.Workspaces.CreateWorkspaceByServer("Ref", _ 
     VisibilityProcess, obServerDef, "[email protected]","MyPass", xmlStr) 
end sub 

내 첫 반응이었다이 :

그래서 작업 공간 서버를 가리 포트 번호를 업데이트
<xml id="combridgeOutput"><connectionAttempts><connectionAttempt> 
    <sasserver></sasserver> 
    <sasmachinednsname>blah.server.com</sasmachinednsname> 
    <sasport>28561</sasport> 
    <saslogin>[email protected]</saslogin> 
    <status>0x80041001</status> 
    <description><Exceptions><Exception> 
    <SASMessage severity="Error"> 
    The client has connected to a SAS (9.2) Metadata Server (v1.0) when 
    it intended to connect to a SAS Workspace Server. 
    </SASMessage> 
    </Exception></Exceptions></description> 
</connectionAttempt></connectionAttempts></xml> 

, 지금은이를 얻을 수 :

<same XML tags as above > 
    <SASMessage severity="Error"> 
    Client [email protected] does not have permission to use server 
    SASMeta - Workspace Server (A5DPDN69.AV000069). 
    </SASMessage> 

오히려이 연습을위한 특수 권한을 설정하지 않았습니까? 어떻게하면 VBA를 SAS 작업 공간 서버 세션에 연결할 수 있습니까?

답변

3

Doh! 잘못된 컴퓨터 이름을 사용하고있었습니다. 참고로 올바른 기계 이름을 얻는 방법이 있습니다! SMC에

  1. 로그인
  2. 확장 서버 관리자
  3. 는 SASApp를 확장
  4. SASApp를 확장 - 논리 작업 공간 서버가

올바른 기계를 볼 수 있습니다, 또한 포트 세부 정보를 표시합니다 ..

관련 문제