Showing posts with label active. Show all posts
Showing posts with label active. Show all posts

Sunday, March 25, 2012

Can we access Active Directory Group in a report?

Is there a way that we can tell what active directory group the person belongs to that is running the report? I know that you can detect a user id, but I need to access the Active Directory Group that they belong to.

I'm not sure if there is another method, but this is the method I used for checking if a user belongs to a particular group. It can be altered to return the group:

Added to the code window.

Code Snippet

Function IsMemberOfGroup(ByVal UserName As String, ByVal GroupName As String) As Boolean
Try
Dim ent As System.DirectoryServices.DirectoryEntry = New System.DirectoryServices.DirectoryEntry("LDAP://DC=domainname,DC=com")

Dim srch As System.DirectoryServices.DirectorySearcher = New System.DirectoryServices.DirectorySearcher("(CN=" + GroupName + ")")
Dim coll As System.DirectoryServices.SearchResultCollection = srch.FindAll()
For Each rs As System.DirectoryServices.SearchResult In coll
Dim resultPropColl As System.DirectoryServices.ResultPropertyCollection = rs.Properties
For Each memberColl As Object In resultPropColl("member")
Dim gpMemberEntry As System.DirectoryServices.DirectoryEntry = New System.DirectoryServices.DirectoryEntry("LDAP://" + memberColl.ToString)
Dim userProps As System.DirectoryServices.PropertyCollection = gpMemberEntry.Properties
Dim obVal As Object = userProps("sAMAccountName").Value
If obVal.ToString = UserName Then Return True
Next
Next
Catch ex As Exception
'Trace.Write(ex.Message)
End Try
Return False
End Function

Thursday, March 22, 2012

Can two separate SQL Server instances on a clustered box share the same resource name such as SQ

I am setting up a two active instances of MS SQL Server on a clustered box. In the past I have set up using the nomenclature SQLCLUSTERNAME\INSTANCE-NAME such as SQLCLUS1\INST1 and SQLCLUS2\INST2.

But, this time the client will like it installed such as SQLCLUS1\INST1 and SQLCLUS1\INST2. I did not think this is possible That is I assumed that cluster resource names have to be unique. But, nevertheless I have tried to do so for the last few days, but no luck.

Can someone please let me know if it is indeed possible to have two separate instances in a single cluster.

BTW, I know this is quite possible with non-clustered instances where the SQLSERV1\INST1 refers to an actual server name, and not a resource name.

You are partially correct.

You CAN have two separate instances in a cluster -but in order for the cluster resource names on both instances to be the same, both instances will have to be installed on the same node. You could do that, making it an Active-Passive cluster -but I don't think that is what you desire. So if you wish both nodes to be Active, then you will have to continue using distinctive resource names (as in your first surmise.)

|||BTW, how would you set up. One Active, and one passive with different instance names.|||The same way that you set up an Active-Active cluster, except you put both instances on the same node.|||I am still a little unsure. Will the instances have names such as SQLCLUS1\INST1 and SQLCLUS1\INST2 or SQLCLUS1\INST1 and SQLCLUS2\INST2.

- Daniel|||

If you are asking about two instances on the same host, then SQLCLUS1\INST1 and SQLCLUS1\INST2 would work.

Instance names can be whatever you desire. The virtual server name will be the same in both cases.

Can two separate SQL Server instances on a clustered box share the same resource name such as SQ

I am setting up a two active instances of MS SQL Server on a clustered box. In the past I have set up using the nomenclature SQLCLUSTERNAME\INSTANCE-NAME such as SQLCLUS1\INST1 and SQLCLUS2\INST2.

But, this time the client will like it installed such as SQLCLUS1\INST1 and SQLCLUS1\INST2. I did not think this is possible That is I assumed that cluster resource names have to be unique. But, nevertheless I have tried to do so for the last few days, but no luck.

Can someone please let me know if it is indeed possible to have two separate instances in a single cluster.

BTW, I know this is quite possible with non-clustered instances where the SQLSERV1\INST1 refers to an actual server name, and not a resource name.

You are partially correct.

You CAN have two separate instances in a cluster -but in order for the cluster resource names on both instances to be the same, both instances will have to be installed on the same node. You could do that, making it an Active-Passive cluster -but I don't think that is what you desire. So if you wish both nodes to be Active, then you will have to continue using distinctive resource names (as in your first surmise.)

|||BTW, how would you set up. One Active, and one passive with different instance names.
|||The same way that you set up an Active-Active cluster, except you put both instances on the same node.|||I am still a little unsure. Will the instances have names such as SQLCLUS1\INST1 and SQLCLUS1\INST2 or SQLCLUS1\INST1 and SQLCLUS2\INST2.

- Daniel
|||

If you are asking about two instances on the same host, then SQLCLUS1\INST1 and SQLCLUS1\INST2 would work.

Instance names can be whatever you desire. The virtual server name will be the same in both cases.

sql

Friday, February 10, 2012

can not login sql server

Hello,
We have a Win 2003 server with SQL 2000 installed. When we upgrade Win 2003
server to Active Directory, then the SQL 2000 can not work any more.
We try to uninstall and install again, window mode or mixed mode.
The error message alwsays say "xxx/administrator is not associated with
trusted SQL server connection" or "login failed for user sa"
ThanksSo you promoted the Server to a domain controller ? The local Administrator
is deactivated with promoting the Server. Although the domain administrators
group is still working and should be associated with the
SystemAdministrators group. I wonder what security Account you typed in for
starting the sql Service ? Did you put in the system account or the
Administrators account ? If you put in the local admin account change it to
start up the server. When do you get thios messages ?
HTH, Jens Smeyer.
"Newbie" <Newbie@.discussions.microsoft.com> schrieb im Newsbeitrag
news:1FA3AC6A-C62A-4570-8242-BE4EBA273DA1@.microsoft.com...
> Hello,
> We have a Win 2003 server with SQL 2000 installed. When we upgrade Win
> 2003
> server to Active Directory, then the SQL 2000 can not work any more.
> We try to uninstall and install again, window mode or mixed mode.
> The error message alwsays say "xxx/administrator is not associated with
> trusted SQL server connection" or "login failed for user sa"
> Thanks|||So you promoted the Server to a domain controller ?
Yes.
The local Administrator is deactivated with promoting the Server. Although
the domain administrators group is still working and should be associated
with the SystemAdministrators group.
I wonder what security Account you typed in for starting the sql Service ?
Did you put in the system account or the Administrators account ?
If you put in the local admin account change it to start up the server. When
do you get this messages ?
I tried administrator first, the error message is "xxx/administrator is not
associated with trusted SQL server connection"
Then I installed again with mixed mode, the error message is "login failed
for user sa"
Thanks

can not login sql server

Hello,
We have a Win 2003 server with SQL 2000 installed. When we upgrade Win 2003
server to Active Directory, then the SQL 2000 can not work any more.
We try to uninstall and install again, window mode or mixed mode.
The error message alwsays say "xxx/administrator is not associated with
trusted SQL server connection" or "login failed for user sa"
ThanksSo you promoted the Server to a domain controller ? The local Administrator
is deactivated with promoting the Server. Although the domain administrators
group is still working and should be associated with the
SystemAdministrators group. I wonder what security Account you typed in for
starting the sql Service ? Did you put in the system account or the
Administrators account ? If you put in the local admin account change it to
start up the server. When do you get thios messages ?
HTH, Jens Süßmeyer.
"Newbie" <Newbie@.discussions.microsoft.com> schrieb im Newsbeitrag
news:1FA3AC6A-C62A-4570-8242-BE4EBA273DA1@.microsoft.com...
> Hello,
> We have a Win 2003 server with SQL 2000 installed. When we upgrade Win
> 2003
> server to Active Directory, then the SQL 2000 can not work any more.
> We try to uninstall and install again, window mode or mixed mode.
> The error message alwsays say "xxx/administrator is not associated with
> trusted SQL server connection" or "login failed for user sa"
> Thanks|||So you promoted the Server to a domain controller ?
Yes.
The local Administrator is deactivated with promoting the Server. Although
the domain administrators group is still working and should be associated
with the SystemAdministrators group.
I wonder what security Account you typed in for starting the sql Service ?
Did you put in the system account or the Administrators account ?
If you put in the local admin account change it to start up the server. When
do you get this messages ?
I tried administrator first, the error message is "xxx/administrator is not
associated with trusted SQL server connection"
Then I installed again with mixed mode, the error message is "login failed
for user sa"
Thanks

can not login sql server

Hello,
We have a Win 2003 server with SQL 2000 installed. When we upgrade Win 2003
server to Active Directory, then the SQL 2000 can not work any more.
We try to uninstall and install again, window mode or mixed mode.
The error message alwsays say "xxx/administrator is not associated with
trusted SQL server connection" or "login failed for user sa"
Thanks
So you promoted the Server to a domain controller ? The local Administrator
is deactivated with promoting the Server. Although the domain administrators
group is still working and should be associated with the
SystemAdministrators group. I wonder what security Account you typed in for
starting the sql Service ? Did you put in the system account or the
Administrators account ? If you put in the local admin account change it to
start up the server. When do you get thios messages ?
HTH, Jens Smeyer.
"Newbie" <Newbie@.discussions.microsoft.com> schrieb im Newsbeitrag
news:1FA3AC6A-C62A-4570-8242-BE4EBA273DA1@.microsoft.com...
> Hello,
> We have a Win 2003 server with SQL 2000 installed. When we upgrade Win
> 2003
> server to Active Directory, then the SQL 2000 can not work any more.
> We try to uninstall and install again, window mode or mixed mode.
> The error message alwsays say "xxx/administrator is not associated with
> trusted SQL server connection" or "login failed for user sa"
> Thanks
|||So you promoted the Server to a domain controller ?
Yes.
The local Administrator is deactivated with promoting the Server. Although
the domain administrators group is still working and should be associated
with the SystemAdministrators group.
I wonder what security Account you typed in for starting the sql Service ?
Did you put in the system account or the Administrators account ?
If you put in the local admin account change it to start up the server. When
do you get this messages ?
I tried administrator first, the error message is "xxx/administrator is not
associated with trusted SQL server connection"
Then I installed again with mixed mode, the error message is "login failed
for user sa"
Thanks

Can not Log in with windows user after installing active directory

After installing active directory I failed to connect SQL server 2000 with
eather with Active directory user accont and sa.
It's showing a messege unable to connect sql server Mainserver\SQL2000DB
server msg 17, level16 state 1
server does not exist or access denied.
Please helpasif (jossy881@.nospam.com) writes:
> After installing active directory I failed to connect SQL server 2000 with
> eather with Active directory user accont and sa.
> It's showing a messege unable to connect sql server Mainserver\SQL2000DB
> server msg 17, level16 state 1
> server does not exist or access denied.
That message does not anything to do with Active Directory, I would
guess. The message means that you never get in contact with SQL Server.
It could be because it's not running, or because some firewall that is
in the way.
See this KB article for a troubleshooter:
http://support.microsoft.com/defaul...B;EN-US;q328306
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx