Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Tuesday, March 27, 2012

Enumerate Users in NT Groups

Hi,
How Can I list the users in an NT group, ie I have user Joe Bloggs who is
in NT Group Domain/Users.
I need to return to a client app what group they are in.
Julian
Julian
Look at sp_helpusers and also
DECLARE @.cmd VARCHAR(100)
SET @.cmd = 'NET USER "' + yourloginname+ '"'
EXEC master.dbo.xp_cmdshell @.cmd
"Julian" <Jpotter730@.msn.com> wrote in message
news:#GH7q9cLEHA.1484@.tk2msftngp13.phx.gbl...
> Hi,
> How Can I list the users in an NT group, ie I have user Joe Bloggs who
is
> in NT Group Domain/Users.
> I need to return to a client app what group they are in.
> Julian
>
|||Hi,
Run the below command from command prompt to list the users inside a group.
net group groupname
and for local groups run the below command
net localgroup groupname
Note: From Query analyzer as Uri mentioned you can use xp_cmdshell to
execute the above commands.
Thanks
Hari
MCDBA
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:ep7KNCdLEHA.3472@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Julian
> Look at sp_helpusers and also
> DECLARE @.cmd VARCHAR(100)
> SET @.cmd = 'NET USER "' + yourloginname+ '"'
> EXEC master.dbo.xp_cmdshell @.cmd
> "Julian" <Jpotter730@.msn.com> wrote in message
> news:#GH7q9cLEHA.1484@.tk2msftngp13.phx.gbl...
who
> is
>
sql

Enumerate Users in NT Groups

Hi,
How Can I list the users in an NT group, ie I have user Joe Bloggs who is
in NT Group Domain/Users.
I need to return to a client app what group they are in.
JulianJulian
Look at sp_helpusers and also
DECLARE @.cmd VARCHAR(100)
SET @.cmd = 'NET USER "' + yourloginname+ '"'
EXEC master.dbo.xp_cmdshell @.cmd
"Julian" <Jpotter730@.msn.com> wrote in message
news:#GH7q9cLEHA.1484@.tk2msftngp13.phx.gbl...
> Hi,
> How Can I list the users in an NT group, ie I have user Joe Bloggs who
is
> in NT Group Domain/Users.
> I need to return to a client app what group they are in.
> Julian
>|||Hi,
Run the below command from command prompt to list the users inside a group.
net group groupname
and for local groups run the below command
net localgroup groupname
Note: From Query analyzer as Uri mentioned you can use xp_cmdshell to
execute the above commands.
Thanks
Hari
MCDBA
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:ep7KNCdLEHA.3472@.TK2MSFTNGP09.phx.gbl...
> Julian
> Look at sp_helpusers and also
> DECLARE @.cmd VARCHAR(100)
> SET @.cmd = 'NET USER "' + yourloginname+ '"'
> EXEC master.dbo.xp_cmdshell @.cmd
> "Julian" <Jpotter730@.msn.com> wrote in message
> news:#GH7q9cLEHA.1484@.tk2msftngp13.phx.gbl...
who[vbcol=seagreen]
> is
>

Enumerate Users in NT Groups

Hi,
How Can I list the users in an NT group, ie I have user Joe Bloggs who is
in NT Group Domain/Users.
I need to return to a client app what group they are in.
JulianJulian
Look at sp_helpusers and also
DECLARE @.cmd VARCHAR(100)
SET @.cmd = 'NET USER "' + yourloginname+ '"'
EXEC master.dbo.xp_cmdshell @.cmd
"Julian" <Jpotter730@.msn.com> wrote in message
news:#GH7q9cLEHA.1484@.tk2msftngp13.phx.gbl...
> Hi,
> How Can I list the users in an NT group, ie I have user Joe Bloggs who
is
> in NT Group Domain/Users.
> I need to return to a client app what group they are in.
> Julian
>|||Hi,
Run the below command from command prompt to list the users inside a group.
net group groupname
and for local groups run the below command
net localgroup groupname
Note: From Query analyzer as Uri mentioned you can use xp_cmdshell to
execute the above commands.
Thanks
Hari
MCDBA
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:ep7KNCdLEHA.3472@.TK2MSFTNGP09.phx.gbl...
> Julian
> Look at sp_helpusers and also
> DECLARE @.cmd VARCHAR(100)
> SET @.cmd = 'NET USER "' + yourloginname+ '"'
> EXEC master.dbo.xp_cmdshell @.cmd
> "Julian" <Jpotter730@.msn.com> wrote in message
> news:#GH7q9cLEHA.1484@.tk2msftngp13.phx.gbl...
> > Hi,
> >
> > How Can I list the users in an NT group, ie I have user Joe Bloggs
who
> is
> > in NT Group Domain/Users.
> >
> > I need to return to a client app what group they are in.
> >
> > Julian
> >
> >
>

Enumerate SQL servers?

I'm working on an Access app that will have a SQL 2K backend. My setup will
install MSDE, and I will set the sa password, etc. which I don't want the
end user's to know. My problem is in Relinking the ODBC tables once it is
installed in the field. The one item I won't know is the name of the server
MSDE is installed on. I want to prompt the user to pick the server from a
list, much like you do when creating a DSN through the ODBC Administrator. I
can't use the ODBC Administrator to create a DSN because if the user doesn't
enter the sa password, it fails; also, I want to use DSN-less connections.
But I can't seem to find an API call to enumerate the SQL servers available
on the network. Does anyone know of an API to call? Alternatively, some code
to enumerate SQL servers running on the LAN? TIA!Can also look at :
http://www.extremeexperts.com/sql/f...istServers.aspx
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
"Ron Hinds" <__NoSpam@.__NoSpamramac.com> wrote in message
news:%23rKHj4H3DHA.1392@.TK2MSFTNGP11.phx.gbl...
quote:

> I'm working on an Access app that will have a SQL 2K backend. My setup

will
quote:

> install MSDE, and I will set the sa password, etc. which I don't want the
> end user's to know. My problem is in Relinking the ODBC tables once it is
> installed in the field. The one item I won't know is the name of the

server
quote:

> MSDE is installed on. I want to prompt the user to pick the server from a
> list, much like you do when creating a DSN through the ODBC Administrator.

I
quote:

> can't use the ODBC Administrator to create a DSN because if the user

doesn't
quote:

> enter the sa password, it fails; also, I want to use DSN-less connections.
> But I can't seem to find an API call to enumerate the SQL servers

available
quote:

> on the network. Does anyone know of an API to call? Alternatively, some

code
quote:

> to enumerate SQL servers running on the LAN? TIA!
>
|||Hi Vinodk,
I can list SQL server instances on my personal computer fairly easily using
SQLBrowseConnect and associated methods but I have trouble trying to
enumerate all SQL servers on the network if I am not connected to a browser
service. Obviously, I don't expect to get a list of servers if I am not
connected but I can't seem to get a *faster* way to check if I am connected
to the browser service.
I use something like the folowing to see if any master browsers are
available in hopes for speed bit it is very slow. If the status return
ERROR_NO_BROWSER_SERVERS_FOUND, I don't want to go further.
nStatus = NetServerEnum(NULL,
(DWORD)100,
(LPBYTE *) &pBufServerBrowser,
dwPrefMaxLen,
&dwEntriesRead,
&dwTotalEntries,
SV_TYPE_DOMAIN_MASTER |
SV_TYPE_POTENTIAL_BROWSER |
SV_TYPE_BACKUP_BROWSER |
SV_TYPE_MASTER_BROWSER,
NULL,
&dwResumeHandle);
Any thoughts on this'
Thanks in advance for any help...
Regards,
Chris H
"Vinodk" <vinodk_sct@.NO_SPAM_hotmail.com> wrote in message
news:eXEf9iL3DHA.2296@.TK2MSFTNGP11.phx.gbl...
> Can also look at :
> http://www.extremeexperts.com/sql/f...istServers.aspx
> --
> HTH,
> Vinod Kumar
> MCSE, DBA, MCAD, MCSD
> http://www.extremeexperts.com
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp
>
> "Ron Hinds" <__NoSpam@.__NoSpamramac.com> wrote in message
> news:%23rKHj4H3DHA.1392@.TK2MSFTNGP11.phx.gbl...
> will
the
is
> server
a
Administrator.
> I
> doesn't
connections.
> available
> code
>

Thursday, March 22, 2012

Enterprise Mgr to remote database

Hi Guys,
I have a web app hosted on an external box with my dev box here. both use identical SQL2000 backends. What I would like is to have my Enterprise Manager have both servers registered so that I can work from one interface. No probs getting the local one registered, but how do I register the external DB server? It's not in my domain, but I do have an IP address and Administrator rights on the remote box. This is probably simple, but I must be missing something.
Thanks
MikeJust add your external server as linked...|||Umm . . OK.

1. So New Sql Server Registration gives me the Register Wizard.
2. I enter the IP address manually in the Available Servers field and click add. Click Next.
3. So far, so good. Can't use my current Windows Account info (different domain), so I select SQL Server login info and put in SA account details.
4. I get a Connecting dialog then "SQL Server does not exist or access denied - ConnectionOpen - (Connect()"

Sorry if I sound dense, but . . . . .|||Try using the subdomain.domain address construct rather than IP address.

Example:

somesqlservermachinename.domain.com

I've had problems connecting to one of our remote SQL Servers via IP address (odd, since the same server is in the same subnet as two other SQL Servers that I can connect fine using their IP Addresses). But the subdomain construct works just fine.