SQL Server Performance

openquery - security context

Discussion in 'SQL Server 2005 General DBA Questions' started by devuser, Mar 4, 2010.

  1. devuser New Member

    Hi, I have a linked server object in MSSQL 2005 and already explicitly specified ( configured ) a correct login ID and password.
    I managed to run ( execute ) the SQL openquery statement under ADMIN security context ( windows authentication ) WITHOUT error and return proper result set.
    BUT not for others user - which I intend to allow. Error lines as follow :
    OLE DB provider "MSDASQL" for linked server "AU_DW_REPORT_BW" returned message "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
    OLE DB provider "MSDASQL" for linked server "AU_DW_REPORT_BW" returned message "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
    OLE DB provider "MSDASQL" for linked server "AU_DW_REPORT_BW" returned message "[Oracle][ODBC][Ora]Error while trying to retrieve text for error ORA-12154".
    Msg 7399, Level 16, State 1, Line 2
    The OLE DB provider "MSDASQL" for linked server "AU_DW_REPORT_BW" reported an error. Authentication failed.
    Msg 7303, Level 16, State 1, Line 2
    Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "AU_DW_REPORT_BW".
    Please advise what I LACK OF or any security settings to grant ? Thanks.
  2. satya Moderator

    Welcome to the forums.
    What is the service pack level of SQL Server?
  3. devuser New Member

    Hi Satya,
    Even i already pacth the MSSQL 2005 with SP3 (4035) yesterday - but the problem still persists.
    Any hope ? Thanks in advance ; )
  4. Adriaan New Member

    So it's working with WIndows authentication, and it fails with a SQL login?
    Are you sure the remote server is set for Mixed Authentication? It will let you create a SQL login, even if it is set to Windows only - you just won't be able to connect that way.
    Changing the authentication model involves a restart of the service.
    Also it appears that there's a connection being made to Oracle.
    Best idea is to connect to the remote server through SSMS, logging on as the SQL user, and execute the query from the query window - see how far you get that way.
  5. devuser New Member

    Nope. I mean :
    - Correct login ID and password already explicitly specified ( configured ) into linked server object ( to pull data from Oracle ).
    - Myself with ADMIN security context able to execute the openquery statement successfully.
    - BUT Normal developer having problem with the openquery statement ( using exactly the same SQL )
    - It seems like Normal developer lack of certain permission rights to enable/allow them to execute openquery statement ( in general - not specially on this linked server object ) Therefore, any specific database rights that I need to grant for developer ?
    Regards,
  6. Adriaan New Member

    The OPENQUERY bit is throwing errors for itself, which obscures the problems that are occurring at the remote server.
    You'd get a better impression of the underlying problem if you connect directly from Management Studio, with the SQL login.

Share This Page