Showing posts with label logins. Show all posts
Showing posts with label logins. Show all posts

Thursday, March 29, 2012

Get all the logins

Hi,
How can I get all the login lists in my SQL Server 7.0 database.
And how to get the user list.
Since I was asked to provide such a list.
Thanks in advance
Frank
Check the sp_helplogins and sp_helpuser system stored procedures.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Frank" <wangping@.lucent.com> wrote in message
news:%23VJn3cwiEHA.1040@.TK2MSFTNGP09.phx.gbl...
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
>
|||There are many options... Below are two:
EXEC sp_helplogins
EXEC sp_helpuser
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Frank" <wangping@.lucent.com> wrote in message news:%23VJn3cwiEHA.1040@.TK2MSFTNGP09.phx.gbl...
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
>
|||Frank wrote:
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
Try sp_helplogins for a list of logins. Use sp_helpuser for information
about each user in a database.
David G.
|||Dejan, Tibor, David,
Thanks very much
Frank
"Frank" <wangping@.lucent.com> wrote in message
news:#VJn3cwiEHA.1040@.TK2MSFTNGP09.phx.gbl...
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
>

Get all the logins

Hi,
How can I get all the login lists in my SQL Server 7.0 database.
And how to get the user list.
Since I was asked to provide such a list.
Thanks in advance
FrankCheck the sp_helplogins and sp_helpuser system stored procedures.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Frank" <wangping@.lucent.com> wrote in message
news:%23VJn3cwiEHA.1040@.TK2MSFTNGP09.phx.gbl...
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
>|||There are many options... Below are two:
EXEC sp_helplogins
EXEC sp_helpuser
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Frank" <wangping@.lucent.com> wrote in message news:%23VJn3cwiEHA.1040@.TK2MSFTNGP09.phx.gbl...
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
>|||Frank wrote:
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
Try sp_helplogins for a list of logins. Use sp_helpuser for information
about each user in a database.
--
David G.|||Dejan, Tibor, David,
Thanks very much
Frank
"Frank" <wangping@.lucent.com> wrote in message
news:#VJn3cwiEHA.1040@.TK2MSFTNGP09.phx.gbl...
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
>

Get all the logins

Hi,
How can I get all the login lists in my SQL Server 7.0 database.
And how to get the user list.
Since I was asked to provide such a list.
Thanks in advance
FrankCheck the sp_helplogins and sp_helpuser system stored procedures.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Frank" <wangping@.lucent.com> wrote in message
news:%23VJn3cwiEHA.1040@.TK2MSFTNGP09.phx.gbl...
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
>|||There are many options... Below are two:
EXEC sp_helplogins
EXEC sp_helpuser
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Frank" <wangping@.lucent.com> wrote in message news:%23VJn3cwiEHA.1040@.TK2MSFTNGP09.phx.gbl.
.
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
>|||Frank wrote:
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
Try sp_helplogins for a list of logins. Use sp_helpuser for information
about each user in a database.
--
David G.|||Dejan, Tibor, David,
Thanks very much
Frank
"Frank" <wangping@.lucent.com> wrote in message
news:#VJn3cwiEHA.1040@.TK2MSFTNGP09.phx.gbl...
> Hi,
> How can I get all the login lists in my SQL Server 7.0 database.
> And how to get the user list.
> Since I was asked to provide such a list.
> Thanks in advance
> Frank
>sql

Friday, March 23, 2012

generating sql logins

I've been given an excel file that lists:
userID's,
Names
Password
expiary dates.
I need to convert this list into sql server logins. Can this be done via a tsql statement? if so how, and if it cant be done via a statement then what other way can it be done.

Many thanks in advance.

Air:

I would probably use SSIS for this; however, you probably can also put together a script that uses BULK INSERT to get this done. This will be more simple if you can just ram and jam because none of these logins pre-exist.

Dave

|||

use master

declare @.loginame sysname

set @.loginame=N'DOMAIN\user'

exec sp_grantlogin @.loginame

exec sp_addsrvrolemember @.loginame, sysadmin

--

... most probably, NOT sysadmin, but whatever you need for that particular John or Jane Doe...