Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
0

Can ms sql MDF file's contain virus's?

Enthusiast ,
May 08, 2009 May 08, 2009

HI,

can  ms sql MDF file's contain virus's?

If so how can you check/clean before putting it on your server?

TOPICS
Database access
5.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 18, 2010 Apr 18, 2010

nikos101 wrote:

can  ms sql MDF file's contain virus's?

Yes.

If so how can you check/clean before putting it on your server?

Install any antivirus software. For example, ClamWin is free, and there is a free version of AVG. Download the latest antivirus definitions for the software.

Scan the MDF files. Viruses usually corrupt the MDF file. So, I wouldn't attempt to restore an infected file to the server, even after it has been cleaned. There are tools available to check the integrity of MDF files, and

...
Translate
Valorous Hero ,
May 08, 2009 May 08, 2009

Do you perchance mean "MS ACCESS MDF Files"?  As far as I am aware, MS SQL does not use "MDF" files.

Anyway as to viruses, Microsoft Access supports Visual Basic modules and viruses can be written in Visual Basic, so I presume Yes, a MDF file can contain a virus.

How you clean it.... Don't use MS Access for something it is not designed for, even Microsoft recommends not to use Access for Internet applications.

Other then that, I can only suggest asking your question on a Access support channel will probably provide better answers.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 08, 2009 May 08, 2009

An .mdf file is what SQL Server uses to store the primary date file. .ldf is the transaction log file. Personally I've never heard of a virus being in an .mdf file but running a virus scanner on them couldn't hurt.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 12, 2009 May 12, 2009

Cheers people, I'm on SQL server.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 18, 2010 Apr 18, 2010

In theory one could store a virus-laden file in your DB, in which case it'd end up in your MDF file.  However this would not been the MDF becomes "contagious", because it's not an executable file.  One would need to read the file from the DB, write it to disk (at which point your machine's virus scanner should pick it up anyhow), and then you'd need to execute it.

I'd say the risk of this is very very low.  However virus-scanning the MDF file is an easy and nil-effort thing to do, so why not simply scan the file and make sure?

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 18, 2010 Apr 18, 2010

nikos101 wrote:

can  ms sql MDF file's contain virus's?

Yes.

If so how can you check/clean before putting it on your server?

Install any antivirus software. For example, ClamWin is free, and there is a free version of AVG. Download the latest antivirus definitions for the software.

Scan the MDF files. Viruses usually corrupt the MDF file. So, I wouldn't attempt to restore an infected file to the server, even after it has been cleaned. There are tools available to check the integrity of MDF files, and even to repair them. Search the web.

There are two things you shouldn't do. Neither do a virus scan on an MDF file of a currently running MS SQL instance, nor configure the auto-protect function of your antivirus program to include MS SQL's MDF files.  This is because the antivirus program and MS SQL might contend for the lock on these files. For more on this, see Microsoft's "Guidelines for choosing antivirus software to run on the computers that are running SQL Server"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 12, 2010 May 12, 2010

MDF files as such cannot contain virus. But data which is stored in the tables can contain virus in the form of encrypted javascript or iframe both referencing download of malware on the clients pc accessing the data. It is the result of SQL Injection attacks. Apart from that mdf file cannot contain virus.

Regards

Robert Sharon


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 12, 2010 May 12, 2010
LATEST
MDF files as such cannot contain virus.

Any binary can contain a virus.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources