Friday, March 30, 2012
How can I retrieve domain username for group login?
The goal is to use domain group logins, while still allowing for logging what user performed which action.USER_NAME retrieves the database username, suser_name returns (of course) NULL as this is not a sql user.
Really?
When I query suser_sname() while logged in under a windows domain account (using a windows domain group login) I get my DOMAIN\UserName.
Regards,
hmscott
how can i rename a login (change the domain)?
I would like to rename a login SAMPLE-IT\bean to NEWDOMAIN\bean, but i get this message:
"The name change cannot be performed because the SID of the new name does not match the old SID of the principal."
the command is : alter login [SAMPLE-IT\bean] with name=[NEWDOMAIN\bean]
server is sql2005 std (initial base)
what can i do ( there are lot of db on this instance and there are lot of instance where I have to change the domain of the user...) ... and there are lot of user whom I have to change it...:-(
thnx
Csaba
A similar thread appears here:
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2052035&SiteID=17
I suggest to install SQL Server SP2 and read the articles linked the thread above.
Monday, March 26, 2012
How can I query a trusted domain (from MS SQL)?
local domain ( localdomain.com ) with:
DBCC TRACEON(7300)
GO
SELECT * FROM OPENQUERY(ADSI, 'SELECT displayName FROM
''LDAP://DC=localdomain,DC=com'' ')
But I also have a trusted domain ( trusteddomain.com ) which I would
also like to query from the same SQL-enviroment but this does not work
:( :
DBCC TRACEON(7300)
GO
SELECT * FROM OPENQUERY(ADSI, 'SELECT displayName FROM
''LDAP://DC=trusteddomain,DC=com'' ')
Error returned:
"OLE DB error trace [Non-interface error: OLE DB provider
ADSDSOObject returned DBPROP_STRUCTUREDSTORAGE without
DBPROPVAL_OO_BLOB being supported].
OLE DB error trace [OLE/DB Provider 'ADSDSOObject'
IRowset::GetNextRows returned 0x8007202b]."
What am I doing wrong? From within windows-explorer I have no problem
obtaining the userlist from trusted domain when I want to assign
file-permissions.
Any idea?Write a VB script with the following:
Set objRoot = GetObject(LDAP://dc=trusteddomain,DC=com)
WScript.Echo objRoot.Name
and run it on the SQL server. IF this does not work, then a linked ADSI
server won't work either. I've never used trusted domains in W2K, but check
DNS settings. The client needs to find a domaincontroller for the given
domain. Also, you could try adding the domaincontroller of the trusted
domain to your query:
LDAP://nameofdcintrusteddomain/dc=trusteddomain,dc=com
Arild
"Ammar" <ammar_fake@.vip.hr> wrote in message
news:647d9cb9.0404211523.d8941c7@.posting.google.co m...
> I've defined a linked ADSI server and I seem to be able to query the
> local domain ( localdomain.com ) with:
> DBCC TRACEON(7300)
> GO
> SELECT * FROM OPENQUERY(ADSI, 'SELECT displayName FROM
> ''LDAP://DC=localdomain,DC=com'' ')
> But I also have a trusted domain ( trusteddomain.com ) which I would
> also like to query from the same SQL-enviroment but this does not work
> :( :
> DBCC TRACEON(7300)
> GO
> SELECT * FROM OPENQUERY(ADSI, 'SELECT displayName FROM
> ''LDAP://DC=trusteddomain,DC=com'' ')
> Error returned:
> "OLE DB error trace [Non-interface error: OLE DB provider
> ADSDSOObject returned DBPROP_STRUCTUREDSTORAGE without
> DBPROPVAL_OO_BLOB being supported].
> OLE DB error trace [OLE/DB Provider 'ADSDSOObject'
> IRowset::GetNextRows returned 0x8007202b]."
> What am I doing wrong? From within windows-explorer I have no problem
> obtaining the userlist from trusted domain when I want to assign
> file-permissions.
> Any idea?|||If should of course be:
Set objRoot.GetObject("LDAP://dc=trusteddomain,DC=com")
(Outlook Express is a bit too _smart_ )
Arild
"Arild Bakken" <arildb_@.hotmail.com> wrote in message
news:O2N%23mZDKEHA.208@.tk2msftngp13.phx.gbl...
> Write a VB script with the following:
> Set objRoot = GetObject(LDAP://dc=trusteddomain,DC=com)
> WScript.Echo objRoot.Name
> and run it on the SQL server. IF this does not work, then a linked ADSI
> server won't work either. I've never used trusted domains in W2K, but
check
> DNS settings. The client needs to find a domaincontroller for the given
> domain. Also, you could try adding the domaincontroller of the trusted
> domain to your query:
> LDAP://nameofdcintrusteddomain/dc=trusteddomain,dc=com
>
> Arild
> "Ammar" <ammar_fake@.vip.hr> wrote in message
> news:647d9cb9.0404211523.d8941c7@.posting.google.co m...
> > I've defined a linked ADSI server and I seem to be able to query the
> > local domain ( localdomain.com ) with:
> > DBCC TRACEON(7300)
> > GO
> > SELECT * FROM OPENQUERY(ADSI, 'SELECT displayName FROM
> > ''LDAP://DC=localdomain,DC=com'' ')
> > But I also have a trusted domain ( trusteddomain.com ) which I would
> > also like to query from the same SQL-enviroment but this does not work
> > :( :
> > DBCC TRACEON(7300)
> > GO
> > SELECT * FROM OPENQUERY(ADSI, 'SELECT displayName FROM
> > ''LDAP://DC=trusteddomain,DC=com'' ')
> > Error returned:
> > "OLE DB error trace [Non-interface error: OLE DB provider
> > ADSDSOObject returned DBPROP_STRUCTUREDSTORAGE without
> > DBPROPVAL_OO_BLOB being supported].
> > OLE DB error trace [OLE/DB Provider 'ADSDSOObject'
> > IRowset::GetNextRows returned 0x8007202b]."
> > What am I doing wrong? From within windows-explorer I have no problem
> > obtaining the userlist from trusted domain when I want to assign
> > file-permissions.
> > Any idea?
Wednesday, March 21, 2012
How can I obtain all the SQL SERVER's names in my domain
Regarding the aforementioned question I don't know if launching one script
in VB
and retrieving all the names is compulsory.
Is there any way or method for obtain that info via job/sp?
I hope have been sufficiently explicit.
Thanks in advance and regards,Hi,
Try the below command from command prompt.
OSQL -L
Thanks
Hari
SQL Server MVP
"Enric" <Enric@.discussions.microsoft.com> wrote in message
news:85E1BA68-3430-4807-BCC0-FD77AB8698A9@.microsoft.com...
> Dear all,
> Regarding the aforementioned question I don't know if launching one script
> in VB
> and retrieving all the names is compulsory.
> Is there any way or method for obtain that info via job/sp?
> I hope have been sufficiently explicit.
> Thanks in advance and regards,|||thanks a lot Hari
"Hari Prasad" wrote:
> Hi,
> Try the below command from command prompt.
> OSQL -L
> Thanks
> Hari
> SQL Server MVP
> "Enric" <Enric@.discussions.microsoft.com> wrote in message
> news:85E1BA68-3430-4807-BCC0-FD77AB8698A9@.microsoft.com...
>
>sql
Monday, March 12, 2012
How can I install SS2K with domain account?
I have seen in documents that I can install SS2K on a machine without network domain connection using a domain account.It said that domain accounts are prefered according to some reasons and it is not limited to machines on a domain so you should do it on a single PC.
I tried this during installation and entered many different things but no chance:
<OS_account>
<machine_name>/<OS_account>
...
Would you please telling me what should I enter as service starter account if I want to use domain users?
-Thanks in advanceIn order to "use domain users" and thus windows-based authentication for domain accounts you need to make sure that the server where you install SS2K is part of the domain (same or belongs to the trusted domain both ways, or belongs to a sub-domain). You also need to have a domain account that has admin permissions on the server. That's the account you'll run the service under. If you use services applet to make an account assignment, make sure to go to local security afterwards and add this account to "Lock pages in memory".