Showing posts with label security. Show all posts
Showing posts with label security. Show all posts

Friday, March 16, 2012

"TRUNCATE TABLE" in a sproc w/locked-down user

Hullo folks, I'm having what I assume is a fairly mundane security issue.

I have a SQL login that I am trying to restrict as much as possible. This account's sole goal in life is to hit the server, return some usage statistics, then truncate the table it received the statistics from. I would like to refrain from granting this login permissions on the physical target table if possible.

Usually I can wrap up "protected" operations in a stored procedure, then grant exec permissions for my user and I'm good to go. However, TRUNCATE TABLE gets cranky with me when I attempt the above method. I suspect that has to do with the fact that TRUNCATE TABLE is effectively modifying the table itself as opposed to merely deleting data.

Is it possible to grant this login ONLY execute permission on a stored proc that TRUNCATE's tables without giving the user any physical permissions? Am I going about this the wrong way?The only people who can use 'truncate' are the table owner, sysadmin, db_owner, and db_ddladmin; so if you have a user whose permissions are severely restricted I would not think 'truncate' would work, or if it would it would be a phaff to set up.

Why not just DELETE FROM, or use a temp table to create the statistics and return them?|||This is effectively what I ended up doing after making the same permissions determination. I had my heart set on Truncate do to the nature of the process itself, but I was able to work around the restriction using DELETE FROM and a local scheduled maintenance job.|||Is there a way he can call an osql command via xp_cmdshell that connects with a trusted connection that can truncate the table ? I tried some stuff with a server link to itself, but cannot truncate table link.db.owner.table, same goes with openquery (truncate not supported).|||That would present a larger security issue then outright granting the user required permissions. I definately don't want to expose trusted command line functionality to this login.

What I have now works, it's just not exactly the way I want it to. All of my research indicates that it will just have to be good enough as I cannot get around that pesky permissions requirement for TRUNCATE.|||In the past I have allowed a user to own a single table for a similar purpose. But that was for an import table, where the data was truncated, reloaded, diced up, and distributed to other tables. No other process even knew the table was there. It gets you out of having to have db_owner rights, but there is no other way around the requirement of owning the table.|||why dont you leave the table there and run a nightly process that truncates any table that had statistics grabbed from it

have an admin account run the nightly process, but the restricted user still gets their statistics

just a thought|||why dont you leave the table there and run a nightly process that truncates any table that had statistics grabbed from it

have an admin account run the nightly process, but the restricted user still gets their statistics

just a thought
That's the current working solution. The process runs a couple times a day, but same idea.

"The text has been replaced with this comment for security reasons"

Is it possible to disable this security feature (need it on a dev.
box)
Morten
I don't believe it's possible to disable this behaviour in Profiler (it
would kind of defeat its purpose) .
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"wapsiii" <wapsiii@.otmail.com> wrote in message
news:lmoul11as3fo24vdpcd6dollue134qq4v0@.4ax.com...
> Is it possible to disable this security feature (need it on a dev.
> box)
> Morten
|||Well yes, but nice on a dev. box :|
On Wed, 26 Oct 2005 14:40:46 +0100, "Jasper Smith"
<jasper_smith9@.hotmail.com> wrote:

>I don't believe it's possible to disable this behaviour in Profiler (it
>would kind of defeat its purpose) .

"The text has been replaced with this comment for security reasons

"-- 'password' was found in the text of this event.
-- The text has been replaced with this comment for security reasons."
How do I turn this functionality off? I need to display the SQL statement.
It is not configurable. It is a security feature in Profiler.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"nickname" <nickname@.online.nospam> wrote in message
news:19DCF747-8DA3-45DF-B1FD-A62B629CFE36@.microsoft.com...
> "-- 'password' was found in the text of this event.
> -- The text has been replaced with this comment for security reasons."
> How do I turn this functionality off? I need to display the SQL statement.

"The text has been replaced with this comment for security reasons

"-- 'password' was found in the text of this event.
-- The text has been replaced with this comment for security reasons."
How do I turn this functionality off? I need to display the SQL statement.It is not configurable. It is a security feature in Profiler.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"nickname" <nickname@.online.nospam> wrote in message
news:19DCF747-8DA3-45DF-B1FD-A62B629CFE36@.microsoft.com...
> "-- 'password' was found in the text of this event.
> -- The text has been replaced with this comment for security reasons."
> How do I turn this functionality off? I need to display the SQL statement.|||A security feature? I cannot believe it cannot be turned off, if it cannot I
am going back to SP3. I need to see what my stored procedures my application
is calling and the parameters passed to them. How am I supposed to do this if
the SP contains a parameter called password?
This blocking seems silly to me.
"Tibor Karaszi" wrote:
> It is not configurable. It is a security feature in Profiler.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "nickname" <nickname@.online.nospam> wrote in message
> news:19DCF747-8DA3-45DF-B1FD-A62B629CFE36@.microsoft.com...
> > "-- 'password' was found in the text of this event.
> > -- The text has been replaced with this comment for security reasons."
> >
> > How do I turn this functionality off? I need to display the SQL statement.
>|||Did you see this post-sp3? I thought that Profiler always hides the text. Perhaps they expanded it
from sp_password to just password? Anyhow, perhaps you can find something in ReadMe for the service
pack (4, I presume)?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"nickname" <nickname@.online.nospam> wrote in message
news:FCD76BC9-9072-4811-8E5D-0334B0CF0364@.microsoft.com...
>A security feature? I cannot believe it cannot be turned off, if it cannot I
> am going back to SP3. I need to see what my stored procedures my application
> is calling and the parameters passed to them. How am I supposed to do this if
> the SP contains a parameter called password?
> This blocking seems silly to me.
> "Tibor Karaszi" wrote:
>> It is not configurable. It is a security feature in Profiler.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "nickname" <nickname@.online.nospam> wrote in message
>> news:19DCF747-8DA3-45DF-B1FD-A62B629CFE36@.microsoft.com...
>> > "-- 'password' was found in the text of this event.
>> > -- The text has been replaced with this comment for security reasons."
>> >
>> > How do I turn this functionality off? I need to display the SQL statement.
>>

"The text has been replaced with this comment for security reasons

"-- 'password' was found in the text of this event.
-- The text has been replaced with this comment for security reasons."
How do I turn this functionality off? I need to display the SQL statement.It is not configurable. It is a security feature in Profiler.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"nickname" <nickname@.online.nospam> wrote in message
news:19DCF747-8DA3-45DF-B1FD-A62B629CFE36@.microsoft.com...
> "-- 'password' was found in the text of this event.
> -- The text has been replaced with this comment for security reasons."
> How do I turn this functionality off? I need to display the SQL statement.

"Suddently" can't connect to sql server (SP security prob, maybe?)

Hi! I'm running sql server 2003 on a network for my small business; I'm
having probs connecting to the server from my desktop. What's odd is that
this prob sudently occured yesterday...I had been connecting before that
(like, for several years?) and now I can't hit the box thorugh either Query
Analyzer or Enterprise manager.
The server is online because I can map to it and see the directories. Also:
I have a notebook which still can see the SQL Server box with NO Problems!
Which begs the question: what changed over the weekend? I seem to remember
that a OS SP/Hotfix/etc was automatically downloaded and installed on one of
these two computers recently. Are you aware of any security changes that may
have been slipped in on either the server or the client side to explain this?
I'm running Win Server 2003 on the server and XP Prof SP2 on the desktop.
Thanks in advance for your help. I rally appreciate it!
Roger,

> I have a notebook which still can see the SQL Server box with NO Problems!
The box or the SQL Server i.e., the databases, tables and data. Can you
acesss the SQL Server by IP address? Does the OSQL utility work? What if
you try creating a DSN and 'test the connection' - just to rule out the SQL
tools as a possible cause? Have you tried restarting this client?
HTH
Jerry
"Roger Willcode" <RogerWillcode@.discussions.microsoft.com> wrote in message
news:FA1EA7E3-B9D7-4E06-96B9-D619A211088D@.microsoft.com...
> Hi! I'm running sql server 2003 on a network for my small business; I'm
> having probs connecting to the server from my desktop. What's odd is that
> this prob sudently occured yesterday...I had been connecting before that
> (like, for several years?) and now I can't hit the box thorugh either
> Query
> Analyzer or Enterprise manager.
> The server is online because I can map to it and see the directories.
> Also:
> I have a notebook which still can see the SQL Server box with NO Problems!
> Which begs the question: what changed over the weekend? I seem to remember
> that a OS SP/Hotfix/etc was automatically downloaded and installed on one
> of
> these two computers recently. Are you aware of any security changes that
> may
> have been slipped in on either the server or the client side to explain
> this?
> I'm running Win Server 2003 on the server and XP Prof SP2 on the desktop.
> Thanks in advance for your help. I rally appreciate it!
|||Roger,
So if I read your e-mail correctly from your desktop you can login via
Query Analyzer or Enterprise Manager but from another box you can login
to the SQL Server box using another tool? Could there have been a
network change the happened on the weekend where you box got a new IP or
the network security changed?
If the SQL Server is up [you can login via another client or directly on
the box itself] then the problem has to be with your computer or network
permissions. You may check to see if your IP changed or perhaps they
access from your IP to the server was removed.
Shahryar
Roger Willcode wrote:

>Hi! I'm running sql server 2003 on a network for my small business; I'm
>having probs connecting to the server from my desktop. What's odd is that
>this prob sudently occured yesterday...I had been connecting before that
>(like, for several years?) and now I can't hit the box thorugh either Query
>Analyzer or Enterprise manager.
>The server is online because I can map to it and see the directories. Also:
>I have a notebook which still can see the SQL Server box with NO Problems!
>Which begs the question: what changed over the weekend? I seem to remember
>that a OS SP/Hotfix/etc was automatically downloaded and installed on one of
>these two computers recently. Are you aware of any security changes that may
>have been slipped in on either the server or the client side to explain this?
>I'm running Win Server 2003 on the server and XP Prof SP2 on the desktop.
>Thanks in advance for your help. I rally appreciate it!
>
Shahryar G. Hashemi | Sr. DBA Consultant
InfoSpace, Inc.
601 108th Ave NE | Suite 1200 | Bellevue, WA 98004 USA
Mobile +1 206.459.6203 | Office +1 425.201.8853 | Fax +1 425.201.6150
shashem@.infospace.com | www.infospaceinc.com
This e-mail and any attachments may contain confidential information that is legally privileged. The information is solely for the use of the intended recipient(s); any disclosure, copying, distribution, or other use of this information is strictly prohi
bited. If you have received this e-mail in error, please notify the sender by return e-mail and delete this message. Thank you.

"Suddently" can't connect to sql server (SP security prob, maybe?)

Hi! I'm running sql server 2003 on a network for my small business; I'm
having probs connecting to the server from my desktop. What's odd is that
this prob sudently occured yesterday...I had been connecting before that
(like, for several years?) and now I can't hit the box thorugh either Query
Analyzer or Enterprise manager.
The server is online because I can map to it and see the directories. Also:
I have a notebook which still can see the SQL Server box with NO Problems!
Which begs the question: what changed over the weekend? I seem to remember
that a OS SP/Hotfix/etc was automatically downloaded and installed on one of
these two computers recently. Are you aware of any security changes that may
have been slipped in on either the server or the client side to explain this?
I'm running Win Server 2003 on the server and XP Prof SP2 on the desktop.
Thanks in advance for your help. I rally appreciate it!Roger,
> I have a notebook which still can see the SQL Server box with NO Problems!
The box or the SQL Server i.e., the databases, tables and data. Can you
acesss the SQL Server by IP address? Does the OSQL utility work? What if
you try creating a DSN and 'test the connection' - just to rule out the SQL
tools as a possible cause? Have you tried restarting this client?
HTH
Jerry
"Roger Willcode" <RogerWillcode@.discussions.microsoft.com> wrote in message
news:FA1EA7E3-B9D7-4E06-96B9-D619A211088D@.microsoft.com...
> Hi! I'm running sql server 2003 on a network for my small business; I'm
> having probs connecting to the server from my desktop. What's odd is that
> this prob sudently occured yesterday...I had been connecting before that
> (like, for several years?) and now I can't hit the box thorugh either
> Query
> Analyzer or Enterprise manager.
> The server is online because I can map to it and see the directories.
> Also:
> I have a notebook which still can see the SQL Server box with NO Problems!
> Which begs the question: what changed over the weekend? I seem to remember
> that a OS SP/Hotfix/etc was automatically downloaded and installed on one
> of
> these two computers recently. Are you aware of any security changes that
> may
> have been slipped in on either the server or the client side to explain
> this?
> I'm running Win Server 2003 on the server and XP Prof SP2 on the desktop.
> Thanks in advance for your help. I rally appreciate it!|||Roger,
So if I read your e-mail correctly from your desktop you can login via
Query Analyzer or Enterprise Manager but from another box you can login
to the SQL Server box using another tool? Could there have been a
network change the happened on the weekend where you box got a new IP or
the network security changed?
If the SQL Server is up [you can login via another client or directly on
the box itself] then the problem has to be with your computer or network
permissions. You may check to see if your IP changed or perhaps they
access from your IP to the server was removed.
Shahryar
Roger Willcode wrote:
>Hi! I'm running sql server 2003 on a network for my small business; I'm
>having probs connecting to the server from my desktop. What's odd is that
>this prob sudently occured yesterday...I had been connecting before that
>(like, for several years?) and now I can't hit the box thorugh either Query
>Analyzer or Enterprise manager.
>The server is online because I can map to it and see the directories. Also:
>I have a notebook which still can see the SQL Server box with NO Problems!
>Which begs the question: what changed over the weekend? I seem to remember
>that a OS SP/Hotfix/etc was automatically downloaded and installed on one of
>these two computers recently. Are you aware of any security changes that may
>have been slipped in on either the server or the client side to explain this?
>I'm running Win Server 2003 on the server and XP Prof SP2 on the desktop.
>Thanks in advance for your help. I rally appreciate it!
>
Shahryar G. Hashemi | Sr. DBA Consultant
InfoSpace, Inc.
601 108th Ave NE | Suite 1200 | Bellevue, WA 98004 USA
Mobile +1 206.459.6203 | Office +1 425.201.8853 | Fax +1 425.201.6150
shashem@.infospace.com | www.infospaceinc.com
This e-mail and any attachments may contain confidential information that is legally privileged. The information is solely for the use of the intended recipient(s); any disclosure, copying, distribution, or other use of this information is strictly prohibited. If you have received this e-mail in error, please notify the sender by return e-mail and delete this message. Thank you.|||Jerry, Shahryar:
First: Thanks to both you you for replying! It works now -- although I'm not
exactly sure what changed.
If it helps for anyone else reading this post; I did restart both the client
and the server to no avail. Also, I don't think there was a change in the
network permissions; I'm the only user on this network! I *did* try
connecting with the IP address and that was also a dead end.
Just for TheHalibut, I tried Jerry's suggestion of creating a ODBC
connection. When I selected TCP/IP as the connection it failed to connect.
But when I clicked the "named pipes" radio button it worked. Even more
puzzling was that I can now go back to Enterprise Manager -- and without any
further changes -- it works again.
Any body have any clues as to what happened? Also, Jerry refered to a "OSQL
utility." Sorry to be dense, but what is that?
Thanks again for your help. I'm good for now, and if you get a chance to
post any thouughts you have on my questions, I'll be even better next time!
Take care.
"Jerry Spivey" wrote:
> Roger,
> > I have a notebook which still can see the SQL Server box with NO Problems!
> The box or the SQL Server i.e., the databases, tables and data. Can you
> acesss the SQL Server by IP address? Does the OSQL utility work? What if
> you try creating a DSN and 'test the connection' - just to rule out the SQL
> tools as a possible cause? Have you tried restarting this client?
> HTH
> Jerry
> "Roger Willcode" <RogerWillcode@.discussions.microsoft.com> wrote in message
> news:FA1EA7E3-B9D7-4E06-96B9-D619A211088D@.microsoft.com...
> > Hi! I'm running sql server 2003 on a network for my small business; I'm
> > having probs connecting to the server from my desktop. What's odd is that
> > this prob sudently occured yesterday...I had been connecting before that
> > (like, for several years?) and now I can't hit the box thorugh either
> > Query
> > Analyzer or Enterprise manager.
> >
> > The server is online because I can map to it and see the directories.
> > Also:
> > I have a notebook which still can see the SQL Server box with NO Problems!
> >
> > Which begs the question: what changed over the weekend? I seem to remember
> > that a OS SP/Hotfix/etc was automatically downloaded and installed on one
> > of
> > these two computers recently. Are you aware of any security changes that
> > may
> > have been slipped in on either the server or the client side to explain
> > this?
> >
> > I'm running Win Server 2003 on the server and XP Prof SP2 on the desktop.
> >
> > Thanks in advance for your help. I rally appreciate it!
>
>|||Roger,
The OSQL utility is the CMD line utility for querying SQL Server.
See:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_osql_1wxl.asp
HTH
Jerry
"Roger Willcode" <RogerWillcode@.discussions.microsoft.com> wrote in message
news:1031B9B4-3AF4-4BF3-8B7D-A0A97E92057A@.microsoft.com...
> Jerry, Shahryar:
> First: Thanks to both you you for replying! It works now -- although I'm
> not
> exactly sure what changed.
> If it helps for anyone else reading this post; I did restart both the
> client
> and the server to no avail. Also, I don't think there was a change in the
> network permissions; I'm the only user on this network! I *did* try
> connecting with the IP address and that was also a dead end.
> Just for TheHalibut, I tried Jerry's suggestion of creating a ODBC
> connection. When I selected TCP/IP as the connection it failed to connect.
> But when I clicked the "named pipes" radio button it worked. Even more
> puzzling was that I can now go back to Enterprise Manager -- and without
> any
> further changes -- it works again.
> Any body have any clues as to what happened? Also, Jerry refered to a
> "OSQL
> utility." Sorry to be dense, but what is that?
> Thanks again for your help. I'm good for now, and if you get a chance to
> post any thouughts you have on my questions, I'll be even better next
> time!
> Take care.
>
> "Jerry Spivey" wrote:
>> Roger,
>> > I have a notebook which still can see the SQL Server box with NO
>> > Problems!
>> The box or the SQL Server i.e., the databases, tables and data. Can you
>> acesss the SQL Server by IP address? Does the OSQL utility work? What
>> if
>> you try creating a DSN and 'test the connection' - just to rule out the
>> SQL
>> tools as a possible cause? Have you tried restarting this client?
>> HTH
>> Jerry
>> "Roger Willcode" <RogerWillcode@.discussions.microsoft.com> wrote in
>> message
>> news:FA1EA7E3-B9D7-4E06-96B9-D619A211088D@.microsoft.com...
>> > Hi! I'm running sql server 2003 on a network for my small business; I'm
>> > having probs connecting to the server from my desktop. What's odd is
>> > that
>> > this prob sudently occured yesterday...I had been connecting before
>> > that
>> > (like, for several years?) and now I can't hit the box thorugh either
>> > Query
>> > Analyzer or Enterprise manager.
>> >
>> > The server is online because I can map to it and see the directories.
>> > Also:
>> > I have a notebook which still can see the SQL Server box with NO
>> > Problems!
>> >
>> > Which begs the question: what changed over the weekend? I seem to
>> > remember
>> > that a OS SP/Hotfix/etc was automatically downloaded and installed on
>> > one
>> > of
>> > these two computers recently. Are you aware of any security changes
>> > that
>> > may
>> > have been slipped in on either the server or the client side to explain
>> > this?
>> >
>> > I'm running Win Server 2003 on the server and XP Prof SP2 on the
>> > desktop.
>> >
>> > Thanks in advance for your help. I rally appreciate it!
>>

"Suddently" can't connect to sql server (SP security prob, maybe?)

Hi! I'm running sql server 2003 on a network for my small business; I'm
having probs connecting to the server from my desktop. What's odd is that
this prob sudently occured yesterday...I had been connecting before that
(like, for several years?) and now I can't hit the box thorugh either Query
Analyzer or Enterprise manager.
The server is online because I can map to it and see the directories. Also:
I have a notebook which still can see the SQL Server box with NO Problems!
Which begs the question: what changed over the weekend? I seem to remember
that a OS SP/Hotfix/etc was automatically downloaded and installed on one of
these two computers recently. Are you aware of any security changes that may
have been slipped in on either the server or the client side to explain this
?
I'm running Win Server 2003 on the server and XP Prof SP2 on the desktop.
Thanks in advance for your help. I rally appreciate it!Roger,

> I have a notebook which still can see the SQL Server box with NO Problems!
The box or the SQL Server i.e., the databases, tables and data. Can you
acesss the SQL Server by IP address? Does the OSQL utility work? What if
you try creating a DSN and 'test the connection' - just to rule out the SQL
tools as a possible cause? Have you tried restarting this client?
HTH
Jerry
"Roger Willcode" <RogerWillcode@.discussions.microsoft.com> wrote in message
news:FA1EA7E3-B9D7-4E06-96B9-D619A211088D@.microsoft.com...
> Hi! I'm running sql server 2003 on a network for my small business; I'm
> having probs connecting to the server from my desktop. What's odd is that
> this prob sudently occured yesterday...I had been connecting before that
> (like, for several years?) and now I can't hit the box thorugh either
> Query
> Analyzer or Enterprise manager.
> The server is online because I can map to it and see the directories.
> Also:
> I have a notebook which still can see the SQL Server box with NO Problems!
> Which begs the question: what changed over the weekend? I seem to remember
> that a OS SP/Hotfix/etc was automatically downloaded and installed on one
> of
> these two computers recently. Are you aware of any security changes that
> may
> have been slipped in on either the server or the client side to explain
> this?
> I'm running Win Server 2003 on the server and XP Prof SP2 on the desktop.
> Thanks in advance for your help. I rally appreciate it!|||Roger,
So if I read your e-mail correctly from your desktop you can login via
Query Analyzer or Enterprise Manager but from another box you can login
to the SQL Server box using another tool? Could there have been a
network change the happened on the weekend where you box got a new IP or
the network security changed?
If the SQL Server is up [you can login via another client or directly on
the box itself] then the problem has to be with your computer or network
permissions. You may check to see if your IP changed or perhaps they
access from your IP to the server was removed.
Shahryar
Roger Willcode wrote:

>Hi! I'm running sql server 2003 on a network for my small business; I'm
>having probs connecting to the server from my desktop. What's odd is that
>this prob sudently occured yesterday...I had been connecting before that
>(like, for several years?) and now I can't hit the box thorugh either Query
>Analyzer or Enterprise manager.
>The server is online because I can map to it and see the directories. Also:
>I have a notebook which still can see the SQL Server box with NO Problems!
>Which begs the question: what changed over the weekend? I seem to remember
>that a OS SP/Hotfix/etc was automatically downloaded and installed on one o
f
>these two computers recently. Are you aware of any security changes that ma
y
>have been slipped in on either the server or the client side to explain thi
s?
>I'm running Win Server 2003 on the server and XP Prof SP2 on the desktop.
>Thanks in advance for your help. I rally appreciate it!
>
Shahryar G. Hashemi | Sr. DBA Consultant
InfoSpace, Inc.
601 108th Ave NE | Suite 1200 | Bellevue, WA 98004 USA
Mobile +1 206.459.6203 | Office +1 425.201.8853 | Fax +1 425.201.6150
shashem@.infospace.com | www.infospaceinc.com
This e-mail and any attachments may contain confidential information that is
legally privileged. The information is solely for the use of the intended
recipient(s); any disclosure, copying, distribution, or other use of this in
formation is strictly prohi
bited. If you have received this e-mail in error, please notify the sender
by return e-mail and delete this message. Thank you.

Sunday, March 11, 2012

"simple" security?

I've heard that SQL Server's security system is good, but complicated. What
is the easiest way to:
1. Limit who can make structural changes to the database, including stored
procedures.
2. Limit read access to certain tables or fields, and limit write access for
others.
At this point, I don't need something totally bulletproof. Just plain
serviceable would do for the time being.There are some database roles called db_datareader and db_datawriter that
allow a user to either read or write to tables. Apart from those, you could
just not grant any rights at all to a user, but give him explicit SELECT,
INSERT, UPDATE, DELETE permissions on a table. You can find a brief overview
of SQL Server security model at:
http://vyaskn.tripod.com/sql_server...t_practices.htm
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Paul Pedersen" <no-reply@.swen.com> wrote in message
news:uaZAPfjXFHA.2420@.TK2MSFTNGP12.phx.gbl...
> I've heard that SQL Server's security system is good, but complicated.
What
> is the easiest way to:
> 1. Limit who can make structural changes to the database, including stored
> procedures.
> 2. Limit read access to certain tables or fields, and limit write access
for
> others.
>
> At this point, I don't need something totally bulletproof. Just plain
> serviceable would do for the time being.
>
>
>|||Thank you. I will try to find something "simple" in there...
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:%23ZEoqijXFHA.3732@.TK2MSFTNGP10.phx.gbl...
> There are some database roles called db_datareader and db_datawriter that
> allow a user to either read or write to tables. Apart from those, you
> could
> just not grant any rights at all to a user, but give him explicit SELECT,
> INSERT, UPDATE, DELETE permissions on a table. You can find a brief
> overview
> of SQL Server security model at:
> http://vyaskn.tripod.com/sql_server...t_practices.htm
> --
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Paul Pedersen" <no-reply@.swen.com> wrote in message
> news:uaZAPfjXFHA.2420@.TK2MSFTNGP12.phx.gbl...
> What
> for
>

Monday, February 13, 2012

"Error creating MDAC instance" performing Bulk Insert

I get this error when trying to perform a bulk insert. This started
happening after the latest security fixes were loaded on the server.
Anyone know what this error means?
I was able to correct this by installing the latest sp of MDAC and SP3 of
SQLXML.
"DavidSp8" wrote:

> I get this error when trying to perform a bulk insert. This started
> happening after the latest security fixes were loaded on the server.
> Anyone know what this error means?

"Error creating MDAC instance" performing Bulk Insert

I get this error when trying to perform a bulk insert. This started
happening after the latest security fixes were loaded on the server.
Anyone know what this error means?I was able to correct this by installing the latest sp of MDAC and SP3 of
SQLXML.
"DavidSp8" wrote:

> I get this error when trying to perform a bulk insert. This started
> happening after the latest security fixes were loaded on the server.
> Anyone know what this error means?

Friday, January 27, 2012

'password' was found in the text of this event.

-- 'password' was found in the text of this event.
-- The text has been replaced with this comment for security reasons.
Where can I find more info on this? Particularly, how to turn it off on our
development machines.
Jonathan AllenAFAIK, Its a security feature added in SP4 and its not configurable, ie, you
cannot turn it off.
Roji. P. Thomas
Net Asset Management
http://toponewithties.blogspot.com
"Jonathan Allen" <x@.x.x> wrote in message
news:ON5rgxTpFHA.1044@.tk2msftngp13.phx.gbl...
> -- 'password' was found in the text of this event.
> -- The text has been replaced with this comment for security reasons.
> Where can I find more info on this? Particularly, how to turn it off on
> our development machines.
> --
> Jonathan Allen
>
>|||Does MS at least have a KB article explaining this "feature" and exactly
when it comes into play?
(Seems rather dubious to me, as you have to be an administrator to run the
profiler anyways.)
Jonathan Allen
"Roji. P. Thomas" <thomasroji@.gmail.com> wrote in message
news:ejz9X4UpFHA.2504@.tk2msftngp13.phx.gbl...
> AFAIK, Its a security feature added in SP4 and its not configurable, ie,
> you cannot turn it off.
>
> --
> Roji. P. Thomas
> Net Asset Management
> http://toponewithties.blogspot.com
>
> "Jonathan Allen" <x@.x.x> wrote in message
> news:ON5rgxTpFHA.1044@.tk2msftngp13.phx.gbl...
>|||>
> (Seems rather dubious to me, as you have to be an administrator to run the
> profiler anyways.)
But it does stop people seeing the password when they copy a trace file and
load into profiler on a machine where they do have admin rights.
John|||If they have access to the trace file, then I have a lot more worries than
just the user passwords. And what of my DBA calls the column passphrase
instead of password? If they gave us a editable list of words to block, then
I could see value in this. As it stands, I'm losing my ability to debug code
and all I'm getting is a false sense of security.
No wait, I'm also losing my ability to audit my servers. All a hacker has to
do is add /*password*/ to every command and I have no way to know what he is
doing.
Jonathan Allen
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:%23FhnogcpFHA.2904@.tk2msftngp13.phx.gbl...
> But it does stop people seeing the password when they copy a trace file
> and load into profiler on a machine where they do have admin rights.
> John
>|||As you can never be 100% sure that you will never be hacked or abused by
someone with ligitimate access it is still the safest option.
John
"Jonathan Allen" <x@.x.x> wrote in message
news:esprGogpFHA.3656@.TK2MSFTNGP09.phx.gbl...
> If they have access to the trace file, then I have a lot more worries than
> just the user passwords. And what of my DBA calls the column passphrase
> instead of password? If they gave us a editable list of words to block,
> then I could see value in this. As it stands, I'm losing my ability to
> debug code and all I'm getting is a false sense of security.
> No wait, I'm also losing my ability to audit my servers. All a hacker has
> to do is add /*password*/ to every command and I have no way to know what
> he is doing.
> --
> Jonathan Allen
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:%23FhnogcpFHA.2904@.tk2msftngp13.phx.gbl...
>|||"Jonathan Allen" <x@.x.x> wrote in message
news:esprGogpFHA.3656@.TK2MSFTNGP09.phx.gbl...
<snip> No wait, I'm also losing my ability to audit my servers. All a hacker
has to
> do is add /*password*/ to every command and I have no way to know what he
> is doing.
</snip>
I'd be more worried that your SQL Server is accessable at all from foreign
networks. I'd suggest that you tighten up the security of the server for
peace of mind. First add a firewall to the server itself, and only open
the ports that you're actually using. Make sure that the machine is places
so that it uses a private IP address i.e. 192.168.1.1 or something like
that. In an n-tier environment you can lock things up even better by
allowing only the next tier access to the machine, accomplished use of a
DMZ.
Of course, these are only a few ideas to think about I'm sure that the
experts on this newsgroup will be able to suggest about a billion more
security measures, and correct anything that I've said that is completely
wrong.
The point is that you need to lock up access to the production machine so
tight that no one can access it without express permission.
Regards
Colin Dawson
www.cjdawson.com|||I'm thinking about the "I think someone has gotten access and need to know
what is happening" situation. I trust our DBA and IT departments have
already made a reasonable attempt to lock-down the server.
Anyways, if anyone comes across MS's official reasoning behind this please
let me know.
Jonathan Allen
"Colin Dawson" <newsgroups@.cjdawson.com> wrote in message
news:D%XNe.93164$G8.33225@.text.news.blueyonder.co.uk...
> "Jonathan Allen" <x@.x.x> wrote in message
> news:esprGogpFHA.3656@.TK2MSFTNGP09.phx.gbl...
> <snip> No wait, I'm also losing my ability to audit my servers. All a
> hacker has to
> </snip>
> I'd be more worried that your SQL Server is accessable at all from foreign
> networks. I'd suggest that you tighten up the security of the server for
> peace of mind. First add a firewall to the server itself, and only open
> the ports that you're actually using. Make sure that the machine is
> places so that it uses a private IP address i.e. 192.168.1.1 or something
> like that. In an n-tier environment you can lock things up even better
> by allowing only the next tier access to the machine, accomplished use of
> a DMZ.
> Of course, these are only a few ideas to think about I'm sure that the
> experts on this newsgroup will be able to suggest about a billion more
> security measures, and correct anything that I've said that is completely
> wrong.
> The point is that you need to lock up access to the production machine so
> tight that no one can access it without express permission.
> Regards
> Colin Dawson
> www.cjdawson.com
>|||Hi,
I'm very interested in any answer about this myself. I am profiling an
application that uses the string 'password' a couple dozen times in schema
identifiers. This "feature" is annoying enough to make me miss helpful littl
e
Clippy.
This should be configurable. Though I understand that making it configurable
reduces the effectiveness as a security measure, I still feel that this goes
too far. Basically, I now have to spend significant time
researching/instrumenting code to capture the statements that are being hid
from me. Not happy about that.
Sorry to pile on and beat the dead horse, but this is hurting me right this
second, and I can't really roll back SPs on this server.
Thanks for reading,
Eric
"Jonathan Allen" wrote:

> I'm thinking about the "I think someone has gotten access and need to know
> what is happening" situation. I trust our DBA and IT departments have
> already made a reasonable attempt to lock-down the server.
>
> Anyways, if anyone comes across MS's official reasoning behind this please
> let me know.
> --
> Jonathan Allen
>
> "Colin Dawson" <newsgroups@.cjdawson.com> wrote in message
> news:D%XNe.93164$G8.33225@.text.news.blueyonder.co.uk...
>
>