This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Accept
Reject

NetWitness Community

  • Home
  • Products
    • NetWitness Platform
      • Advisories
      • Documentation
        • Platform Documentation
        • Known Issues
        • Security Fixes
        • Hardware Documentation
        • Threat Content
        • Unified Data Model
        • Videos
      • Downloads
      • Integrations
      • Knowledge Base
    • NetWitness Cloud SIEM
      • Advisories
      • Documentation
      • Knowledge Base
    • NetWitness Detect AI
      • Advisories
      • Documentation
      • Knowledge Base
    • NetWitness Investigator
    • NetWitness Orchestrator
      • Advisories
      • Documentation
      • Knowledge Base
      • Legacy NetWitness Orchestrator
        • Advisories
        • Documentation
  • Community
    • Blog
    • Discussions
    • Events
    • Idea Exchange
  • Support
    • Case Portal
      • Create New Case
      • View My Cases
      • View My Team's Cases
    • Community Support
      • Getting Started
      • News & Announcements
      • Community Support Forum
      • Community Support Articles
    • Product Life Cycle
    • Support Information
    • General Security Advisories
  • Training
    • Blog
    • Certification Program
    • Course Catalog
    • New Product Readiness
    • On-Demand Subscriptions
    • Student Resources
    • Upcoming Events
  • Technology Partners
  • Trust Center
Sign InRegister Now
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Search instead for 
Did you mean: 
NetWitness Discussions
Announcement Banner

Users are unable to open Netwitness Support Cases via email. Please open support cases via portal or by phone

View Details
  • NetWitness Community
  • Discussions
  • MS SQL MyTraceFiles are not getting deleted
  • Options
    • Subscribe to RSS Feed
    • Mark Topic as New
    • Mark Topic as Read
    • Float this Topic for Current User
    • Bookmark
    • Subscribe
    • Mute
    • Printer Friendly Page

MS SQL MyTraceFiles are not getting deleted

DeepanshuSood1
DeepanshuSood1 Beginner
Beginner
Options
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

‎2016-03-03 02:06 AM

We are facing the issue related to the trace files created by MS SQL 2005 & 2000, as the trace files created are not going into the proper folder C:\MyTraceFiles and are getting stored in C:\.Also the issues is the stored files are not getting auto deleted which is creating the space issue.

  • Community Thread
  • Discussion
  • Forum Thread
  • NetWitness
  • NW
  • NWP
  • RSA NetWitness
  • RSA NetWitness Platform
0 Likes
Share
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
5 REPLIES 5

EnriqueCastill1
EnriqueCastill1 Beginner
Beginner
Options
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

‎2016-05-18 04:06 AM

Buen día.

Podrías proporcionarme tu procedimiento completo al aplicar la auditoria sobre tu SQL server.

Escríbeme a enriquecb99@gmail.com.

Saludos

0 Likes
Share
Reply

DavidWaugh1
Employee DavidWaugh1
Employee
Options
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

‎2016-05-19 04:58 AM

SQL Trace files get deleted when they are collected.

Are there any errors on the log collector regarding odbc collection to this source?

0 Likes
Share
Reply

EnriqueCastill1
EnriqueCastill1 Beginner
Beginner
In response to DavidWaugh1
Options
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

‎2016-05-19 06:20 AM

El problema lo tienen al momento de realizar el mapeo, ya que no importa donde generemos nuestro Tracefile.

Lo importante es darle una ruta para que la puedamos extraer por medio de algún método de recolección

Esta es la solución 

 

USE master

GO

CREATE CERTIFICATE SQLCLRTestCert

FROM EXECUTABLE FILE ='C:\MyDBApp\RSA_MSSQLAuditStoredProcedures.dll'

CREATE LOGIN SQLCLRTestLogin FROM CERTIFICATE SQLCLRTestCert GRANT EXTERNAL ACCESS ASSEMBLY TO SQLCLRTestLogin

GO

En tu DNS le ingresas la ruta de extracción

pastedImage_1.png

0 Likes
Share
Reply

DavidWaugh1
Employee DavidWaugh1
Employee
Options
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

‎2016-05-19 06:29 AM

Note if you are patching your SQL Server then perform the following steps:

 

 

--- First Shutdown Trace

--- We keep any existing trace files.

IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[nic_aud_init_trace]') AND type in (N'P', N'PC'))

exec nic_aud_init_trace 0

GO

 

IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[rsa_delete_trace_files]') AND type in (N'P', N'PC'))

drop procedure rsa_delete_trace_files

GO

 

IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[rsa_file_exists]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))

drop function rsa_file_exists

GO

 

 

IF EXISTS (SELECT * FROM sys.assemblies WHERE name = 'RSA_MSSQLAuditStoredProcedures')

drop assembly RSA_MSSQLAuditStoredProcedures

GO

----- END SCRIPT

 

------

 

PATCH AND

RESTART SQL SERVER SERVICE

 

 

-----

SCRIPT TO RESTART TRACING

--We recreate the assemby

 

CREATE ASSEMBLY RSA_MSSQLAuditStoredProcedures

FROM 'C:\MyDBApp\RSA_MSSQLAuditStoredProcedures.dll'

WITH PERMISSION_SET = EXTERNAL_ACCESS;

GO

 

---------------------------------------------

-- CLR Endpoint Function

-- to check if a file existProcedure

-- to delete trace files

---------------------------------------------

create function rsa_file_exists

(

@filepath nvarchar(255)

)

returns int

as external name RSA_MSSQLAuditStoredProcedures.[RSA_MSSQLAuditStoredProcedures.RSA_MSSQLAuditStoredProcedures].rsa_file_exists;

go

 

---------------------------------------------

-- CLR Endpoint Procedure

-- to delete trace files

---------------------------------------------

create procedure rsa_delete_trace_files

(

@filepath nvarchar(255)

)

as external name RSA_MSSQLAuditStoredProcedures.[RSA_MSSQLAuditStoredProcedures.RSA_MSSQLAuditStoredProcedures].rsa_delete_trace_files;

go

 

IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[nic_aud_init_trace]') AND type in (N'P', N'PC'))

exec nic_aud_init_trace 0

GO

 

 

 

---END SCRIPT

 

During the period that the SQL Server is being patched you will see the following messages in the /var/log/messages of the log collector ( Taken from my test system)

 

Apr 19 13:30:46 REMOTELOGCOL NwLogCollector[25428]: [OdbcCollection] [failure] [mssql.ECAT_MSSQL] [processing] [ECAT_MSSQL] [processing] Publish error: Error calling SQLMoreResults: Statement: "exec nic_aud_swap_trace 30, 'c:\MyTraceFiles\', 1, 'WHERE StartTime > 2016-04-19 14:22:09.623'"; Reason: state: S1000; error-code: 139814070390809; description: [RSA][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Cannot find either column "dbo" or the user-defined function or aggregate "dbo.rsa_file_exists", or the name is ambiguous.state: S1000; error-code: 139814070390809; description: [RSA][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Cannot find either column "dbo" or the user-defined function or aggregate "dbo.rsa_file_exists", or the name is ambiguous.state: S1008; error-code: 139814070390309; description: [RSA][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]The statement has been terminated.state: 23000; error-code: 139814070389315; description: [RSA][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Violation of PRIMARY KEY constraint 'PK__nic_aud___9A5818ED427D50A8'. Cannot insert duplicate key in object 'dbo.nic_aud_trace'. The duplicate key value is (c:\MyTraceFiles\).state: S1000; error-code: 139814070390809; description: [RSA][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Cannot find either column "dbo" or the user-defined function or aggregate "dbo.rsa_file_exists", or the name is ambiguous.

1 Like
Share
Reply

EnriqueCastill1
EnriqueCastill1 Beginner
Beginner
In response to DavidWaugh1
Options
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

‎2016-05-19 06:40 AM

El error exec nic_aud_swap_trace 30, y s.state: S1008 fue corregido habilitando el firewall y ejecutando en una consola  de MS-DOS como administrador las siguientes lineas de comando, posteriormente se dio de baja el firewall.

 

set winrm/config/service @ {AllowUnencrypted="true"}

winrm e winrm/config/listener

winrm quickconfig

winrm set winrm/config/service @{AllowUnencrypted="true"}

 

Saludos

0 Likes
Share
Reply
Powered by Khoros
  • Blog
  • Events
  • Discussions
  • Idea Exchange
  • Knowledge Base
  • Case Portal
  • Community Support
  • Product Life Cycle
  • Support Information
  • About the Community
  • Terms & Conditions
  • Privacy Statement
  • Acceptable Use Policy
  • Employee Login
© 2022 RSA Security LLC or its affiliates. All rights reserved.