Can I set up SQL Trace or Audit to connect to servers
I have a server (2003) with SQL (2005) on it.
If i install MS SQL Management Studio 2012 on my PC, can I audit what SQL on that server is doing by connecting to it from the PC ?
Or would it be better to set up SQL Trace on the server itself ?
Thanks
Pete
So if I install SSMS 2012 on my PC, I can connect to the databases on different servers from 1 place.
Yes, as long as there is network connection. In SSMS open up the Registered Servers window and register all servers:
http://technet.microsoft.com/en-us/library/ms188231.aspx
Related thread:
http://social.msdn.microsoft.com/forums/sqlserver/en-US/8209ad2c-6efd-49d6-9605-b7f348eb56bb/how-to-connect-sql-database-on-different-network
Setting up server-side tracing:
http://www.sqlusa.com/bestpractices/createtrace/
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012
Similar Messages
-
Can I set up a local network without being connected to internet?
Can I set up a local network with Airport without being connected to internet?
Yes. Your AirPort Express router, by default, will create an unsecured wireless network and does not need to be connected to the Internet to do so. Local clients can then connect to this wireless network and be able to "see" each other.
-
Can network setting cause sql*plus logon failure?
During install of verizon service the techs had to alter some network setting to allow the cable connection to work. Afterwards I was unable to connect to oracle database using pl*sql, getting instead an ORA 12514 error.
Is it possible the altered network settings caused this problem? I am running oracle 10g on XP windows.1. you're not using pl*sql to connect. you're using SQLPLUS to connect.
2. ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor
so, verizon changed something, perhaps the "windows\system32\drivers\etc\hosts" file, so that now your TNSNAMES.ORA has the wrong info. check tnsnames.ora, and see if it's using machine name, IP, or "localhost", then give the new, correct info. -
I can't set up yahoo mail, it says theres connection error occurring
When I try to hook up yahoo it gives me an error message about the connection error occuring. I could set up gmail though.
HI ...
Login to your Yahoo account on your computer to make sure the password is correct.
Does the password or Yahoo! ID have any special characters? Mobile devices can experience compatibility limits with passwords that contain special characters. If your password contains any special characters you can always log on to a computer and change your Yahoo password so to something that's more compatible.
Carolyn -
Can I set up to automatically login to a Connect meeting?
Hello. I'm hoping someone can help me out with this as I can't find any info about this anywhere?
We have our own LMS and want to deliver some meeting sessions in Connect. Is it possible to link from our LMS, where the user already has a profile username and password, to a Connect meeting with the same details? In other words, they bypass the login screen and go straight into the meeting session.
Many thanks,
AdamIs this an Adobe Connect cluster that you operate or are you using the Adobe-hosted SaaS version?
If you operate the cluster you can make use of the XML API's. They include exactly what you're looking for. -
Can't Set-up Shared Services and Registry DB Connection associated insthome
I'm getting the following error:
"The network Adapter could not establish the connection"
I'm trying to configure EPM 11.1.2. It's already install on my machine
This is the configtool.log:
[2010-09-28T16:53:18.890-04:00] [EPMCFG] [ERROR] [EPMCFG-01020] [oracle.EPMCFG] [tid: 20] [ecid: 0000IhQ7^OO7IBcbdh9Di51Cc_FU00000B,0] [SRC_CLASS: com.hyperion.config.wizard.impl.RegistryWizardState] Error: [[
java.sql.SQLException: The Network Adapter could not establish the connection
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:480)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:413)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
at com.hyperion.config.wizard.impl.RegistryWizardState.createConnection(RegistryWizardState.java:586)
at com.hyperion.config.wizard.impl.RegistryWizardState.access$800(RegistryWizardState.java:68)
at com.hyperion.config.wizard.impl.RegistryWizardState$1.validate(RegistryWizardState.java:350)
at com.hyperion.hit.wizard.Wizard$NextClass.run(Wizard.java:504)
at java.lang.Thread.run(Thread.java:619)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:328)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:421)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:634)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:208)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:966)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:292)
... 9 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:180)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:127)
at oracle.net.nt.ConnOption.connect(ConnOption.java:126)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:306)
... 14 more
Edited by: user10931567 on 28-Sep-2010 2:17 PMHi,
Start Oracle services -----OracleOraDb11g_home1TNSListener.....
Then start Hyperion EPM Configuration. -
How can I use SQL TOOLKIT concurrently with Database Connectivity ?
I have installed LabVIEW 6.1 with the Database Connectivity Toolkit and the SQL Compatibility Toolkit (e.g. _SQL folder). I am trying to make the transition from the SQL Toolkit VIs to the Database Connectivity toolkits, but for compatability with existing systems I would like to be able to run the two sets of VIs concurrently (but not in the same app).
When I read into 6.1 a connection VI that I wrote with LabVIEW 6.0 and the SQL toolkit the connection reference type gets changed from a number to type connection (see attachments) . Does compatbility mean that my SQL toolkit VIs are converted to a form compatible with the new ADO ?
Can I use the SQL Toolkit VIs or the Database connectivit
y VIs in the same installation of 6.1 ?
Can I have the SQL Toolkit VIs appear on the functions pallette and function as they did when only the SQL toolkit was installed ?
Attachments:
CNNCT.vi 20 KB
CNNCT.vi 22 KBIn response to your #2 below:
Actually it is possible to have the old SQL Toolkit and new Database
connectivity in the same installation of LabVIEW. I have only tried it on
6i, but don't see why it wouldn't work on 6.1. The trick is not to install
the SQL toolkit compatabitily VI's. The old SQL toolkit uses the Intersolve
dll through ODBC while the new Database connectivity uses ADO so it is
possible to use both methods not only in the same LabVIEW install, but it
the same running application. It has been a while since I originally did
this, so I am posting only to mention that it is possible and not exactly
how to do it. If anyone is interested in more details just respond.
Brian
"Jeff B" wrote in message
news:[email protected]...
> First, direct answers to your direct questions:
>
> 1. Does compatbility mean that my SQL toolkit VIs are converted to a
> form compatible with the new ADO ?
>
> Yes
>
> 2. Can I use the SQL Toolkit VIs or the Database connectivity VIs in
> the same installation of 6.1 ?
>
> No
>
> 3. Can I have the SQL Toolkit VIs appear on the functions pallette
> and function as they did when only the SQL toolkit was installed ?
>
> No
>
>
> Now an elaboration:
>
> Having the old SQL Toolkit and the new Database Connectivity Toolset
> installed on the same version of LabVIEW on the same computer is not
> supported.
>
> Once you install the Database Connectivity Toolset, any VIs written
> with the SQL Toolkit will run, but with the ADO layer, as you
> suspected.
>
> Internally, the only way we can have both the SQL Toolkit and the
> Database Connectivity Toolset installed on the same computer for
> troubleshooting customer issues is to have them installed on different
> versions of LabVIEW. I, for example, have LabVIEW 5.1.2, 6.0.3, and
> 6.1 all installed on my computer, and I have the SQL Toolkit install
> on LabVIEW 5.1.2, and the Database Connectivity Toolset installed on
> LabVIEW 6.0.3. In this configuration I can still run SQL Toolkit VIs
> independent of the Database Connectivity Toolset if I open and run
> them in LabVIEW 5.1.2. -
I'm not sure if this is possible but I'm looking to retrieve a running total of the number of rows processed by the OLAP option without polling the "longops" dynamic management view. As such, is it possible to set a SQL Trace running but rather than spooling the results to a file, return them over the JDBC connection for the client application to interpret? (I am naturally assuming here that it is possible to get this "running information" from a SQL trace for a given session ID. If not, the question is moot I guess...
I am using 11.1.0.7.0.
Thanks for any help.Hi
Whether if you use Sender or Receiver communication channel, SAP PI always open the connection to remote server. That is, SAP PI is always the component client, therefore the only thing you should to open is the MS SLQ port.
Regards
Ivá -
Hi all,
Can I run an SQL trace on a background job?and how?
I tried with ST05 it was not showing any tables through which it is moving?
Thanks in advance.
Regards,
RajaTry SE30
Give the user name and program name if you are aware.
Reward if helpful -
How to set SQL trace in OCI session ?
Hello,
In a SQL*Plus session, I can use the SQL statement "alter session set sql_trace=true;" to set SQL trace in that session only. I assume I could execute the same SQL statement from C code in an OCI client and achieve the same goal.
However, if I cannot change the code of this OCI client, is there a way to set SQL trace for that single session alone, without changing the C code? Say, through an environment variable, configuration file, etc.?
Thanks.I am not aware of a way to selectively enable the server-side tracing without modifying the client code.
There is client tracing available by setting the environment variable EVENT_10842 as follows:
"server=<>;user=<>;stmt=<>;level=<>;interval=<>"
e.g.
setenv EVENT_10842 "server=inst1,inst2;user=scott,system;stmt=all;level=15"
Where:
"server" is a comma separated list or "all"
"user" is a comma separated list or "all"
"stmt" can be INSERT,UPDATE,DELETE,SELECT or "all"
The following levels are supported:
1 - Trace all server attach and server detach calls for servers listed in "server" attribute of the environment variable.
2 - Trace all session begin, logon, session end, logoff calls for the users listed in "user" attribute of the environment variable.
3 - Trace all prepare, execute, fetch calls for the specified statement types listed in "stmt" attribute of environment variable.
4 - Trace all Bind, Define, Describe calls.
5 - Trace all OCI LOB calls
7 - Get statistical info on all connection pooling /connection related calls
8 - Get statistical info on all session info
9 - Get statistical info on all handle info
10 - Get statistical info on time taken in execute and fetch calls
11 - Get statistical info on transaction related calls
15 - Trace all calls with statistical info. -
Ability to perform ALTER SESSION SET SQL TRACE but not all alter clauses
I see that in order to run the ALTER SESSION SET SQL TRACE command, the user should be explicitly granted alter session privilege as the CREATE SESSION privilege alone is not enough. Is there a way to grant the ability to perform ALTER SESSION SET SQL TRACE but not the other clauses such as GUARD, PARALLEL & RESUMABLE?.
Thanks
SathyaIf you are using Oracle 10g and above, you can use DBMS_SESSION.session_trace_enable procedure,
it doesn't require alter session system privilege.
Simple example:
SQL> connect test/test@//192.168.1.2:1521/xe
Connected.
SQL> alter session set tracefile_identifier='my_id';
Session altered.
SQL> alter session set sql_trace = true
2 ;
alter session set sql_trace = true
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> execute dbms_session.session_trace_enable;
PL/SQL procedure successfully completed.
SQL> select * from user_sys_privs;
USERNAME PRIVILEGE ADM
TEST CREATE PROCEDURE NO
TEST CREATE TABLE NO
TEST CREATE SEQUENCE NO
TEST CREATE TRIGGER NO
TEST SELECT ANY DICTIONARY NO
TEST CREATE SYNONYM NO
TEST UNLIMITED TABLESPACE NO
7 rows selected.
SQL> execute dbms_session.session_trace_disable;
PL/SQL procedure successfully completed.
SQL> disconnect
Disconnected from Oracle Database 10g Release 10.2.0.1.0 - Productionand here is result from tkprof:
TKPROF: Release 10.2.0.1.0 - Production on So Paź 23 00:53:07 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Trace file: xe_ora_176_my_id.trc
( ---- cut ---- )
select *
from
user_sys_privs
call count cpu elapsed disk query current rows
Parse 1 0.08 0.08 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.01 0.01 0 15 0 7
total 4 0.09 0.09 0 15 0 7
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 61
Rows Row Source Operation
7 HASH GROUP BY (cr=15 pr=0 pw=0 time=11494 us)
7 CONCATENATION (cr=15 pr=0 pw=0 time=4913 us)
0 MERGE JOIN CARTESIAN (cr=4 pr=0 pw=0 time=1169 us)
0 NESTED LOOPS (cr=4 pr=0 pw=0 time=793 us)
0 TABLE ACCESS FULL SYSAUTH$ (cr=4 pr=0 pw=0 time=592 us)
0 INDEX RANGE SCAN I_SYSTEM_PRIVILEGE_MAP (cr=0 pr=0 pw=0 time=0 us)(object id 312)
0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
0 TABLE ACCESS FULL USER$ (cr=0 pr=0 pw=0 time=0 us)
7 NESTED LOOPS (cr=11 pr=0 pw=0 time=3429 us)
9 HASH JOIN (cr=9 pr=0 pw=0 time=2705 us)
9 TABLE ACCESS FULL SYSAUTH$ (cr=4 pr=0 pw=0 time=512 us)
63 TABLE ACCESS FULL USER$ (cr=5 pr=0 pw=0 time=914 us)
7 INDEX RANGE SCAN I_SYSTEM_PRIVILEGE_MAP (cr=2 pr=0 pw=0 time=510 us)(object id 312)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 20.64 20.65
BEGIN dbms_session.session_trace_disable; END;
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.01 0.00 0 0 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 61 -
SQL Trace to detect SET NOCOUNT OFF
I have inherited an application that has a 9000+ stored procedures. In a previous upgrade, the publisher added "SET NOCOUNT ON" to many of the procedures, but apparently not all. I am trying to determine which procedures don't have
this and may need to be fixed. Can SQL trace or profiling detect activity from a proc that is running with SET NOCOUNT OFF - ? Or is there another approach to detect this activity?
If this is not the correct forum, please kindly redirect me.
Thanks
tgoddardSo I don't think you could filter the SPs only having NOCOUNT OFF in profiler. Probably what you could do is a combination of the trace and the above query.
First you could use the trace to capture all the activities of the server, and parse all the stored procedure names them using a T-SQL (use the SP_STARTING OR SP_COMPLETED events and the ObjectName in the output columns while starting the trace)
You can later load the trace using the sql statement
SELECT
objectname
FROM fn_trace_gettable('D:\TrC1.trc', 10)
where OBJECTNAME is not null
Now use the above query to filter out the SPs that are having NOCOUNT OFF and join it with the trace output using the object name and you can get the SPs that are getting executed in the system and have NOCOUNT OFF.
Select OBJECT_ID, OBJECT_NAME(object_id) From sys.objects where type= 'P' and object_id not in (
Select object_id From sys.sql_modules where definition like '%SET NOCOUNT%')
Does this help you?
Satheesh
My Blog | How to ask questions in technical forum -
How can I set a variable number of values in a SQL IN clause?
Hi,
How can I set a variable number of values in a SQL IN clause without having to change the text of the SQL statement each time?
I read the link http://radio.weblogs.com/0118231/2003/06/18.html. as steve wrote.
SELECT *
FROM EMP
WHERE ENAME IN (?)
But we need the steps not to create type in the system and would there be any other solution if we would like to use variable number of values in a SQL IN clause ?
We are using JDeveloper 10.1.3.2 with Oracle Database 10.1.3.2
Thanks
RajHi,
can you please explain why the solution from steve is not the right solution for you.
regards
Peter -
OBIEE 10g - Can I use logical SQL to set variable?
I am trying to set value of a session variable in the Advanced tab Prefix box of a request.
Assigment of absolute value like this is working good:
SET VARIABLE MYVAR=1;
Can I set the variable using logical SQL? Something like:
SET VARIABLE MYVAR = (SELECT table1.col1 from catname where table1.col2=1)
Thanks in advance.Hi,
You can create a session variable or dynamic variable in the RPD and try using it in here at the Advanced Tab prefix.
But still check yourself if you need multiple values returning in the SQL statement.
Hope this is helpful/ useful.
Regards
MuRam -
Where can i set up connection in "exec sql"?
i have code block like this:
EXEC SQL.
SET CONNECTION :'PA'
ENDEXEC.
IF SY-SUBRC <> 0.
Connection not yet opened.
EXEC SQL.
CONNECT TO :'PA'
ENDEXEC.
IF SY-SUBRC <> 0.
write: / sy-msgid ,sy-msgno,sy-msgty,sy-msgv1,sy-msgv2,sy-msgv3,sy-msgv4.
write: / 'connect error'.
RAISE EXCEPTION TYPE cx_sy_native_sql_error.
ENDIF.
ENDIF.
where can i set up the 'PA'?thanks very much!!!!You set up new databse connection for SAP to communincate with using 'DBCO' tcode.
Maybe you are looking for
-
HT202157 My Apple TV blocked during software update. What should I do?
My Apple TV blocked during software update. What should I do?
-
How can I make Illustrator stills for Premiere Pro sequences?
So far, when I create Illustrator stills (in this case, consisting of type) and import them into a Premiere Pro sequence, only the type itself ends up on screen. It's almost as if I've selected just the type to be used and the rest of the canvas has
-
How to remove Gmail "sent message" label
Hi all, I am using Lion in one of my Mac and I found one problem I am using my Gmail account in Lion Mail When I use Lion Mail to send/reply a mail, Gmail on brower will show a "sent message" label on that mail. What should I do to prevent it? I mean
-
Exporting a Layered PSD and Overprint Fill
Hi guys. I'm trying to export a layered PSD of my AI file and I keep having problems with it merging the layers because of the overprint settings. I've been trying to go through and turn off the overprint in my objects, but I have a photo that's crop
-
Random crashes - my bug or NI's?
Hi, I have a LabView program that seems to crash every few hours, seemingly at random. By crash I mean that LabView does not respond to any user input - I have to do a Ctrl-Alt-Del to bring up the task manager (I'm using Win95) and kill LabView itsel