G
Greg Robinson
Sql Server connection string, Persist Security Info = True\False
Per the docs I find:
"When set to false or no (strongly recommended), security-sensitive
information, such as the password, is not returned as part of the
connection if the connection is open or has ever been in an open
state. Resetting the connection string resets all connection string
values including the password. Recognized values are true, false, yes,
and no."
I have always used False.
This has worked for all of our clients using Sql Server 7.0.
We did 2 installs this week where the clients are using Sql Server 2000.
Calls to select sprocs worked, all calls to insert, update or delete sprocs
failed with a Log In failed for user exception.
We pass the id and password with our connection string.
Our DAL code opens the connection, calls BeginTransaction and then calls the
update sproc. The call to the update sproc, when Persist Security
Info=False fails (Login In fails), though when it's true, it succeeds. So
it sounds like, even the the connection is already open, something about
executing the sproc tries to open the connection again, there is no
password, so it fails? This makes no sense to me as the id and password are
included in our connection, the connection that is already open.
Anybody know what all this means?
If I open a connection, call a SELECT sproc, it works. If I open the same
exact connection (it may still even be in the pool as it is within 1-2
seconds), call an UPDATE sproc with Persist Security Info set to False in
that connection string, I get a long in failed for user exception fro sql
server. If I change this value to True in the connection string, all sprocs
work. So far I have seen a seting of False work for updates on a 7.0 Sql
Server and not work on a 2000 Sql Server.
Per the docs I find:
"When set to false or no (strongly recommended), security-sensitive
information, such as the password, is not returned as part of the
connection if the connection is open or has ever been in an open
state. Resetting the connection string resets all connection string
values including the password. Recognized values are true, false, yes,
and no."
I have always used False.
This has worked for all of our clients using Sql Server 7.0.
We did 2 installs this week where the clients are using Sql Server 2000.
Calls to select sprocs worked, all calls to insert, update or delete sprocs
failed with a Log In failed for user exception.
We pass the id and password with our connection string.
Our DAL code opens the connection, calls BeginTransaction and then calls the
update sproc. The call to the update sproc, when Persist Security
Info=False fails (Login In fails), though when it's true, it succeeds. So
it sounds like, even the the connection is already open, something about
executing the sproc tries to open the connection again, there is no
password, so it fails? This makes no sense to me as the id and password are
included in our connection, the connection that is already open.
Anybody know what all this means?
If I open a connection, call a SELECT sproc, it works. If I open the same
exact connection (it may still even be in the pool as it is within 1-2
seconds), call an UPDATE sproc with Persist Security Info set to False in
that connection string, I get a long in failed for user exception fro sql
server. If I change this value to True in the connection string, all sprocs
work. So far I have seen a seting of False work for updates on a 7.0 Sql
Server and not work on a 2000 Sql Server.