Showing posts with label assign. Show all posts
Showing posts with label assign. Show all posts

Monday, March 19, 2012

applying dbo to all objects by default?

Hi,
Is there a way to assign all objects being created to be assigned to DBO as
opposed to the person who is creating them?
We have some programmers who need db_owner access, and when they create a
new sp or table the objects are tied to them now. Can it by defaul be
assigned to DBO instead?
TIA,
ScottScott
They should specify a DBO user as
CREATE TABLE dbo.Test (col INT) and then the table will belong to the DBO
user
If you want the DBO to be created by default you should add them to
sysadmin server role
"Scott" <sfruhwirth@.gmail.com> wrote in message
news:OqYCpMXUFHA.612@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Is there a way to assign all objects being created to be assigned to DBO
as
> opposed to the person who is creating them?
> We have some programmers who need db_owner access, and when they create a
> new sp or table the objects are tied to them now. Can it by defaul be
> assigned to DBO instead?
> TIA,
> Scott
>

Wednesday, March 7, 2012

Application Role

after i create the application role, how do i make the application use this
role
in other words , how do i assign the application to this role '
--
regards
Maidoo.maido
Do you mean how to activate the application role within VB aplication?
"maidoo" <maidooalex@.msn.com> wrote in message
news:028CA4C1-55CB-4819-A2BA-BB6B8CC48B60@.microsoft.com...
> after i create the application role, how do i make the application use
this
> role
> in other words , how do i assign the application to this role '
> --
> regards
> Maidoo.
>|||actually, i don't know the step taken after creating this role , do i
activate it from the application, or there's something in the SQl Server
that let me assign this role to an application (exe file or something
like that )
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||Hi
Yes , you will have to activate it from the application.
Private Sub Form_Load()
Dim strConnect As String
Dim db_username As ADODB.Recordset
Dim ss As String
Dim pp As String, toto As String
pp = "pp"
toto = "toto"
Set cnAdo = New ADODB.Connection
strConnect = "driver={SQL
Server};uid=uri_test;pwd=tennis;server=S
erverName;database=databasename;Netw
ork=dbmssocn"
cnAdo.Provider = "SQLOLEDB"
cnAdo.ConnectionString = strConnect
cnAdo.CommandTimeout = 30 '10
cnAdo.CursorLocation = adUseServer
cnAdo.Mode = adModeRead
cnAdo.Open
' user_appl_role and user_appl_pwd are corect
cnAdo.Execute "EXEC sp_setapprole '" & pp & " ', '" & toto & "'"
Set db_username = New Recordset
sqlcommand = "select user_name ()"
db_username.CursorType = adOpenKeyset
db_username.LockType = adLockReadOnly
db_username.Open sqlcommand, cnAdo
db_username_role = db_username.Fields.Item(0).Value
' the result of these select is the correct name of the application role
End Sub
"Maidoo oriky" <maidooalex@.msn.com> wrote in message
news:%2368vAA88EHA.2552@.TK2MSFTNGP09.phx.gbl...
>
> actually, i don't know the step taken after creating this role , do i
> activate it from the application, or there's something in the SQl Server
> that let me assign this role to an application (exe file or something
> like that )
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!|||thnx 4 ur help
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

Saturday, February 25, 2012

application login permissions...

background sql2kt on nt5
if I created a sql standard as application login. should i assign
permissions of objects to that accout or should i create a role, assign
permissions of objects to the role, then add that application login account
to the role?
what are some of the common or best practices? can anyone give me some
suggestions? thank you.
steveHi,
I suggest you to create a role and assign permissions to that role.
Say if it is a Finance application, Create a new user role called Finance
and aiisn all permissions to that role. After this you can assign this role
to the application user. If there a new application user comes in later, you
can just assign that role to that user.
(Before creating the role, Just have a look into db_datareader and
db_datawriter role- this may help you out)
Thanks
Hari
MCDBA
"== Steve Pdx==" <lins@.nospam.portptld.com> wrote in message
news:#yfq2fuNEHA.1160@.TK2MSFTNGP09.phx.gbl...
> background sql2kt on nt5
> if I created a sql standard as application login. should i assign
> permissions of objects to that accout or should i create a role, assign
> permissions of objects to the role, then add that application login
account
> to the role?
> what are some of the common or best practices? can anyone give me some
> suggestions? thank you.
> steve
>