Showing posts with label objects. Show all posts
Showing posts with label objects. Show all posts

Friday, March 30, 2012

Linking or importing Active Directory objects to SQL Server tables

We're trying to figure out whether it's possible to link AD objects to SQL tables. For example, if we have a table of Users and a table of Companies, we'd like to enter the users into Active Directory, create the Companies as either OU's or Security Groups, then have those entities magically appear in the corresponding SQL Server tables. Is that possible? Thanks in advance.

There is a OLE DB Provider for MIcrosoft Directory Services http://msdn2.microsoft.com/en-us/library/aa172728(SQL.80).aspx.

Would that work for you?

Kar

sql

Monday, March 19, 2012

servers - provider click gives error

Hi,

I'm getting following error when I click on providers of Linked server objects. It's doesn't show any providers.

I'm using SQl server 2005 std edition.

TITLE: Microsoft SQL Server Management Studio

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Cannot insert the value NULL into column 'Description', table 'tempdb.dbo.#OLEDBProv_000000000021'; column does not allow nulls. INSERT fails.
The statement has been terminated. (Microsoft SQL Server, Error: 515)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=515&LinkId=20476


BUTTONS:

OK

Thanks in Advance,

Rajesh

When you click the provider list the following code executes internally...

One of the providers parse name is returning null where as temp table is not allowing null..

Run EXECUTE master.dbo.xp_enum_oledb_providers procedure and see which provider is causing the problem..

create table #OLEDBProv ( Name sysname NOT NULL, ParseName sysname NOT
NULL,Description sysname NOT NULL ) insert #OLEDBProv EXECUTE master.dbo.xp_enum_oledb_providers


SELECT
op.Name AS [Name],
'Server[@.Name=' + quotename(CAST(serverproperty(N'Servername') AS sysname),'''') + ']' + '/OLEDBProvider[@.Name=' + quotename(op.Name,'''') + ']' AS [Urn]
FROM
#OLEDBProv op
ORDER BY
[Name] ASC
drop table #OLEDBProv

|||

Thanks for you help..!!. I found provider that causing error MSDAORA.

Trying to figure out how to update value.