Accediendo a tablas a través de la base de datos en el mismo servidor

We have a huge application spread across multiple databases. At couple of places we need to update the data in a table in DB1 from a stored proc in DB2. As of now, we are accessing the table from DB1 via a view created in DB2. However, as the time passes by and data volume goes the performance starts to deteriorate and we are getting a lot of deadlocks on this procedure. we have got the right indexes being set on table in DB1. We are currently using SQL Server 2008 and physically both the database reside on the same server.

Any practical advise would be really appreciate !

preguntado el 08 de noviembre de 11 a las 15:11

1 Respuestas

Use a SYNONYM instead of a view.; not sure why the use of a view would be causing deadlocks, but in this case a SYNONYM provides a cleaner interface for abstraction.

respondido 08 nov., 11:23

would there be any performance difference between SYNONYM & a view ? syntactically & logically it looks pretty much the same in current context. - Vikram

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.