Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 SQL Server

Author  Topic 

Dev@nlkss

134 Posts

Posted - 2009-01-30 : 00:12:11
Hi all,
how to make a view as read only in SQL Server as we have an option 'with read only' in Oracle. or any other ways to do it.
thankQ.

Satya

oldmanben
Starting Member

3 Posts

Posted - 2009-01-31 : 13:03:51
The best way (that will lock out updates/deletes/inserts) is an instead of trigger on the underlying table.
Go to Top of Page

Dev@nlkss

134 Posts

Posted - 2009-02-01 : 22:39:52
Thanks for given information.
Does instead of trigger degrades any performance.
Is there any other way.


Satya
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-01 : 23:25:42
yup..use of instead of trigger will have a sure impact on performance.
Go to Top of Page

Dev@nlkss

134 Posts

Posted - 2009-02-02 : 00:46:36
Thanks visakh,
any other way

Satya
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-02-02 : 01:03:45
We use an instead of trigger on one table and do not have any performance issues.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

oldmanben
Starting Member

3 Posts

Posted - 2009-02-02 : 11:40:57
Triggers can and will have impact on performance but like everything else it is dependent on what the trigger is being used for. If it is being used to audit inserts and updates (and validate them) then it can really slow things down. A trigger that immediately prevents something should have minimal, if any, impact on performance.

There are some people who don't want to learn how to use triggers so they dismiss its use by claiming that it 'impacts performance.'

Old Man Ben
Go to Top of Page
   

- Advertisement -