Export data from the Malwarebytes SQL database

Document created by vbariteau Employee on Oct 17, 2017Last modified by jyamada on Sep 10, 2018
Version 4Show Document
  • View in full screen mode

There is a command utility, bulk copy program (bcp) that is installed along with SQL Management Studio. It copies data out of an instance of SQL Server.

 

Refer to Microsoft document on bcp Utility for more information.

 

Here is a sample query to export the system and security logs out to a CSV file.  To name the output file, replace Test with a different file name.

 

Embedded

bcp "SELECT * FROM SCDB.dbo.TBL_ClientSecurityLog" queryout C:\Test.csv -c -t, -T -S .\SQLEXPRESS

bcp "SELECT * FROM SCDB.dbo.TBL_ClientSystemLog" queryout C:\Test.csv -c -t, -T -S .\SQLEXPRESS

 

External

bcp "SELECT * FROM SCDB.dbo.TBL_ClientSecurityLog" queryout C:\Test.csv -c -t, -T -S FQDN\INSTANCE                                                                                                                                                                                

bcp "SELECT * FROM SCDB.dbo.TBL_ClientSystemLog" queryout C:\Test.csv -c -t, -T -S FQDN\INSTANCE

Attachments

    Outcomes