Probably quite a simple one, have patience...I'm just learning the
ropes with SQL Server...
I want to grant new users access to an existing database, owned by
user X. So far this works, but user Y has to include X's username
before any object names. For example
select * from cd_collection;
does not work, Y has to use
select * from X.cd_collection;
instead. Any advice on how to add new users (with varying permissions)
to an existing "schema" so that they would have the schema as default
one? SQL Server version is 7.0.Hi
In SQL Server 7 or 2000 you can not change this.
Kalen Delaney wrote an article in the April SQL Server magazine " "Object
Ownership and Security" (InstantDoc ID 41773), I talked about the confusions
and limitations surrounding SQL Server 2000's model, which doesn't separate
the concepts of user and schema." This also talks about the changes in SQL
Server 2005 (Yukon).
http://www.winnetmag.com/SQLServer/...1773/41773.html
John
"janne" <janne_1976@.hotmail.com> wrote in message
news:6539de6f.0406142332.6de2004d@.posting.google.com...
> Probably quite a simple one, have patience...I'm just learning the
> ropes with SQL Server...
> I want to grant new users access to an existing database, owned by
> user X. So far this works, but user Y has to include X's username
> before any object names. For example
> select * from cd_collection;
> does not work, Y has to use
> select * from X.cd_collection;
> instead. Any advice on how to add new users (with varying permissions)
> to an existing "schema" so that they would have the schema as default
> one? SQL Server version is 7.0.
Showing posts with label grant. Show all posts
Showing posts with label grant. Show all posts
Monday, March 19, 2012
Monday, March 12, 2012
multiple tables in grant statement
hello everyone,
is it possible to list multiple tables in a grant statement.
so instead of using:
GRANT ALL ON AuditColumns TO ADMIN
GRANT ALL ON AuditConfig TO ADMIN
i can just use:
GRANT ALL ON AuditColumns, AuditConfig TO ADMIN
thank you for your help,
abraham lunaIt cannot be done :(|||You can do it an easy way:
SELECT 'GRANT SELECT ON ' + table_name + ' TO whoever', *
FROM INFORMATION_SCHEMA.tables
Run this, obviously add some WHERE criteria to limit the tables, copy the
result set to the main window and execute that. Easy eh?
Let me know how you get on.
Damien
"Abraham Andres Luna" wrote:
> hello everyone,
> is it possible to list multiple tables in a grant statement.
> so instead of using:
> GRANT ALL ON AuditColumns TO ADMIN
> GRANT ALL ON AuditConfig TO ADMIN
> i can just use:
> GRANT ALL ON AuditColumns, AuditConfig TO ADMIN
>
> thank you for your help,
> abraham luna
>
>|||ty for your reply
i ended copying and pasting lots of those statements and then modifying it
as needed
is it possible to list multiple tables in a grant statement.
so instead of using:
GRANT ALL ON AuditColumns TO ADMIN
GRANT ALL ON AuditConfig TO ADMIN
i can just use:
GRANT ALL ON AuditColumns, AuditConfig TO ADMIN
thank you for your help,
abraham lunaIt cannot be done :(|||You can do it an easy way:
SELECT 'GRANT SELECT ON ' + table_name + ' TO whoever', *
FROM INFORMATION_SCHEMA.tables
Run this, obviously add some WHERE criteria to limit the tables, copy the
result set to the main window and execute that. Easy eh?
Let me know how you get on.
Damien
"Abraham Andres Luna" wrote:
> hello everyone,
> is it possible to list multiple tables in a grant statement.
> so instead of using:
> GRANT ALL ON AuditColumns TO ADMIN
> GRANT ALL ON AuditConfig TO ADMIN
> i can just use:
> GRANT ALL ON AuditColumns, AuditConfig TO ADMIN
>
> thank you for your help,
> abraham luna
>
>|||ty for your reply
i ended copying and pasting lots of those statements and then modifying it
as needed
Labels:
admingrant,
auditcolumns,
database,
grant,
instead,
microsoft,
multiple,
mysql,
oracle,
server,
sql,
statement,
tables,
usinggrant
Subscribe to:
Posts (Atom)