D
D
Dima Kim2016-08-17 11:42:36
CMS
Dima Kim, 2016-08-17 11:42:36

How to find out what a user is doing in MSSQLSERVER 2012?

Good afternoon, there is an application that connects to the MS SQL SERVER 2012 DBMS, the documentation says that it should be in the sysadmin server role.
Task: You need to find out what it does in the database by connecting under an account with the sysadmin privilege.
tell me how to make it happen?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry, 2016-05-10
@dimasmagadan

forgot to transfer the database.
all settings, everything that you set up, are not stored in files, but in the database.
look here or google, there are already answers on how to transfer a WordPress site to another hosting

E
Edward, 2016-08-17
@edb

Run profiler.
In general, the application does not need the sysadmin role, and if it does, then there are doubts about the developer's qualifications.

A
Aleksey Ratnikov, 2016-08-17
@mahoho

SQL Server audit to help you. It works like this - you set up which events for which user you want to track, and all this is added to a specially trained .sqlaudit file, from where you can then read these logs with
the sys.fn_get_audit_file function .
It is also worth remembering that another user from the sysadmin group can disable all this.
I recommend creating a separate instance for such an application (perform a new installation and select a named instance) in order to isolate the application database that requires maximum privileges from other databases.

D
Dima Kim, 2016-08-17
@jalpy

edb , I agree
Aleksey Ratnikov can tell you what grants the user should have in order to have access to the sys.fn_get_audit_file function?

some information: if you add a user to the public role, removing it from sysadmin, then the following error occurs:
There was an error when config audit on target test due to ??? ?????????? ?? ?????? "FN_TRACE_GETINFO". Query: select traceid from ::fn_trace_getinfo(0) where property=2 and CAST( value as nvarchar(245) ) like 'c:\1\name-trace-1fb00a09-1374-4fa0-bfa3-826879b9eced-%' Parameters: [].

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question