sql server - set trustworthy on - is it a bad practice? if so any alternatives? -
I have a group of users "readers" who are the only debaters on "Myadabs". I have a stored procedure. 1: 2 - Update data within "mydatabase",
2 - Reduce the tables within the database "mydatabase" - and this is done by dynamics Using SQL because we do not know the names of tables which have to be shortened
3 - Update in the tables in "mydatabse2" Cord
4 - Enter the record inside tables in "Mydatabse3"
The way I have solved this problem is:
1 - I changed the DB owner of all these 3 databases
2 - I changed the stored procedure "sep" to execute as oven
3 - I have all these 3 databases I am setting it as trustworthy.
All is well.
My concern is, and therefore the question is here:
Is there any serious security difference which is open using on trustworth?
I could not find anything serious, so I'm leaving it.
As long as no one can remind me of something, I can not remember.
This TRUSTWORTHY
option, when set to a specific database , Then allows code from that database to be accessed outside of external objects (such as other databases, for example).
Only one place where you have any code that needs external access mydatabase
, you can safely close this option for the remaining two options. .
The option is not particularly dangerous; After all, before it first appeared in SQL Server 2005, everything went straight, as long as you have enough permissions. And from that age I can not remember any special light on the subject in question. Just make sure that you keep the volume of db_owner
members very low, which is usually enough.
Comments
Post a Comment