Showing posts with label procedures. Show all posts
Showing posts with label procedures. Show all posts

Monday, March 12, 2012

How can I JOIN the results of two Stored Procedures?

How can I JOIN the results of two stored procs?I have a two stored procs: sp_Users_GetByID and sp_UserInfo_GetByIDI want to create another stored proc that basically grabs the results from both of these, joins them, and returns that data. I just don't know how...


Has your question been answered here:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=84858

|||

Yes, they answered my question. Thanks!

Wednesday, March 7, 2012

How can I grant create permission for stored procedures?

My company has an SQL server hosted at a server farm. An outside
consultant is developing some stored procedures to generate some
reports using the data in the SQL Server database that our application
uses.
The developer will have access to the SQL server via Enterprise
Manager using his own login. I need to give him the right to create
stored procedures in a sandbox database while limiting his other
abilities to select only. When I look at the permissions on stored
procedures I see that I can allow or deny the ability to execute them
but I am not sure how to allow stored procedure creation priviledges.
Can this be done?
TIAGrant the user the statement permission, for example:
GRANT CREATE PROCEDURE to SomeUser
-Sue
On Thu, 07 Jul 2005 18:42:17 -0400, Matthew Speed
<mspeed@.mspeed.net> wrote:

>My company has an SQL server hosted at a server farm. An outside
>consultant is developing some stored procedures to generate some
>reports using the data in the SQL Server database that our application
>uses.
>The developer will have access to the SQL server via Enterprise
>Manager using his own login. I need to give him the right to create
>stored procedures in a sandbox database while limiting his other
>abilities to select only. When I look at the permissions on stored
>procedures I see that I can allow or deny the ability to execute them
>but I am not sure how to allow stored procedure creation priviledges.
>Can this be done?
>TIA

Monday, February 27, 2012

How can i get the process detais using TSQL instructions ?

Hi Friends,
How can i get the process detais using TSQL instructions ?
i want the same information that i get when i execute the
following procedures
"Expand Management, and then expand Current Activity.
Click Process Info.
The current server activity is displayed in the details
pane."
Thank You
JohnnyHi
You can use profiler to see what EM is doing and it would have come up with
he undocumented procedure:
EXEC sp_MSget_current_activity 51,1
John
"Johnny Silvestre" <johnny_silvestre@.yahoo.de> wrote in message
news:1e84e01c4556d$86ab8380$a401280a@.phx.gbl...
> Hi Friends,
> How can i get the process detais using TSQL instructions ?
> i want the same information that i get when i execute the
> following procedures
> "Expand Management, and then expand Current Activity.
> Click Process Info.
> The current server activity is displayed in the details
> pane."
> Thank You
> Johnny
>|||Hi,
To get information of a SPID then go with this:-
From Query Analyzer, Execute the below system procedure to get the SPID for
the user.
sp_who
After getting the sp_id use the below command to get the process detailsfor
the SPID
DBCC INPUTBUFFER(SPID)
Thanks
Hari
MCDBA
"Johnny Silvestre" <johnny_silvestre@.yahoo.de> wrote in message
news:1e84e01c4556d$86ab8380$a401280a@.phx.gbl...
> Hi Friends,
> How can i get the process detais using TSQL instructions ?
> i want the same information that i get when i execute the
> following procedures
> "Expand Management, and then expand Current Activity.
> Click Process Info.
> The current server activity is displayed in the details
> pane."
> Thank You
> Johnny
>|||select *
from master..sysprocesses
-Sue
On Fri, 18 Jun 2004 12:50:37 -0700, "Johnny Silvestre"
<johnny_silvestre@.yahoo.de> wrote:
>Hi Friends,
>How can i get the process detais using TSQL instructions ?
>i want the same information that i get when i execute the
>following procedures
>"Expand Management, and then expand Current Activity.
>Click Process Info.
>The current server activity is displayed in the details
>pane."
>Thank You
>Johnny

Sunday, February 19, 2012

How can I get a list of all objects accessible by a login using sys* tables

How can I get a list of all objects (like tables, views, stored procedures, etc) accessible by a login (user), or vice versa?

The question has been answered in this thread located in the SMO section of the forum.