Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Global stored procedures and more

Author  Topic 

allan_houston
Starting Member

18 Posts

Posted - 2006-07-09 : 18:03:38
Hello again


I realized that this is really one of the best forums I ever visited. That is why I thank you all for help you have been giving me.


And I got even more issues.
My questions are:

1. Is it possible to make some of mine user-defined stored procedures global, meaning that I can call them from whatever DB without reffering to them by their DB. Like "sp_*" sp's?

2. I have given a user exec privilleges on one of mine stored procedures. Is there any way to view this by a stored procedure maybe?

3. How can I view objects lying in my Primary file group?

4. I know how to create schemas but how can I view them?


THX for any kind of help

nr
SQLTeam MVY

12543 Posts

Posted - 2006-07-09 : 19:50:59
1. Create with name sp_... in the master database - I don't recommend it though.
4. select * from INFORMATION_SCHEMA.SCHEMATA

Not sure what you mean by the other two.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

allan_houston
Starting Member

18 Posts

Posted - 2006-07-10 : 03:08:02
2. I have given exec privilleges on one of mine stored procedures to another user in my DB(GRANT EXEC ON blah_sp TO user1).
Is there any way to view this permissions that you created by using GRANT?

3. How can I view the contence of a file group, like for example Primary? What objects are created in that group, etc?



Is this helping?
Go to Top of Page

allan_houston
Starting Member

18 Posts

Posted - 2006-07-10 : 03:16:51
schema like containing definitions of tables, views, etc

I know there is a statement called create schema and it can be written in various ways.

Like

create schema schema1
or
CREATE SCHEMA AUTHORIZATION schema2

You can create them to host your permissions but how can I view what permissions I put in this schema later?
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-07-10 : 06:32:53
2. Have a look at the sysprotects system table.
3. Have a look at sysindexes - it has the filegroup id for the object.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

allan_houston
Starting Member

18 Posts

Posted - 2006-07-10 : 09:04:04
Thx nr, but is it possible to get the names of the grantor sysprotects and to a user you granted privilleges? A table that you can join?
Go to Top of Page
   

- Advertisement -