SQL 2012 :: How To Connect To Server Via LDAP

May 6, 2015

I have very unusual question. I have seen a query that looks something like this:

SELECT A, B, C FROM 'LDAP://abc.def.com'

What exactly does this mean? Could such a query be executed in the SQL Server Management Studio? Where would such a table/database be actually located?

View 3 Replies


ADVERTISEMENT

LDAP - HOW DO I CONNECT TO LDAP DB FROM SQL SERVER 2005?

Dec 12, 2006

This is something that should not be so difficult, but it is proving to be very cumbersome.
I need to query an LDAP database on a Linux server FROM a sql server, namely sql server 2005.
I have found bits and pieces, but can€™t seem to put it all together yet €“ it should be easy, but it€™s proving to be very difficult.
It seems like you can either link an LDAP server through sp_addlinkedserver OR through enterprise manager/sql server studio, you can create a LINKED SERVER.
The problem is HOW to do this.
Here are the parameters for the ldap server:
Server name: serverabc
Ldap info (which I don€™t know how to label) is: 'ou=Hosts,dc=mc,dc=vanderbilt,dc=edu'.
I was able to somehow get this to work last week, but now it€™s not working - it didn't return any data, as i don't have any ldap hierarchy specified, but at least it came back with "command completed successfully":
SELECT * FROM OPENQUERY( [serverabc],
'SELECT * FROM ''LDAP://serverabcu/ OU=Hosts,DC=mc,DC=vanderbilt,DC=edu''
')
With all the ldap usage out there, this is really frustrating not being able to find out how to do this.
Any help is greatly appreciated.
Thanks


View 3 Replies View Related

SQL 2012 :: Adding ADSI LDAP Server Connection Inside CMS Collection?

Jun 17, 2014

Is there a way to query the LDAP from inside the CMS? I know I can add a linked server in a singular instance but I'd like to do it inside a server group. I haven't found anything so far about querying the LDAP inside a server group so it might not be possible?

View 4 Replies View Related

Connect To A Novell NDS Datasoource Via LDAP

Feb 5, 2007

Hi All,

Is there a connector in Connections Manager that can access a Novell NDS tree and help to pull data in an SSIS package?

Thanks,

BIG S

View 7 Replies View Related

Site Server, LDAP

Oct 2, 2000

Hi,
can anyone tell me how exactly sql server7 interacts with Site Server, LDAP.
I am a sql dba, trying to work with above ones. Anyone pls suggest me any book or material or ur ideas.

Thanks!

--Siva

View 1 Replies View Related

Linked Server To Third Party LDAP

Apr 14, 2006

I thought I was successful in linking SQL to a Third Party LDAP in the past, but I cannot get it to work now. It has been about 2 years ago I played with this. The LDAP does require authentication and I think that is where the problem lies, but if anyone can tell me if there is a way to do this and what the steps are I would greatly appreciate it.

View 2 Replies View Related

SQL 2012 :: Could Not Connect To Server Using Alias

Feb 17, 2015

I had two servers, in which SQL Servers are installed. I created a alias for server

Server 1 : test1.sqlcloud.com (Alias name with port no other than 1433)
Server 2 : test2.sqlcloud.com (Alias name with port no other than 1433)

I can connect to the servers using the port. for ex server1 to server2 and viceversa using "test2.sqlcloud.com,port". But I could not connect to the server by only specifying the alias name ("test2.sqlcloud.com"). When I am connecting I am getting the following error.

"TITLE: Connect to Server
------------------------------

Cannot connect to test2.sqlcloud.com.

------------------------------

ADDITIONAL INFORMATION:

Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21020; handshake=0; (Microsoft SQL Server, Error: -2)

View 1 Replies View Related

SQL 2012 :: DAC - Failed To Connect To Server

Sep 1, 2015

Enabled DAC and when connecting, I get a "Failed to connect to server ADMIN:SERVERINSTANCE"; however query window shows I'm connected on ADMIN:SERVERINSTANCE and checking tcp_endpoints + dm_exec_sessions, I'm definitely on the DAC.

View 1 Replies View Related

SSMS 2012 - Connect To Server Box

Sep 15, 2015

Every time I start SSMS 2012 the "Connect to Server" box is partially obscured in that the top of it, the move bar can't be accessed. I've manually moved it using "alt+space" then "M" followed by the arrow keys, but it's getting annoying.  Is there any way to change the initial start position of this box? 

View 6 Replies View Related

SQL 2012 :: Applications Cannot Connect Because Logins Cannot Connect To Their Default Databases

Oct 17, 2014

I designed the AlwaysOn wrong, but every time we fail over from primary server to another server, my applications cannot connect because the sql logins cannot connect to their default databases. Once I run the command to link the login with the user in the default database then the users are able to connect. Did I do something wrong when designing AlwaysOn?

View 9 Replies View Related

SQL 2012 :: Reporting Server - Unable To Connect

Jun 22, 2015

I am unable to connect to reporting server , services are running fine .Checked in logs and found

ERROR: Error initializing configuration from the database: Microsoft.ReportingServices.Library.ReportServerDatabaseUnavailableException: The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. ---> System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

How to resolve this ..

View 8 Replies View Related

Authenticating Against LDAP/Active Directory With SQL Server 2000 SP2

Jun 4, 2007

Hello everyone,

We have a custom application that connects remotely to a SQL Server 2000 (SP2) database. We would like our application to validate a user's login against Active Directory.

So far I have been able to get a lookup working, but I can not find documentation on how to validate the password from within SQL Server. I found a lot of notes on using ASP.NET objects, or VB, C#, etc, but for this solution it must be done entirely in SQL. It would also be nice if this were SQL Server 2005; we could just embed the C# code and call it as a SQL stored proc, but unfortunately we are left with the constraint that we cannot upgrade this DB at this time.


Linked server 'ADSI' is set up with the sp_addlinkedserver command:

EXEC master.dbo.sp_addlinkedserver @server = N'ADSI', @srvproduct=N'Active
Directory Services 2.5', @provider=N'ADsDSOObject', @datasrc=N'adsdatasource'


Two table functions in our test DB (trying to test both ways I've found in docs):

ALTER FUNCTION [dbo].[GetAuthenticatedUserViaLDAP]
(
-- Add the parameters for the function here
@userId nvarchar(50),
@password nvarchar(50)
)
RETURNS TABLE
AS
RETURN
(
-- Add the SELECT statement with parameter references here
SELECT [SAMAccountName], CN [Name], SN [Last Name], ST State
FROM OPENQUERY( ADSI,
'<LDAP://DC=company,DC=com>;((objectClass=user));SAMAccountName,cn,sn,st')
WHERE [SAMAccountName] = @userId
)

ALTER FUNCTION [dbo].[GetAuthenticatedUser]
(
-- Add the parameters for the function here
@userId nvarchar(50),
@password nvarchar(50)
)
RETURNS TABLE
AS
RETURN
(
-- Add the SELECT statement with parameter references here
SELECT [SAMAccountName], [Name], SN [Last Name], ST State
FROM OPENQUERY( ADSI,
'SELECT SAMAccountName, Name, SN, ST
FROM ''LDAP://bdsserver1/ CN=users,DC=company,DC=com''
WHERE objectCategory = ''Person''
AND objectClass = ''user'' ')
WHERE [SAMAccountName] = @userId
)


So calling either of these table functions from our custom application gives the same result:

select * from dbo.GetAuthenticatedUser('astonaker','abc')
OR
select * from dbo.GetAuthenticatedUserViaLDAP('astonaker','abc')


ResultSet:

'astonaker', 'Anthony', 'Stonaker' 'NULL'


So I can at least tell if a given user exists or not, but I have no visibility into whether the password they entered into our application is valid in LDAP.

I don't want to pass unencrypted passwords through the network, but then I don't know how to encrypt/compare these passwords without using the .NET Connection or DirectoryEntry, etc objects.

Any thoughts/suggestions are greatly appreciated!

View 5 Replies View Related

SQL 2012 :: Can Connect Other Server Editions By Express Edition

Sep 29, 2014

We are having 2012 Enterprise Edition,If I installed the Express Edition in other Client system is it possible to connect the Server system by using Express Edition....And Can we Connect the other server editions like Enterprise,Standard..etc by Express edition...

View 2 Replies View Related

Transact SQL :: Linked Server And LDAP - Get Password Expiration Date

Oct 29, 2015

I have configured a Linked Server with Active Directory (LDAP), working properly.

Now, through this Linked Server, I need information about password expiration date in my AD Domain accounts.

View 2 Replies View Related

SQL 2012 :: Setup A Client Alias To Connect To A Named Instance On Another Server?

Jul 23, 2014

I am trying to setup a client alias to connect to a named instance on another server.

TITLE: Connect to Server
------------------------------
Cannot connect to fred.
------------------------------

ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

[URL]

The network path was not found

------------------------------
BUTTONS:
OK
------------------------------

I have set up the alias on the server and as expected it works. On the client side I have used the SQL Server Client Network Utility to configure the client side alias but no luck

I am using TCP/IP with a specific port ..

By the way the SQL is SQL Server 2012 Ent and the O/S is Windows 2012 R2 minshell

View 9 Replies View Related

Integration Services :: Connect To SSIS 2012 Remotely - The RPC Server Is Unavailable

Sep 21, 2015

I have an SQL Server 2012 with SSIS installed on Windows Server 2008 R2 Core. I'd like to connect remotley to SSIS but I receive the following error. 'The RPC server is unavailable.'

View 2 Replies View Related

Integration Services :: Cannot Remote Connect To 2012 / 2014 SSIS Server

Sep 21, 2015

The following error occurred when trying to connect to 2012/2014 SSIS Server using SSMS remotely. Local connection works fine.Using the info from below link does not resolve the problem.  Permissions are granted through DCOM. If this cannot be resolved, packages will have to stored on filesystem instead.
URL....Connecting to the Integration Services service on the computer "" failed with the following error: "Class not registered".

This error can occur when you try to connect to a SQL Server 2005 Integration Services service from the current version of the SQL Server tools. Instead, add folders to the service configuration file to let the local Integration Services service manage packages on the SQL Server 2005 instance.

View 6 Replies View Related

ADSI LDAP Query 1000 Record Limit For MSSQLServer Linked Server

Jul 23, 2005

Hi,I have successfully set and used a linked server to query ADSI.Since this question also concerns MSSQLServer, I've cross posted it --I hope this is not a breach of etiquette.I have successly created a view based on the linked server.Unfortunately, it only shows 1000 records, and there does not seem tobe any way to set the Page Size.I found the following:http://support.microsoft.com/defaul...kb;en-us;243281Which seems to imply that the default can be set by changing registrykey: "HKEY_CURRENT_USERSoftwarePoliciesMicrosoftWind owsDirectoryUI"I have set this key, and also set it for the user account under whichMSSQLServer runs. The value persists after a reboot. The Domain Grouppolicy sets the default to 15000.This behaviour is not restricted to the linked server. If I use thescript found here:http://hacks.oreilly.com/pub/h/1121 I can access morethan 1000 records, but only if I set the "Page Size" property. If Icomment it out to let the default hold, it is 1000.It must be settable SOMEWHERE or the whole linked server thing is ofvery limited use.At present, the best solution I've been able to come up with is to usethe above script modified to run as a DTS package. Yuck.TIA,BM

View 2 Replies View Related

SQL 2012 :: Clustered SSAS Unable To Connect To Named Instance (instance Not Found On Server)

Mar 20, 2014

I have a 3 node cluster on which I have installed SSAS as it's own insntance. I have created this as a named instance and can connect to it by serverinstance if I'm on the server itself. However from my desktop I get the error saying instance was not found on server name.

I have defined an alternate port and setup firewall rules and can connect via server:port but not serverinstance. Prior to making this change SSAS was running on default port of 2383 and I could connect just by servername.

I have read many articles for previous versions saying that clustered SSAS will always use 2383 and that you must connect just using servername. However and this is were it gets strange. I have a 2 node UAT cluster with SSAS setup exactly the same way I've described above and I can connect from my desktop as serverinstance.

Should I be able to connect as serverinstances for a named clustered instance in 2012 ?

View 4 Replies View Related

LDAP With Parameter

Dec 19, 2006

Dear Friends,
Here I have 2 stored procedure to return data via LDAP from Active Directory. The first SP it's OK, but the second doesn't.
The difference is in ''@MyDIR'' because in the second I want to use a paramter... How can I use a paramter in the second SP?
THANKS

1.
CREATE PROCEDURE [dbo].[GD_SP_LDAP_CGD_GET_CNsByDIR]
@MyDIR nvarchar(20)
AS

DECLARE @SQLString NVARCHAR(500);
SET @MyDIR ='DSO'

SET @SQLString = N'SELECT * FROM OPENQUERY(ADSI,''
SELECT name
FROM ''''LDAP://OU=DSO,OU=Estacoes,OU=Servicos-Centrais,OU=cgd,DC=GrupoCGD,DC=com''''
'')';

EXECUTE sp_executesql @SQLString;



2.
CREATE PROCEDURE [dbo].[GD_SP_LDAP_CGD_GET_CNsByDIR]
@MyDIR nvarchar(20)
AS

DECLARE @SQLString NVARCHAR(500);
SET @MyDIR ='DSO'

SET @SQLString = N'SELECT * FROM OPENQUERY(ADSI,''
SELECT name
FROM ''''LDAP://OU='' @MyDIR '' ,OU=Estacoes,OU=Servicos-Centrais,OU=cgd,DC=GrupoCGD,DC=com''''
'')';

EXECUTE sp_executesql @SQLString;

View 1 Replies View Related

LDAP Data Source

Oct 12, 2007

Hi

I need to export data from an LDAP-compliant data source, to a SQL Server database. Is this possible with SQL Server 2005 Integration Services? The Import and Export Wizard
does not appear to support LDAP in the Data Source drop down list.

Thanks

Alan

View 4 Replies View Related

LDAP Data Source

Oct 12, 2007

Hi


I need to export data from an LDAP-compliant data source, to a SQL Server database. Is this possible with SQL Server 2005 Integration Services? The Import and Export Wizard does not appear to support LDAP in the Data Source drop down list.

Thanks

Alan

View 8 Replies View Related

SQL 2012 :: Connect To Localhost But Not 127.0.0.1?

Jul 5, 2014

I am struggling to set a SQL Server Express for remote access...

Since it is the only instance on this server, I have set it up to use port 1433 by amending the IPALL entry of the Server Network Configuration, TCP/IP Properties.

I have also disabled "Shared Memory" and "Named Pipes" to leave only TCP/IP enabled as a server network config.
I have stopped the Browser Service because I think I don't need it if I use port 1433.

From the server itself, I can connect to my SQL Server through "localhostSQLEXPRESS" or "servernameSQLEXPRESS" but not from "10.xxx.xxx.xxxSQLEXPRESS" or "127.0.0.1SQLEXPRESS"

I suppose until I can access my server from itself using the IPAddress, there is no chance connecting remotely...

View 5 Replies View Related

LDAP Authentication For Yellowfin On SQLserver

Mar 27, 2006

Hi,- SQLserver 2000- Yellowfin 2.4- Windows 2003 serverI have been asked to investigate seting up LDAP authentication toaccess ourYellowfin reporting.If anyone has experience in setting this up? Your help would beappreciated.Tips and tricks .. ??ThanksDuncan Beaumont

View 2 Replies View Related

LDAP Vs ADSI Parameter Problem

Nov 22, 2006

Dear friens,
I'm having a problem with ADSI and SQL... Could you tell me, where is the error? The problem surge when I try to use parameter€¦

"
CREATE PROCEDURE TEST
AS
DECLARE @charVariable nvarchar(11);
DECLARE @SQLString NVARCHAR(500);
DECLARE @ParmDefinition NVARCHAR(500);

/* Build the SQL string one time. */
SET @SQLString = N'SELECT * FROM OPENQUERY(ADSI,''SELECT * FROM ''''LDAP://DC=GrupoCGD,DC=com'''' WHERE objectClass = ''''user'''' AND sAMAccountName=@UserID'')'

/* Specify the parameter format one time. */
SET @ParmDefinition = N'@UserID varchar(11)';

/* Execute the string with the first parameter value. */
SET @charVariable = 'rhs0002';
EXECUTE sp_executesql @SQLString, @ParmDefinition,
@userID = @charVariable;
"

ERROR is:
Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing the query "SELECT * FROM 'LDAP://DC=GrupoCGD,DC=com' WHERE objectClass = 'user' AND sAMAccountName=@UserID" for execution against OLE DB provider "ADSDSOObject" for linked server "ADSI".


FOR EXAMPLE THIS VIEW WORKS€¦
USE [dbGestaoDesktop]
GO
/****** Object: View [dbo].[AD_VW_DIR_Users] Script Date: 11/22/2006 11:53:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE VIEW [dbo].[AD_VW_DIR_Users]
AS
SELECT TOP (100) PERCENT cn, createTimeStamp,department, extensionAttribute1
FROM OPENQUERY(ADSI, '
SELECT createTimeStamp,cn, department, extensionAttribute1
FROM ''LDAP://OU=DSO,OU=Utilizadores,OU=Servicos-Centrais,OU=cgd,DC=GrupoCGD,DC=com''

WHERE objectclass=''user''


')
AS MyTable
WHERE (NOT (cn IS NULL))
ORDER BY createTimeStamp

THANKS

View 6 Replies View Related

SQL 2012 :: Unable To Connect To Redirector

Aug 17, 2014

I use SQL Server 2012 Management Studio, SQL Server Data Tools and Visual Studio 2012 to deploy a data mining project.

I get the following error message: A connection can not be made. Make sure the server is running.

I am able to pick up the database using the details below:

Machine Name: NIRMALK01-PC
SQL Server: SQLEXPRESS
SQL EXPRESS: Running

SQL BROWSER: Running
SQL Agent: DISABLED

I can not find Analysis Services in services.msc

This is the error: Error 1

The project could not be deployed to the 'nirmalk01-pcsqlexpress' server because of the following connectivity problems : A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running. To verify or update the name of the target server, right-click on the project in Solution Explorer, select Project Properties, click on the Deployment tab, and then enter the name of the server.

View 2 Replies View Related

SQL 2012 :: Permissions For Connect Any Database?

Feb 24, 2015

We have a monitor tool to monitor our SQL servers.The vendor has a script to grant permission to application account to SQL server so that they can do the monitoring.

I don't want to grant system admin role, but the script they have is very specific, the minimum is:

must be a member of db_datareader role on the msdb database
must have view server state permissions
view any definition
connection permission to master database
execute permission on the xp_readerrorlog stored procedure
connect permission to the msdb database
must be member of db_Datareader role in the msdb datab ase
connect permission to all databases.

The script given by vendor is as follows in the attachment.I don't like the last execute statement for if a new database is created, we have to remember manually add the monitoring acccount to that database.

I know in SQL 2014 it has a new feature of connect to any database, but unfortunately we are using SQL 2012 and 2008.

script to connect to any database but no need to add that each time we creates a new database.

View 5 Replies View Related

Query Users In A Security Group With LDAP

Aug 11, 2004

I have a linked server set up and working correctly. I can create a query to get all the users from active directory with something like this:

SELECT [name], [samaccountname] from OpenQuery( ADSI,
'SELECT name, samaccountname FROM ''LDAP://DC=domain,DC=com'' WHERE objectClass = ''user'' and objectCategory=''Person''')

Now I am trying to select all the users in a specifed security group, but I am not having much luck. What is the best way to get this?

Thanks much.

View 3 Replies View Related

Remote Database Management Through LDAP Tools

Aug 31, 2006

Hai All

How to insert and delete records from a table in the remote database?"

I want it to be done through a tool that used LDAP Servers.

I want tools for the LDAP .



Thank u Advance

Regards
Sunil
aboutknowledge@gmail.com

View 2 Replies View Related

LDAP Query Returning Erroneous Values

Jan 24, 2007

I'm trying to query an LDAP server from a stored procedure written for the CLR but not getting the expected results.

The code is as follows:

<Microsoft.SqlServer.Server.SqlProcedure()> _
Public Shared Sub LDAP_UserExists(<Out()> ByRef exists As Boolean, ByVal username As SqlString)

Dim adspath As New StringBuilder()
adspath.Append(LDAP://[.......]/ou=Members/cn=)
adspath.Append(username)

If username.ToString().Length > 0 Then
Dim uobject As New DirectoryEntry(adspath.ToString(), "", "", System.DirectoryServices.AuthenticationTypes.Anonymous)
If Not (uobject Is Nothing) Then
exists = True
Else
exists = False
End If
End If

End Sub

The same code works fine from an ASP.NET. If I deploy the code and execute it with

exec LDAP_UserExists 'username'

I receive the error

Error converting data type varchar to bit.

And if I right-click and select "Execute Stored Procedure..." I receive @exists = 1 and Return Value = 0, regardless of the value I pass in as the username parameter.

Given that the same code works correctly on the ASP.NET page I suspect that this error has something to do with the <out()> parameter in the stored procedure declaration.

Can anyone suggest the correct method of performing this query?

View 1 Replies View Related

Writing Data From The Integration Services To A SUN LDAP

Oct 29, 2007

Hi All,

I currently have the problem that I have to write some data into a SUN Directory Server 5.2 LDAP directory.
Does anyone know how I can do this. I already found some articles in this forum that provide solutions how to access
the active directory - but how can I access a none Microsoft LDAP Server?

Is there any way to use the OLE DB Destination or do I have to implement my own LDAP adapter in VB.net?

Thanks a lot for help.

View 1 Replies View Related

Query LDAP/ADSI For Group Members?

May 16, 2007

I am trying to get members of an Active Directory group by querying the AD server from Transact-SQL (SQL Server 2005). Although there does not seem to be any written list of LDAP attributes that can be queried in AD (or I am not finding it), I have gotten this far:



SELECT * FROM

OPENQUERY( MYSERVER,

'SELECT cn, msExchHomeServerName, userPrincipalName FROM ''LDAP://CN=Users,DC=MYSERVER,DC=COM'' WHERE userPrincipalName=''*'' ')



This gives me a user list. But I can't find the syntax or attribute name(s) to query in order to get the membership of a specific group - for example, the group "SQL_Developers".



Anybody out there familiar enough with LDAP, AD and OPENQUERY() to give me a hand?



Thanks....



Tom

View 2 Replies View Related

SQL 2012 :: Connect To SAP From SSRS And Execute Reports?

Apr 14, 2014

can i connect to SAP from SSRS and execute reports?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved