Showing posts with label due. Show all posts
Showing posts with label due. Show all posts

Tuesday, March 27, 2012

GRANTING a variable

When exec.
GRANT SELECT ON @.variable_name to user_name
The above does not work due to the variable.
Is there no way of dynamically assigning the table-name?
Thks again.You have to create the complete statement as a string ad then execute it
with EXEC or sp_xecutesql. Read an excellent article at
http://www.algonet.se/~sommar/dynamic_sql.html.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Wayne" <anonymous@.discussions.microsoft.com> wrote in message
news:11f301c3fb91$454511d0$a401280a@.phx.gbl...
> When exec.
> GRANT SELECT ON @.variable_name to user_name
> The above does not work due to the variable.
> Is there no way of dynamically assigning the table-name?
> Thks again.|||Hi,
Yes you can do it, Look in to the below code
declare @.sql nvarchar(200)
declare @.tbl_name varchar(30)
set @.tbl_name='sysobjects'
set @.sql = 'grant select on '+ @.tbl_name + ' to public'
exec sp_executesql @.sql
Thanks
Hari
MCDBA
"Wayne" <anonymous@.discussions.microsoft.com> wrote in message
news:11f301c3fb91$454511d0$a401280a@.phx.gbl...
> When exec.
> GRANT SELECT ON @.variable_name to user_name
> The above does not work due to the variable.
> Is there no way of dynamically assigning the table-name?
> Thks again.sql

'GRANT SELECT ON sysprocesses TO PUBLIC' does not work in SQL 2005

'GRANT SELECT ON sysprocesses TO PUBLIC'
This statement used to work in SQL 7.0 and 2000.
But due to changes in security in SQL 2005 I receive
Server: Msg 4610, Level 16, State 1, Line 1
You can only grant or revoke permissions on objects in the current database.
I am currently on master DB. So I do not understand the error message.
'sysproceses' is a sytem view, in the sys schema.
Objects created in SQL 2005 belong to schemas.
In SQL 2000, sysprocesses is a system table ans objects belong to owner.
Any idea?
Best regards
AlexCT
You should post this in the 2005 beta newsgroups
Bert

'GRANT SELECT ON sysprocesses TO PUBLIC' does not work in SQL 2005

'GRANT SELECT ON sysprocesses TO PUBLIC'
This statement used to work in SQL 7.0 and 2000.
But due to changes in security in SQL 2005 I receive
Server: Msg 4610, Level 16, State 1, Line 1
You can only grant or revoke permissions on objects in the current database.
I am currently on master DB. So I do not understand the error message.
'sysproceses' is a sytem view, in the sys schema.
Objects created in SQL 2005 belong to schemas.
In SQL 2000, sysprocesses is a system table ans objects belong to owner.
Any idea?
Best regards
AlexCTYou should post this in the 2005 beta newsgroups
Bert

'GRANT SELECT ON sysprocesses TO PUBLIC' does not work in SQL 2005

'GRANT SELECT ON sysprocesses TO PUBLIC'
This statement used to work in SQL 7.0 and 2000.
But due to changes in security in SQL 2005 I receive
Server: Msg 4610, Level 16, State 1, Line 1
You can only grant or revoke permissions on objects in the current database.
I am currently on master DB. So I do not understand the error message.
'sysproceses' is a sytem view, in the sys schema.
Objects created in SQL 2005 belong to schemas.
In SQL 2000, sysprocesses is a system table ans objects belong to owner.
Any idea?
Best regards
AlexCTYou should post this in the 2005 beta newsgroups
Bert

Friday, March 23, 2012

GRANT error in SQL 2005: GRANT SELECT ON sysprocesses TO PUBLIC

The following GRANT statement used to work in SQL 7.0 and 2000, but due to
security enhancements in SQL 2005, it does not work anymore.
GRANT SELECT ON sysprocesses TO PUBLIC
I receive the message:
Msg 4610, Level 16, State 1, Line 2
You can only grant or revoke permissions on objects in the current database.
I have just installed SQL 2005 Beta 3, connected as 'sa' and I have not
modified any security at all in SQL 2005.
Does anybody knows how can I make it work?
And what are the changes in SQL 2005 Security?
If you can send info about it it would be great.
Best regardsTry USE <DBNAME> before executing the grant.
"Alex CT" <AlexCT@.discussions.microsoft.com> wrote in message
news:9F313976-07F1-4099-9A31-ED58153979C2@.microsoft.com...
> The following GRANT statement used to work in SQL 7.0 and 2000, but due to
> security enhancements in SQL 2005, it does not work anymore.
> GRANT SELECT ON sysprocesses TO PUBLIC
> I receive the message:
> Msg 4610, Level 16, State 1, Line 2
> You can only grant or revoke permissions on objects in the current
database.
> I have just installed SQL 2005 Beta 3, connected as 'sa' and I have not
> modified any security at all in SQL 2005.
> Does anybody knows how can I make it work?
> And what are the changes in SQL 2005 Security?
> If you can send info about it it would be great.
> Best regards|||I dont know but I am very curious about where you got Beta 3 ?
Chris
Alex CT wrote:
> The following GRANT statement used to work in SQL 7.0 and 2000, but
due to
> security enhancements in SQL 2005, it does not work anymore.
> GRANT SELECT ON sysprocesses TO PUBLIC
> I receive the message:
> Msg 4610, Level 16, State 1, Line 2
> You can only grant or revoke permissions on objects in the current
database.
> I have just installed SQL 2005 Beta 3, connected as 'sa' and I have
not
> modified any security at all in SQL 2005.
> Does anybody knows how can I make it work?
> And what are the changes in SQL 2005 Security?
> If you can send info about it it would be great.
> Best regards

Sunday, February 26, 2012

gmaniz service failed

Dear all,
please help me to find error about 'the gmaniz service failed to start
due to the following error'
ThanksThis is not a SQL Server service. In fact, I didn't get one single hit (except this post) on Google.
My guess is that this is some in-house developed software, so you need to find what it is and talk
to the people responsible for it.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ekodian" <ekodian@.gmail.com> wrote in message news:e8beptSUFHA.3944@.tk2msftngp13.phx.gbl...
> Dear all,
> please help me to find error about 'the gmaniz service failed to start due to the following error'
> Thanks