Showing posts with label across. Show all posts
Showing posts with label across. Show all posts

Wednesday, March 28, 2012

How to enforce integrity across databases

I would like to enforce integrity across two databases on the same server. A
s
far as I know there is no way to create a FK constraint pointing to another
database. So my options are either a trigger (which I would like avoid) or a
check constraint.
Does anyone have any expericence/recommendations they can share on how to
implement this?Using triggers.
AMB
"DBA72" wrote:

> I would like to enforce integrity across two databases on the same server.
As
> far as I know there is no way to create a FK constraint pointing to anothe
r
> database. So my options are either a trigger (which I would like avoid) or
a
> check constraint.
> Does anyone have any expericence/recommendations they can share on how to
> implement this?|||"DBA72" <DBA72@.discussions.microsoft.com> wrote in message
news:27E1F221-1355-447A-B052-542680E9DD5F@.microsoft.com...
> I would like to enforce integrity across two databases on the same server.
As
> far as I know there is no way to create a FK constraint pointing to
another
> database. So my options are either a trigger (which I would like avoid) or
a
> check constraint.
> Does anyone have any expericence/recommendations they can share on how to
> implement this?
IIRC, CHECK constraints cannot reference outside their table, so you are
left with triggers, or data validation at the stored proc level.
I would suggest triggers in this case.
Rick Sawtell

Monday, March 26, 2012

how to encrypt db files

Came across the following on best practises as well
" Use the SQL Server service account to encrypt database files with EFS."
How do you set it up ?Just because it is on someone's best practices list, doesn't mean it should
just be grabbed and executed. When you encrypt the files on the OS, you
incur a performance hit everytime they need to be accessed to do the
decrypt/encrypt. Since a database server never quits reading or writing to
the files, this can be a rather heavy load on the machine and cause
significant degradation in performance.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Hassan" <Hassan@.hotmail.com> wrote in message
news:exfOsOKIGHA.1424@.TK2MSFTNGP12.phx.gbl...
> Came across the following on best practises as well
> " Use the SQL Server service account to encrypt database files with EFS."
> How do you set it up ?
>|||>decrypt/encrypt. Since a database server never quits reading or writing to
Actually SQL2005 seems to close the file if no active query is running...
-- AntiSpam/harvest --
Remove X's to send email to me.|||The server is supposed to hold the individual database files open and in
a ready state regardless of user activity. Are you sure you don't have
the autoclose property turned on for the database you are looking at?
That is:
select databaseproperty('<dbname>', 'IsAutoClose')
*mike hodgson*
http://sqlnerd.blogspot.com
Josh Assing wrote:

>Actually SQL2005 seems to close the file if no active query is running...
>
>-- AntiSpam/harvest --
>Remove X's to send email to me.
>|||Hi Hassan,
Encrypting your data files can be a prudent measure (MSDE instance on a
field salesperson's laptop with customer data, for example). I
wouldn't necessarily recommend it on the server side.
Here is a nice how-to on encrypting your files using EFS...
http://www.sqlservercentral.com/col...menting_efs.asp