[SQLDownUnder] Script in SQL2005


    [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
    • From: Kristen Harvey
    • Subject: [SQLDownUnder] Script in SQL2005
    • Date: Sun, 26 Mar 2006 18:16:04 -0800

    Hi All,
    
    I'm having a bit of trouble with a script.  The script below works fine
    on SQL2000, but when I run it on SQL 2005 I get the below error.
    
    SELECT *
      INTO TMP_AD
      FROM OpenQuery( 
    ADSI,'<LDAP://Server/OU=User
    Accounts,DC=company,DC=com,DC=au>;(&(objectCategory=Person));
    sAMAccountName, givenName, sn, company, title, mail, department,
    adspath;subtree')
    
    Msg 7321, Level 16, State 2, Line 1
    An error occurred while preparing the query "<LDAP://Server/OU=User
    Accounts,DC=company,DC=com,DC=au>;(&(objectCategory=Person));
    sAMAccountName, givenName, sn, company, title, mail, department,
    adspath;subtree" for execution against OLE DB provider "ADSDSOObject"
    for linked server "ADSI". 
    
    I run this first on both scripts
    
    EXEC sp_addlinkedserver 
    'ADSI', 
    'Active Directory Services 2.5', 
    'ADSDSOObject', 
    'adsdatasource'
     
    EXEC sp_addlinkedsrvlogin
    'ADSI',
    'false',
    NULL,
    NULL,
    NULL
    
    Regards
    Kristen
    
    ---------------------------------------------------------------------------
    This email is private and confidential and may contain legally privileged and/or commercially sensitive information.
    
    If this communication is not intended for you and you are not an authorised recipient of this email, you are prohibited from dealing with or relying on the email or any file attachments.  This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information.  If you have received this email in error, we request you contact the sender immediately by return email and then destroy any electronic or paper copy of this message.
    
    Reasonable steps have been taken to ensure the accuracy and the integrity of this communication but the sender and his/her employer accepts no liability for materials transmitted or for results of any actions taken or not on the basis of the information in this communication.  Privilege in the contents of the email or any file attachments is not waived if the email is inadvertently sent to the wrong address.  This email has been scanned through virus scanning software, but no guarantee is given that this email and any file attachments are virus free.
    ---------------------------------------------------------------------------
    
    
    to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net
    
    
    
    
    



    (Click here for more information on the sqldownunder mailling list)