Showing posts with label ran. Show all posts
Showing posts with label ran. Show all posts

Monday, March 12, 2012

Problemm setting permissions

Hello everybody,
I ran into a strange kind of problem in SQL2K. I tryto give a user
select permissions on fn_trace_getinfo, but then I apply the new
permissions I get the message "Invalid object name
system_functionschema.fn_trace_getinfo". How is this possible. I see
the function and as sysadmin I can use it, but when you try to change
permissions it says the object doesn't exist ?
Does anybody know why this is happening and if there is some way
around.
Tia MarkusHi
fn_trace_getinfo is a system function.
What happaned if the user run
SELECT *
FROM ::fn_trace_getinfo(trace_id)
WHERE Property=4
<m.bohse@.quest-consultants.com> wrote in message
news:1136540572.050234.16160@.g14g2000cwa.googlegroups.com...
> Hello everybody,
> I ran into a strange kind of problem in SQL2K. I tryto give a user
> select permissions on fn_trace_getinfo, but then I apply the new
> permissions I get the message "Invalid object name
> system_functionschema.fn_trace_getinfo". How is this possible. I see
> the function and as sysadmin I can use it, but when you try to change
> permissions it says the object doesn't exist ?
> Does anybody know why this is happening and if there is some way
> around.
> Tia Markus
>

Saturday, February 25, 2012

Problem with Views

A while back I ran into a problem where changes to views (such as renaming
them) was not being reflected. Somehow I was able to get past this problem.
Now I want to generate a script that will create my views. When I look at
the script that was generated has old information; the old names, and the old
queries.
Is there something I'm overlooking when I make changes to views?
Ensure that you are not creating views with different owners other than
DBO... It's possible that you are getting messed up with different version
of the same view owned by different owners..
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Tracy" <Tracy@.discussions.microsoft.com> wrote in message
news:711B82B3-D80C-4EA4-9014-7EA62C8DF370@.microsoft.com...
>A while back I ran into a problem where changes to views (such as renaming
> them) was not being reflected. Somehow I was able to get past this
> problem.
> Now I want to generate a script that will create my views. When I look at
> the script that was generated has old information; the old names, and the
> old
> queries.
> Is there something I'm overlooking when I make changes to views?
|||DBO is the only user for this DB. Each create statement in the generated
script looks like this: CREATE VIEW dbo.someview. The problem is that these
view names and associated querys are old, the way the were before I renamed
them and made changes to the queries.
Thanks for your quick reply,
-Tracy
"Wayne Snyder" wrote:

> Ensure that you are not creating views with different owners other than
> DBO... It's possible that you are getting messed up with different version
> of the same view owned by different owners..
>
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "Tracy" <Tracy@.discussions.microsoft.com> wrote in message
> news:711B82B3-D80C-4EA4-9014-7EA62C8DF370@.microsoft.com...
>
>
|||On Tue, 16 Aug 2005 09:55:04 -0700, Tracy wrote:

>DBO is the only user for this DB. Each create statement in the generated
>script looks like this: CREATE VIEW dbo.someview. The problem is that these
>view names and associated querys are old, the way the were before I renamed
>them and made changes to the queries.
>Thanks for your quick reply,
>-Tracy
Hi Tracy,
How did you rename the queries? Did you execute a sp_rename? Or did you
open the view definition, change the name and execute it? In the latter
case, you didn't rename it - you made a new view (with a new name),
based on the old view. You'll still have to drop the old view.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Using SQL Server Enterprise Manager (v8.0) I renamed the views the Windows
Explorer way: Highlight the item, single click it, type in the new name.
I generated another script just now, but this time I left the "Generate the
DROP <object>" checked. The script had DROP commands for the current views,
but the CREATE VIEWs were all the old view names and queries.
"Hugo Kornelis" wrote:

> On Tue, 16 Aug 2005 09:55:04 -0700, Tracy wrote:
>
> Hi Tracy,
> How did you rename the queries? Did you execute a sp_rename? Or did you
> open the view definition, change the name and execute it? In the latter
> case, you didn't rename it - you made a new view (with a new name),
> based on the old view. You'll still have to drop the old view.
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
|||X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@.supernews.com
Lines: 29
Path: TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.osn.de!diablo1-ffm.news.osn.de!news.tele.dk!news.tele.dk!small.ne ws.tele.dk!sn-xit-03!sn-xit-10!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:403053
On Wed, 17 Aug 2005 06:45:03 -0700, Tracy wrote:

>Using SQL Server Enterprise Manager (v8.0) I renamed the views the Windows
>Explorer way: Highlight the item, single click it, type in the new name.
Hi Tracy,
Thanks - I never even knew that you could rename objects that way as
well!
However, the best way to rename views, stored procedures, triggers, and
user-defined functions is to explicitly drop and recreate them. Here's a
recent post by Tibor Karaszi about what goes wrong:
(Warning - long URL, check for line wrapping)
http://groups.google.com/groups?hl=e...aszi&safe=off&
qt_s=Search

>I generated another script just now, but this time I left the "Generate the
>DROP <object>" checked. The script had DROP commands for the current views,
>but the CREATE VIEWs were all the old view names and queries.
That's how you should rename your objects next time, but it won't help
now. I guess you'll have to manually change the name in the scripts.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Thank you!
I was able to do in-depth research with the starting point you gave me.
I executed "select * from information_schema.views" and found that the
"view_definition" column had the old names. I was a little hasty in my
conclusion that the queries were old as well. I checked them thoroughly and
they look to be correct.
So to solve my current problem, I just need to change the names in the
generated script and then run the script, (including the DROPs).
In the future, I will try to get by without renaming. But if I must rename
the views, I will copy the query, drop the view, create a new view, paste the
query, and save it with the new name.
That's a lot more steps than simply doing the Explorer-style rename, but it
will save a lot of grief in the long run.
Thanks again, Hugo and Wayne, for your help
-Tracy
"Hugo Kornelis" wrote:

> Thanks - I never even knew that you could rename objects that way as
> well!
> However, the best way to rename views, stored procedures, triggers, and
> user-defined functions is to explicitly drop and recreate them. Here's a
> recent post by Tibor Karaszi about what goes wrong:
> (Warning - long URL, check for line wrapping)
> http://groups.google.com/groups?hl=e...araszi&safe=of
f&qt_s=Search
>
|||On Thu, 18 Aug 2005 06:50:08 -0700, Tracy wrote:
(snip)
>In the future, I will try to get by without renaming. But if I must rename
>the views, I will copy the query, drop the view, create a new view, paste the
>query, and save it with the new name.
>That's a lot more steps than simply doing the Explorer-style rename, but it
>will save a lot of grief in the long run.
Hi Tracy,
Slightly shorter: generate a script including the DROP command; edit the
script (but only chage the name on the CREATE command) and execute it.
Better yet: store all DDL for your tables, views, procs, etc outside of
SQL Server - preferably in source control.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)

Problem with Views

A while back I ran into a problem where changes to views (such as renaming
them) was not being reflected. Somehow I was able to get past this problem.
Now I want to generate a script that will create my views. When I look at
the script that was generated has old information; the old names, and the ol
d
queries.
Is there something I'm overlooking when I make changes to views?Ensure that you are not creating views with different owners other than
DBO... It's possible that you are getting messed up with different version
of the same view owned by different owners..
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Tracy" <Tracy@.discussions.microsoft.com> wrote in message
news:711B82B3-D80C-4EA4-9014-7EA62C8DF370@.microsoft.com...
>A while back I ran into a problem where changes to views (such as renaming
> them) was not being reflected. Somehow I was able to get past this
> problem.
> Now I want to generate a script that will create my views. When I look at
> the script that was generated has old information; the old names, and the
> old
> queries.
> Is there something I'm overlooking when I make changes to views?|||DBO is the only user for this DB. Each create statement in the generated
script looks like this: CREATE VIEW dbo.someview. The problem is that these
view names and associated querys are old, the way the were before I renamed
them and made changes to the queries.
Thanks for your quick reply,
-Tracy
"Wayne Snyder" wrote:

> Ensure that you are not creating views with different owners other than
> DBO... It's possible that you are getting messed up with different versio
n
> of the same view owned by different owners..
>
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "Tracy" <Tracy@.discussions.microsoft.com> wrote in message
> news:711B82B3-D80C-4EA4-9014-7EA62C8DF370@.microsoft.com...
>
>|||On Tue, 16 Aug 2005 09:55:04 -0700, Tracy wrote:

>DBO is the only user for this DB. Each create statement in the generated
>script looks like this: CREATE VIEW dbo.someview. The problem is that thes
e
>view names and associated querys are old, the way the were before I renamed
>them and made changes to the queries.
>Thanks for your quick reply,
>-Tracy
Hi Tracy,
How did you rename the queries? Did you execute a sp_rename? Or did you
open the view definition, change the name and execute it? In the latter
case, you didn't rename it - you made a new view (with a new name),
based on the old view. You'll still have to drop the old view.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Using SQL Server Enterprise Manager (v8.0) I renamed the views the Windows
Explorer way: Highlight the item, single click it, type in the new name.
I generated another script just now, but this time I left the "Generate the
DROP <object>" checked. The script had DROP commands for the current views,
but the CREATE VIEWs were all the old view names and queries.
"Hugo Kornelis" wrote:

> On Tue, 16 Aug 2005 09:55:04 -0700, Tracy wrote:
>
> Hi Tracy,
> How did you rename the queries? Did you execute a sp_rename? Or did you
> open the view definition, change the name and execute it? In the latter
> case, you didn't rename it - you made a new view (with a new name),
> based on the old view. You'll still have to drop the old view.
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>|||X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@.supernews.com
Lines: 29
Path: TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!newsfeed.f
reenet.de!news.osn.de!diablo1-ffm.news.osn.de!news.tele.dk!news.tele.dk!smal
l.news.tele.dk!sn-xit-03!sn-xit-10!sn-xit-01!sn-post-01!supernews.com!corp.s
upernews.com!not-for-mail
Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:403053
On Wed, 17 Aug 2005 06:45:03 -0700, Tracy wrote:

>Using SQL Server Enterprise Manager (v8.0) I renamed the views the Windows
>Explorer way: Highlight the item, single click it, type in the new name.
Hi Tracy,
Thanks - I never even knew that you could rename objects that way as
well!
However, the best way to rename views, stored procedures, triggers, and
user-defined functions is to explicitly drop and recreate them. Here's a
recent post by Tibor Karaszi about what goes wrong:
(Warning - long URL, check for line wrapping)
http://groups.google.com/groups?hl=...r />
safe=off&
qt_s=Search

>I generated another script just now, but this time I left the "Generate the
>DROP <object>" checked. The script had DROP commands for the current views
,
>but the CREATE VIEWs were all the old view names and queries.
That's how you should rename your objects next time, but it won't help
now. I guess you'll have to manually change the name in the scripts.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thank you!
I was able to do in-depth research with the starting point you gave me.
I executed "select * from information_schema.views" and found that the
"view_definition" column had the old names. I was a little hasty in my
conclusion that the queries were old as well. I checked them thoroughly and
they look to be correct.
So to solve my current problem, I just need to change the names in the
generated script and then run the script, (including the DROPs).
In the future, I will try to get by without renaming. But if I must rename
the views, I will copy the query, drop the view, create a new view, paste th
e
query, and save it with the new name.
That's a lot more steps than simply doing the Explorer-style rename, but it
will save a lot of grief in the long run.
Thanks again, Hugo and Wayne, for your help
-Tracy
"Hugo Kornelis" wrote:

> Thanks - I never even knew that you could rename objects that way as
> well!
> However, the best way to rename views, stored procedures, triggers, and
> user-defined functions is to explicitly drop and recreate them. Here's a
> recent post by Tibor Karaszi about what goes wrong:
> (Warning - long URL, check for line wrapping)
> http://groups.google.com/groups?hl=...Karaszi&safe=of
f&qt_s=Search
>|||On Thu, 18 Aug 2005 06:50:08 -0700, Tracy wrote:
(snip)
>In the future, I will try to get by without renaming. But if I must rename
>the views, I will copy the query, drop the view, create a new view, paste t
he
>query, and save it with the new name.
>That's a lot more steps than simply doing the Explorer-style rename, but it
>will save a lot of grief in the long run.
Hi Tracy,
Slightly shorter: generate a script including the DROP command; edit the
script (but only chage the name on the CREATE command) and execute it.
Better yet: store all DDL for your tables, views, procs, etc outside of
SQL Server - preferably in source control.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Problem with Views

A while back I ran into a problem where changes to views (such as renaming
them) was not being reflected. Somehow I was able to get past this problem.
Now I want to generate a script that will create my views. When I look at
the script that was generated has old information; the old names, and the old
queries.
Is there something I'm overlooking when I make changes to views?Ensure that you are not creating views with different owners other than
DBO... It's possible that you are getting messed up with different version
of the same view owned by different owners..
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Tracy" <Tracy@.discussions.microsoft.com> wrote in message
news:711B82B3-D80C-4EA4-9014-7EA62C8DF370@.microsoft.com...
>A while back I ran into a problem where changes to views (such as renaming
> them) was not being reflected. Somehow I was able to get past this
> problem.
> Now I want to generate a script that will create my views. When I look at
> the script that was generated has old information; the old names, and the
> old
> queries.
> Is there something I'm overlooking when I make changes to views?|||DBO is the only user for this DB. Each create statement in the generated
script looks like this: CREATE VIEW dbo.someview. The problem is that these
view names and associated querys are old, the way the were before I renamed
them and made changes to the queries.
Thanks for your quick reply,
-Tracy
"Wayne Snyder" wrote:
> Ensure that you are not creating views with different owners other than
> DBO... It's possible that you are getting messed up with different version
> of the same view owned by different owners..
>
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "Tracy" <Tracy@.discussions.microsoft.com> wrote in message
> news:711B82B3-D80C-4EA4-9014-7EA62C8DF370@.microsoft.com...
> >A while back I ran into a problem where changes to views (such as renaming
> > them) was not being reflected. Somehow I was able to get past this
> > problem.
> >
> > Now I want to generate a script that will create my views. When I look at
> > the script that was generated has old information; the old names, and the
> > old
> > queries.
> >
> > Is there something I'm overlooking when I make changes to views?
>
>|||On Tue, 16 Aug 2005 09:55:04 -0700, Tracy wrote:
>DBO is the only user for this DB. Each create statement in the generated
>script looks like this: CREATE VIEW dbo.someview. The problem is that these
>view names and associated querys are old, the way the were before I renamed
>them and made changes to the queries.
>Thanks for your quick reply,
>-Tracy
Hi Tracy,
How did you rename the queries? Did you execute a sp_rename? Or did you
open the view definition, change the name and execute it? In the latter
case, you didn't rename it - you made a new view (with a new name),
based on the old view. You'll still have to drop the old view.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Using SQL Server Enterprise Manager (v8.0) I renamed the views the Windows
Explorer way: Highlight the item, single click it, type in the new name.
I generated another script just now, but this time I left the "Generate the
DROP <object>" checked. The script had DROP commands for the current views,
but the CREATE VIEWs were all the old view names and queries.
"Hugo Kornelis" wrote:
> On Tue, 16 Aug 2005 09:55:04 -0700, Tracy wrote:
> >DBO is the only user for this DB. Each create statement in the generated
> >script looks like this: CREATE VIEW dbo.someview. The problem is that these
> >view names and associated querys are old, the way the were before I renamed
> >them and made changes to the queries.
> >
> >Thanks for your quick reply,
> >-Tracy
> Hi Tracy,
> How did you rename the queries? Did you execute a sp_rename? Or did you
> open the view definition, change the name and execute it? In the latter
> case, you didn't rename it - you made a new view (with a new name),
> based on the old view. You'll still have to drop the old view.
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>|||On Wed, 17 Aug 2005 06:45:03 -0700, Tracy wrote:
>Using SQL Server Enterprise Manager (v8.0) I renamed the views the Windows
>Explorer way: Highlight the item, single click it, type in the new name.
Hi Tracy,
Thanks - I never even knew that you could rename objects that way as
well!
However, the best way to rename views, stored procedures, triggers, and
user-defined functions is to explicitly drop and recreate them. Here's a
recent post by Tibor Karaszi about what goes wrong:
(Warning - long URL, check for line wrapping)
http://groups.google.com/groups?hl=en&lr=&safe=off&num=10&q=syscomments+group%3Amicrosoft.public.sqlserver.programming+insubject%3ARenaming+insubject%3Astored+insubject%3Aprocedures+insubject%3Ain+insubject%3Abulk+author%3ATibor+author%3AKaraszi&safe=off&qt_s=Search
>I generated another script just now, but this time I left the "Generate the
>DROP <object>" checked. The script had DROP commands for the current views,
>but the CREATE VIEWs were all the old view names and queries.
That's how you should rename your objects next time, but it won't help
now. I guess you'll have to manually change the name in the scripts.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thank you!
I was able to do in-depth research with the starting point you gave me.
I executed "select * from information_schema.views" and found that the
"view_definition" column had the old names. I was a little hasty in my
conclusion that the queries were old as well. I checked them thoroughly and
they look to be correct.
So to solve my current problem, I just need to change the names in the
generated script and then run the script, (including the DROPs).
In the future, I will try to get by without renaming. But if I must rename
the views, I will copy the query, drop the view, create a new view, paste the
query, and save it with the new name.
That's a lot more steps than simply doing the Explorer-style rename, but it
will save a lot of grief in the long run.
Thanks again, Hugo and Wayne, for your help
-Tracy
"Hugo Kornelis" wrote:
> Thanks - I never even knew that you could rename objects that way as
> well!
> However, the best way to rename views, stored procedures, triggers, and
> user-defined functions is to explicitly drop and recreate them. Here's a
> recent post by Tibor Karaszi about what goes wrong:
> (Warning - long URL, check for line wrapping)
> http://groups.google.com/groups?hl=en&lr=&safe=off&num=10&q=syscomments+group%3Amicrosoft.public.sqlserver.programming+insubject%3ARenaming+insubject%3Astored+insubject%3Aprocedures+insubject%3Ain+insubject%3Abulk+author%3ATibor+author%3AKaraszi&safe=off&qt_s=Search
>|||On Thu, 18 Aug 2005 06:50:08 -0700, Tracy wrote:
(snip)
>In the future, I will try to get by without renaming. But if I must rename
>the views, I will copy the query, drop the view, create a new view, paste the
>query, and save it with the new name.
>That's a lot more steps than simply doing the Explorer-style rename, but it
>will save a lot of grief in the long run.
Hi Tracy,
Slightly shorter: generate a script including the DROP command; edit the
script (but only chage the name on the CREATE command) and execute it.
Better yet: store all DDL for your tables, views, procs, etc outside of
SQL Server - preferably in source control.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Problem with viewing column permissions in Enterprise Manager

When trying to configure SQL Server security at the column level I ran into
a problem: if I assigned column-level security through Enterprise Manager it
seemed to work fine, but after reopening the permission dialog box the
permissions on some columns disappeared.
After doing some research I can now simulate the behaviour when running the
following script. In Enterprise manager the security on column 'Col3' does
not show after running the script, though it is there.
CREATE TABLE test
(
Col1 int NOT NULL,
Col2 nvarchar(50) NOT NULL,
Col3 int NOT NULL
)
GO
ALTER TABLE test
DROP COLUMN Col2
GO
GRANT SELECT ON test(Col3) TO public
GO
/* Correct: returns select permission on Col3 */
sp_helprotect 'test'
GO
/* Bug! Does not return anything. */
/* Problem is that sp_MSobjectprivs uses count(*) on syscolumns instead of
max(colid) to determine maximum column number */
sp_MSobjectprivs N'test','column',null,null,null,null,0,1
GO
Enterprise Manager seems to use the sp_MSobjectprivs procedure to retrieve
the column permissions, but that one fails if columns are not numbered
consecutively (as caused by the DROP COLUMN).
Stefan Cuypers.
Dear Stefan,
Thank you for your feedback. I have reproduced the problem. Please rest
assured that we do understand your concerns and that the known issue is
being worked in development with priority after we report it via our
internal channel. We strive to capture any and all product issues / product
feedback so as to ensure that we are continuously developing Microsoft
products to meet customer needs. This is exactly why feedback such as
yours is always taken very seriously.
While we also hope to see the issue fixed as soon as possible, we have
re-confirmed with the development team that there are no better workarounds
at this time. If there are any updates on the issue, I will do my best to
be the first one to let you know.
Once again, thank you for your time and feedback.
Sincerely,
Bill Cheng
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
| From: "Stefan Cuypers" <stefan.cuypers@.nospam.nospam>
| Subject: Problem with viewing column permissions in Enterprise Manager
| Date: Fri, 2 Jul 2004 16:15:01 +0200
| Lines: 35
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.0
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.132
| Message-ID: <#kQW57DYEHA.2908@.TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.tools
| NNTP-Posting-Host: d576ae10.kabel.telenet.be 213.118.174.16
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.tools:24406
| X-Tomcat-NG: microsoft.public.sqlserver.tools
|
| When trying to configure SQL Server security at the column level I ran
into
| a problem: if I assigned column-level security through Enterprise Manager
it
| seemed to work fine, but after reopening the permission dialog box the
| permissions on some columns disappeared.
| After doing some research I can now simulate the behaviour when running
the
| following script. In Enterprise manager the security on column 'Col3' does
| not show after running the script, though it is there.
| CREATE TABLE test
| (
| Col1 int NOT NULL,
| Col2 nvarchar(50) NOT NULL,
| Col3 int NOT NULL
| )
| GO
| ALTER TABLE test
| DROP COLUMN Col2
| GO
| GRANT SELECT ON test(Col3) TO public
| GO
| /* Correct: returns select permission on Col3 */
| sp_helprotect 'test'
| GO
| /* Bug! Does not return anything. */
| /* Problem is that sp_MSobjectprivs uses count(*) on syscolumns instead of
| max(colid) to determine maximum column number */
| sp_MSobjectprivs N'test','column',null,null,null,null,0,1
| GO
|
| Enterprise Manager seems to use the sp_MSobjectprivs procedure to retrieve
| the column permissions, but that one fails if columns are not numbered
| consecutively (as caused by the DROP COLUMN).
|
| Stefan Cuypers.
|
|
|
|||Bill,
Thanks for the feedback. I'm glad you take it seriously and will try to fix
it in a next update.
Stefan.
""Bill Cheng"" <billchng@.online.microsoft.com> wrote in message
news:jNqMXDOYEHA.2352@.cpmsftngxa06.phx.gbl...
> Dear Stefan,
> Thank you for your feedback. I have reproduced the problem. Please rest
> assured that we do understand your concerns and that the known issue is
> being worked in development with priority after we report it via our
> internal channel. We strive to capture any and all product issues /
product
> feedback so as to ensure that we are continuously developing Microsoft
> products to meet customer needs. This is exactly why feedback such as
> yours is always taken very seriously.
> While we also hope to see the issue fixed as soon as possible, we have
> re-confirmed with the development team that there are no better
workarounds
> at this time. If there are any updates on the issue, I will do my best to
> be the first one to let you know.
> Once again, thank you for your time and feedback.
> Sincerely,
> Bill Cheng
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> --
> | From: "Stefan Cuypers" <stefan.cuypers@.nospam.nospam>
> | Subject: Problem with viewing column permissions in Enterprise Manager
> | Date: Fri, 2 Jul 2004 16:15:01 +0200
> | Lines: 35
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.3790.0
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.132
> | Message-ID: <#kQW57DYEHA.2908@.TK2MSFTNGP10.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.tools
> | NNTP-Posting-Host: d576ae10.kabel.telenet.be 213.118.174.16
> | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
> | Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.tools:24406
> | X-Tomcat-NG: microsoft.public.sqlserver.tools
> |
> | When trying to configure SQL Server security at the column level I ran
> into
> | a problem: if I assigned column-level security through Enterprise
Manager
> it
> | seemed to work fine, but after reopening the permission dialog box the
> | permissions on some columns disappeared.
> | After doing some research I can now simulate the behaviour when running
> the
> | following script. In Enterprise manager the security on column 'Col3'
does
> | not show after running the script, though it is there.
> | CREATE TABLE test
> | (
> | Col1 int NOT NULL,
> | Col2 nvarchar(50) NOT NULL,
> | Col3 int NOT NULL
> | )
> | GO
> | ALTER TABLE test
> | DROP COLUMN Col2
> | GO
> | GRANT SELECT ON test(Col3) TO public
> | GO
> | /* Correct: returns select permission on Col3 */
> | sp_helprotect 'test'
> | GO
> | /* Bug! Does not return anything. */
> | /* Problem is that sp_MSobjectprivs uses count(*) on syscolumns instead
of
> | max(colid) to determine maximum column number */
> | sp_MSobjectprivs N'test','column',null,null,null,null,0,1
> | GO
> |
> | Enterprise Manager seems to use the sp_MSobjectprivs procedure to
retrieve
> | the column permissions, but that one fails if columns are not numbered
> | consecutively (as caused by the DROP COLUMN).
> |
> | Stefan Cuypers.
> |
> |
> |
>