Saturday, February 25, 2012
Adding login to SQL SERVER
get message:
'User X does not have permission to perform this action'.
I executed
sp_addsrvrolemember 'User X', 'sysadmin' and
sp_grantlogin 'domain\user X '
but when I login as an user X IS_SRVROLEMEMBER tells me
that 'Current user's login is NOT a member of the
sysadmin role'.
I executed sp_helpsrvrolemember and I see that
domain/user X is a member of sysadmin but is not a member
of securityadmin.What do you get when you run the following command:
SELECT SUSER_SNAME()?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm
"Alex" <anonymous@.discussions.microsoft.com> wrote in message
news:082801c3b902$833d6d60$a001280a@.phx.gbl...
I am trying to add a new login using sp_addlogin but I
get message:
'User X does not have permission to perform this action'.
I executed
sp_addsrvrolemember 'User X', 'sysadmin' and
sp_grantlogin 'domain\user X '
but when I login as an user X IS_SRVROLEMEMBER tells me
that 'Current user's login is NOT a member of the
sysadmin role'.
I executed sp_helpsrvrolemember and I see that
domain/user X is a member of sysadmin but is not a member
of securityadmin.
Friday, February 24, 2012
Adding Execute permissions on Stored Procedures
created user permission iusing SQLDMO ?hi,
arfanameer@.hotmail.com wrote:
> How can i add Execute permissions on the Stored Procedures under the
> created user permission iusing SQLDMO ?
Dim oProcedure As SQLDMO.StoredProcedure
Dim oServer As SQLDMO.SQLServer
' connect to the server, etc...
'get a pointer to the procedure..
Set oProcedure = oServer.Databases("Pubs").StoredProcedures("byroyalty")
'grant EXEC permission to an existing user
oProcedure.Grant SQLDMOPriv_Execute, "user_name"
Set oProcedure = Nothing
Set oServer = Nothing
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--- remove DMO to reply
Adding execute permission to stored procedures
Hi
I am currently using SQL server 2005 express edition for a website I have created using Asp.Net 2.
For this website I call stored procedures that I have created in the databse to return any page data. However, I keep getting error messages say that the login does not have execute permission for the stored procedure.
In Sql Server 2005 there does not seem to be an easy way to grant permissions to a stored procedure as you add them. I say this because when I used Sql Server 2000 I would just add the stored procedure, rigth click on it and grant permission to the user.
Now this does not seem to be the case with the new version of sql server and I was just wondering whether there is now a new, easy way of doing this.
If anyone can point me in the right direction on this...
I have managed to get this working by going into the properties of the users atached to the database, adding a list of stored procedures to the "scalables" area and individually ticking the execute checkboxs. However, when I return to add a new stored procedure, the list has disapeared. Is this a bug with Sql server 2005?
Thanking you in advance
A db owner can execute, alternatively you could add server roles to the login such as sysadmin may be overkill though
Function SetLoginsDbOwner()Dim strcmdAsStringstrcmd = "exec sp_addrolemember N'db_owner', N'MyLoginName_IWantSPExecutePerm'"
Dim dcAsNew OleDbConnection(connstringL)Dim cmdAsNew OleDbCommand(strcmd, dc)Trydc.Open()
cmd.ExecuteNonQuery()
Catch exAs OleDbExceptionLabel3.Text = ex.ToString()
Finallydc.Close()
EndTryEndFunctionSunday, February 19, 2012
Adding Domain Local Group as SQL Logins
I can not found Domain Local Group when I was adding SQL Logins. But, I foun
d them when using NTFS permission on the same computer. My Domain is 2000 Na
tive mode, SP3 was installed on the SQL Server and everyone group was added
in Pre-windows 2000 Acces
s Group. What's the problem? Help plz.
Rgds,
Harry"HarryNg" <anonymous@.discussions.microsoft.com> wrote in message
news:A6900F4B-1424-4444-9403-4E64FE94669D@.microsoft.com...
> I can not found Domain Local Group when I was adding SQL Logins. But, I
found them when using NTFS permission on the same computer. My Domain is
2000 Native mode, SP3 was installed on the SQL Server and everyone group was
added in Pre-windows 2000 Access Group. What's the problem? Help plz.
Hi, Please see my other post to your question in this newsgroup.
Steve
Adding Domain Local Group as Logins
I can not found Domain Local Group when I was adding SQL Logins. But, I foun
d them when using NTFS permission on the same computer. My Domain is 2000 Na
tive mode, SP3 was installed on the SQL Server and everyone group was added
in Pre-windows 2000 Acces
s Group. What's the problem? Help plz.
Rgds,
Harry"HarryNg" <anonymous@.discussions.microsoft.com> wrote in message
news:180922DE-A85E-4D3D-8AB4-ECF10EED154B@.microsoft.com...
> I can not found Domain Local Group when I was adding SQL Logins. But, I
found them when using NTFS permission on the same computer. My Domain is
2000 Native mode, SP3 was installed on the SQL Server and everyone group was
added in Pre-windows 2000 Access Group. What's the problem? Help plz. <
This may be by design. A very simple workaround, create a local group on
your server running SQL Server, then add your domain global group into the
local group on your server. Then, add the (server) local group to the SQL
Server login and give it the proper db permissions...
Steve|||This was a bug that was fixed.
825042 FIX: SQL Server Jobs That Are Owned by Non-sysadmin Users May Not
Start
http://support.microsoft.com/?id=825042
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.