Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

database change detect

 
   Database Help (Home) -> MSDE RSS
Next:  Restore backup set  
Author Message
Alli Dem

External


Since: Jun 26, 2008
Posts: 1



(Msg. 1) Posted: Thu Jun 26, 2008 1:00 pm
Post subject: database change detect
Archived from groups: microsoft>public>sqlserver>msde (more info?)

Hi,

is there any way to detect if user stops sql, changes mdf and ldf file with
a modified one and starts again.

Thanks

 >> Stay informed about: database change detect 
Back to top
Login to vote
Andrea Montanari

External


Since: Sep 13, 2003
Posts: 498



(Msg. 2) Posted: Thu Jun 26, 2008 4:17 pm
Post subject: Re: database change detect [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

hi,
Alli Dem wrote:
> Hi,
>
> is there any way to detect if user stops sql, changes mdf and ldf
> file with a modified one and starts again.

actually not... modifications (both in the metadata and in the data as well)
is a "natural" state of life for data and databases...
and the "case" of your scenario is even wors as SQL Server is not involved
at all, shutting down the service ad overwriting the database's files is
performed at NTFS level (so adeguate permissions in this area is required)
but, again, SQL Server is not involved.. it is later involved when
restarting the service and starting the replaced database.. if something
goes wrong in the NTFS operation, SQL Server could mark the database as
suspect, but this is another story..
on the other hand, SQL Server 2005 introduces DDL triggers,
http://msdn.microsoft.com/en-us/library/ms175941.aspx, but, again, the NTFS
operation is out of control here as well..
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://www.hotelsole.com
DbaMgr2k ver 0.21.1 - DbaMgr ver 0.65.1 and further SQL Tools
--------- remove DMO to reply

 >> Stay informed about: database change detect 
Back to top
Login to vote
Todd C

External


Since: Jan 31, 2007
Posts: 106



(Msg. 3) Posted: Wed Jul 23, 2008 12:26 pm
Post subject: Re: database change detect [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Andrea is right. SQL Server connot detect a replaced file on its own any more
than a truck driver can detect that someone empited his trailer and refilled
it with something else while he was in the diner eating a cheeseburger!

The best way to protect against this scenario is to put the database files
in a location that is not readily available to the general user, but IS
available to the account that runs SQL.

HTH
--
Todd C

"Andrea Montanari" wrote:

> hi,
> Alli Dem wrote:
> > Hi,
> >
> > is there any way to detect if user stops sql, changes mdf and ldf
> > file with a modified one and starts again.
>
> actually not... modifications (both in the metadata and in the data as well)
> is a "natural" state of life for data and databases...
> and the "case" of your scenario is even wors as SQL Server is not involved
> at all, shutting down the service ad overwriting the database's files is
> performed at NTFS level (so adeguate permissions in this area is required)
> but, again, SQL Server is not involved.. it is later involved when
> restarting the service and starting the replaced database.. if something
> goes wrong in the NTFS operation, SQL Server could mark the database as
> suspect, but this is another story..
> on the other hand, SQL Server 2005 introduces DDL triggers,
> http://msdn.microsoft.com/en-us/library/ms175941.aspx, but, again, the NTFS
> operation is out of control here as well..
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz http://www.hotelsole.com
> DbaMgr2k ver 0.21.1 - DbaMgr ver 0.65.1 and further SQL Tools
> --------- remove DMO to reply
>
>
>
 >> Stay informed about: database change detect 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
change server name - how can I change the server name?

Can you change the INSTANCE name in MSDE? - How can I create an INSTANCE name for an existing install of MSDE? is this the ONLY way (No gui for this)? setup INSTANCENAME="InstanceName" SECURITYMODE=SQL SAPWD="AStrongSAPwd"

how to purge database - I am not so familiar with sql server. I would like to know how to purge database? How to truncate database. Do we need to do some database maintenance if the databse grows to 33gb? thanks!

SQL Database working on Laptop Using MSDE - I have a SQL Backend on our Server, I have loaded MSDE on laptop running XP Pro. I want a copy of the SQL Backend on the Laptop so I can work off line. I am using Access ADP for frontend. How do I get the database on my laptop? Thanks Tom

MSDE SQL Database Marked SUSPECT - Hello all! I have an instance of MSDE that is marked as SUSPECT. In the error log I get: I/O error on backup or restore restart-checkpoint file 'C:\Program Files\Microsoft SQL Server\MSSQL$SBSMONITORING\backup\model4IDR.ckp'. Operating system error...
   Database Help (Home) -> MSDE All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]