Prevent/block some SQL from executing in Database
Hi Everybody,
we are working on oracle 10g release 1 on Linux.
we are in the process of identifying some badly written queries.
we identified such queries from trace. we want to trace back from where it is coming.
since there are multi tiers in the system, we are not able to map the queries to application user and there is only one Database user and we are searching in the darkness.
We want to prevent these queries from execution. so that somebody will get back.
Any suggestions/ideas ?
Thank you.
as indicated by LC, i can find out the query again getting fired and can have a job to kill
the session. I don't think this will work. In a n-tier environment you're probably using connection pooling, so the same session is probably used by any number of real users. Killing the session isn't go to stop the app server handing out a new connection to whoever is running these queries.
You are looking for a technical solution to deal with what is really a political issue. You need to start talking to your users or possible the developers, depending on whether the offending SQL is an app query or a freestyle SQL*Plus type thing. If you have only a few "bad" queries then it ought to be possible to at least guess where the source is and arrange a quiet chat.
Alternatively, just live with it until such a point as performance gets really bad. Then throw a hissy fit, take the database down and refuse to bring it back up until you get the head(s) of the offender(s) on a silver platter or the application developers put proper authentication in place. Whichever is easier.
This is a serious problem, not from a performance point of view but from a legal perspective. I don't what your business is, or the exact situation in Brazil, but increasingly audit and compliance issues are rising up the IT agenda. People can be abusing your database in any number of ways for any sort of nefarious purpose and you have no idea who is doing what. That's bad.
Cheers, APC
Similar Messages
-
I blocked some images from myspace by mistake. How can I unblock them?
I play a my space app called Hotties For Sale. I inadvertently blocked some images from the app. This includes operating buttons and some photos. The only info I can find is "Block images from x.myspacecdn.co... How do I get these images back? Can you help please?
With myspace on display, click on the site identity button (for details on what that is see the [[site identity button]] article) and then on More Information. This will open up the page info dialog.
First select the Permissions panel, make sure that "Load Images" is set to allow (selecting Use Default should also work)
Next select the Media panel, then click on the first item in the list. Use the down arrow key to scroll through the list. If any item has the option "Block images from (domain name)" selected, de-select the option.
This should hopefully resolve your issue, but also see [[Images or animations do not show]].
Some add-ons can also block images, for example if you have AdBlock Plus installed, make sure that you have not accidentally created a filter to block the images. -
Look for histroy of sql statement executed in database
is there a way to look for histroy or list of sql statement executed in database.?
similar to history command in linux or bash shell.The newer <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2131.htm">v$sqlstats</a> (10g) is recommended over v$sql as (according to the documentation) it's "faster, more scalable, and has a greater data retention (the statistics may still appear in this view, even after the cursor has been aged out of the shared pool)", although it's missing a couple of the columns v$sql has.
The history version (if you are licenced for AWR, which is part of the extra-cost Diagnostics Pack - you may not be licenced to use it even if the dictionary views are installed) is DBA_HIST_SQLSTAT. -
I want to block some iMessages from appearing in my iPad
I have my Macbook, my iPad and my iPhone set up to sync iMessages between them. I love that. However, there are some people whose iMessages I do not wish to have come into my iPad.
I use my iPad at bedtime for reading and surfing. I do not need to receive text messages from everyone when I am in bed. However, my teen/adult children should still be able to text me if they need me. There are many texts that can wait until morning, but my kids will always be able to have access to their parents anytime of day or night. (I go to bed reeeeeallly early as I get up and run in the early morning).
Do not Disturb is not working for this. I've already tried that.
If I block someone, it is my understanding that they will be blocked across all my devices.
What can I do?Crisvett wrote:
I bought some apps through my iPad but i want to have some of them Also in my iPhone, how can i get it?
Some apps are iPad only, did you check?
While at it, check also the apps version as well as what devices are supported. -
Baris Derin blocks some pages from opening,
I don't know what Baris Derin is. I don't want it. I just want google. It insist in wanting me to install. I don't want to do it. Sometimes when I go to a site and it then wants me to download or something like that: Baris Derin comes up and blocks me. It doesn't give me a choice of "do you want to download?" or "No thanks." What gives!!!!
I can not print my boarding pass because of this annoying thing. So I gave in: I tried to download. Well I can't get it to work. HELPPP. Oh, yes. I'm a mac.Whenever I click on a link, I always get a message saying "Firefox prevented this page from redirecting to another page"
I then have to click on the 'Allow' button, and it goes to the page I wanted. This is extremely annoying. I can't find a setting in Firefox that will fix it. I never had this problem with previous versions of Firefox, nor do I get that message when using Internet Explorer, so it's not a firewall issue. -
Blocking some fields from entering in summary block in enter query mode
Hi ,
I have a data block where in some fileds have to be dynamically allowed to enter and some are not based on
a particular condition. The problem is whenever the forms enters enter query mode, all the fileds in the block are updateble. Even maually I tried to set/unset the property in forms using set_item_property, but the enter query mode was trying to overiride it and making updateble.
Please suggest a solution for this.
Thanks in advance.
Thanks,
LohithTry the below code
IF :SYSTEM.MODE='ENTER-QUERY' THEN
SET_BLOCK_PROPERTY('BLOCKNAME',INSERT_ALLOWED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY('BLOCKNAME',UPDATE_ALLOWED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY('BLOCKNAME',DELETE_ALLOWED,PROPERTY_TRUE);
you can set the item here too by using the below code
SET_ITEM_PROPERTY('BLOCK.ITEM_NAME',INSERT_ALLOWED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('BLOCK.ITEM_NAME',UPDATE_ALLOWED,PROPERTY_TRUE);Regards
Moazam
Edited by: Moazam Shareef on Oct 6, 2010 6:10 AM -
Prevent a region source from executing
I have a SQL Query region and I do not want the source code to run when I arrive on the page. (I want to ask for a parameter on the page and then run the source)
Message was edited by:
Bob BreuningYou set a condition for the region:
you can set the request when you branch to the page and set the condition to "request != Expression1". Then you change the request to Expression1, after the parameter is entered, in order to show the region. -
How to block some addons from autodownloading and self installing?
there is an add-ons that whenever I remove it, after a while it has been installed again, I think this addons works like a malware. the name of the add-ons is "GoHD". It causes opennig a new website while I'm in another Website. It's disturbing me a lot. please help!
''Sriram Sk [[#answer-694817|said]]''
<blockquote>
Click menu button and choose addon, In the add on manager tab select Extension and appearance panel, Then Select add on you wish to Disable, Click the remove button.
</blockquote>
thanks Sriram Sk but as I said before I have done that to solve the problem but it didn't solved.In fact whenever I remove or disable it and then restart the firefox, at next time that I open the browser it's been installed automatically by itself however I haven't installed it by myself -
I want to block some Urls from some local users....How can i do that ..... I should able to access these sites.
First you should update Firefox, as the old version you have is leaving you vulnerable to attack. [[Update Firefox to the latest version]]
If you want to control web access, try reading [[Block and unblock websites with parental controls]] -
SA 520 blocking some URLs and IM
I have an SA520 that is configured with 3 NAT rules in firewall. These rules allow a local server to be exposed for 3 specific services. Everything else is disabled. There is no content filtering for example.
The problem: None of our users are able to use Windows Live Messenger or access certain sites such as www.hotmail.com.
I suspect the device is blocking URLs that redirect. I see that hotmail.com is redirected to a mail.live.com.
Any ideas?
Thanks very much.I think you are trying to expose some services in the LAN to the outside world
If that is the case, instead of creating FW rules from "
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
INSECURE WAN -> SECURE LAN"
you should create FW rules from "
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
SECURE LAN ->INSECURE WAN"
Otherwise, you will block some traffic from the outside world to the LAN -
Crash while generating SQL from offline DB
Hi,
I just got the following exception from the JDeveloper 10.1.3.0.2.223 preview version while trying to generate SQL from an offline database.
Stack trace:
java.lang.ArrayIndexOutOfBoundsException: 1
at oracle.jdeveloper.offlinedb.handler.GenerateSQLHandler.copySchemaObjects(GenerateSQLHandler.java:424)
at oracle.jdeveloper.offlinedb.handler.GenerateSQLHandler.handleReconcileSQL(GenerateSQLHandler.java:245)
at oracle.jdeveloper.offlinedb.handler.GenerateSQLHandler.handleReconcileSQL(GenerateSQLHandler.java:217)
at oracle.jdeveloper.offlinedb.wizard.GenerateWizard.invokeGenerateWizard(GenerateWizard.java:176)
at oracle.jdeveloper.dbmodeler.diagram.registry.RDatabaseDiagramComponent$DDLReceiver.onCheckedCmdUIEvent(RDatabaseDiagramComponent.java:335)
at oracle.bm.diagrammer.cmdUI.CmdUIReceiver$Checked.onCmdUIEvent(CmdUIReceiver.java:97)
at oracle.bm.diagrammer.BaseDiagram$1.onCmdUIEvent(BaseDiagram.java:337)
at oracle.bm.addinUtil.IDEAppContext.handledElseWhere(IDEAppContext.java:1816)
at oracle.bm.addinUtil.IDEAppContext.onCmdUI(IDEAppContext.java:1744)
at oracle.bm.addinUtil.IDEAppContext.handleEvent(IDEAppContext.java:3863)
at oracle.ide.IdeAction.performAction(IdeAction.java:661)
at oracle.ide.IdeAction$2.run(IdeAction.java:889)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Has anybody else experienced this problem too?
Vahan Harput
[email protected]Hi Lisa,
My complete DDL:
CREATE TABLE "GENRE"
"GENRE" NVARCHAR2 (100) NOT NULL
CREATE TABLE "MEDIA"
"ID" NUMBER NOT NULL,
"TYPE" CHARACTER (1)
CREATE TABLE "MOVIE"
"ID" NUMBER,
"NAME" NVARCHAR2 (1000),
"GENRE" NVARCHAR2 (100) NOT NULL,
"MEDIA_ID" NUMBER NOT NULL
ALTER TABLE "GENRE"
ADD CONSTRAINT "GENRE_PK" PRIMARY KEY
"GENRE"
ENABLE
ALTER TABLE "MEDIA"
ADD CONSTRAINT "MEDIA_PK" PRIMARY KEY
"ID"
ENABLE
ALTER TABLE "MOVIE"
ADD CONSTRAINT "MOVIE_FK_GENRE" FOREIGN KEY
"GENRE"
REFERENCES "GENRE"
"GENRE"
) ENABLE
ALTER TABLE "MOVIE"
ADD CONSTRAINT "MOVIE_FK_MEDIA" FOREIGN KEY
"MEDIA_ID"
REFERENCES "MEDIA"
"ID"
) ENABLE
CREATE SEQUENCE "MEDIA_SEQ" INCREMENT BY 1 START WITH 1 ;
CREATE SEQUENCE "MOVIE_SEQ" INCREMENT BY 1 START WITH 1 ;
Regards,
Vahan Harput -
Flash Player update blocking some folders/photos upload?
Why is the latest Flash Player update blocking some folders from view in my laptop's photo library when I attempt to upload a photo to a website (ie FaceBook, Yahoo email, ect)? I'm using Windows 7 and IE 10.0.4
When I attempt to upload a photo onto Facebook or an email (for example). I click on attach/upload and click on my Photo Library, but not all of my folders are showing up, so I can't upload those photos. Although if I open up my Photo Library directly on my laptop the folders can be seen and accessed. Prior to updating my Adobe Flash Player this was never a issue.
Sent from my iPhone -
Execute PL/SQL From MS SQL SERVER PL
Hi.
I Need execute a Oracle PL/SQL from a SQLSERVER 2000 PL, i make a database link from sqlserver and i can see the tables to oracle, but i can't execute a pl/sql.
The PL/SQL i want execute return a ref cursor.
Thak's for your helpDo you have a final / in your script to execute it (which is presumably an anon pl/sql block).
-
How to get save result from EXECUTE from a dynamic SQL query in another table?
Hi everyone,
I have this query:
declare @query varchar(max) = ''
declare @par varchar(10)
SELECT @par = col1 FROM Set
declare @region varchar(50)
SELECT @region = Region FROM Customer
declare @key int
SELECT @key = CustomerKey FROM Customer
SET @query = 'SELECT CustomerKey FROM Customer where ' + @par + ' = '+ @key+ ' '
EXECUTE (@query)
With this query I want get col1 from SET and compare it to the column Region from Customer. I would like to get the matching CustomerKey for it.
After execution it says commands are executed successfully. But I want to save the result from @query in another table. I looked it up and most people say to use sp_executesql. I tried a few constructions as sampled and I would always get this error:
Msg 214, Level 16, State 2, Procedure sp_executesql, Line 12
Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.
So the output should be a list of CustomerKeys in another table.
How can I save the results from EXECUTE into a variable? Then I assume I can INSERT INTO - SELECT in another table.
ThanksCREATE TABLE Customer
(CustomerKey INT , Name NVARCHAR(100));
GO
INSERT dbo.Customer
VALUES ( 1, N'Sam' )
GO
DECLARE @query nvarchar(max) = ''
declare @par varchar(10) = 'Name',
@key varchar(10) = 'Sam'
CREATE TABLE #temp ( CustomerKey INT );
SET @query =
insert #temp
SELECT CustomerKey
FROM Customer
where ' + @par + ' = '''+ @key+ ''' '
PRINT @query
EXEC sp_executesql @query
SELECT *
FROM #temp
DROP TABLE #temp;
DROP TABLE dbo.Customer
Cheers,
Saeid Hasani
Database Consultant
Please feel free to contact me at [email protected] as well as on Twitter and Facebook.
[My Writings on TechNet Wiki] [T-SQL Blog] [Curah!]
[Twitter] [Facebook] [Email] -
Tried opening a file in library and it states can't open database with library name? It says Relaunch then will not open? and Blocks me completely from Aperture. I have to go to Finder to Rename it? I need this file how do I get it to open?
Aftershotz,
You're going to have to give a bit more information.
What do you mean by "opening a file in library?" There is no function of Aperture to open files -- you can open (switch) libraries.
You'll have to be more specific about error messages, too. Perhaps some screenshots would be useful to diagnose your problem. "Can't open database with library name" is not enough detail about what Aperture is really telling you.
nathan
Maybe you are looking for
-
my iphone was stolen, and was erased all the data, how can i block or cut the iphone service on my phone?, my iphone was stolen, and was erased all the data, how can i block or cut the iphone service on my phone?
-
Temporary table refresh problem
Hi, I running a process before validation on a page to populate a temporary table when I click a button. On the following page I've built a shuttle on the temporary table. Not the most elegant solution, but the shuttle LOV box wouldn't process the or
-
Hi experts i've imported by bbpgetvd some vendors from ECC 6.0 to SRM 5.0 but some are wronged. I've deleted the needed by ppoma_bbp but i'd like to know if there is a way to go back with the number range of vendors i think abou trans SNUM.... regard
-
Hi I can no longer access, via web, to my live.it account because, when I try to do it, I access to my outlook.com account and, when someone sends me some E-Mail on live.it, I do not see them. How come? Thanks Bye Balubeto
-
HT201210 a problem with oldd iPod update
I HAVE AN OLD IPOD AND I HAVE TRIED TO RESTORE IT BUT EVERYTIME I TRIED IT SAYS: AN UNKNOWN ERROR OCCURRED (-1) ANYBODY CAN HELP?