oracle10g

How to query the permissions on an Oracle directory?

依然范特西╮ 提交于 2019-12-21 03:38:28
问题 I have a directory in all_directories, but I need to find out what permissions are associated with it, i.e. what has been granted on it? 回答1: This should give you the roles, users and permissions granted on a directory: SELECT * FROM all_tab_privs WHERE table_name = 'your_directory'; --> needs to be upper case And yes, it IS in the all_TAB_privs view ;-) A better name for that view would be something like "ALL_OBJECT_PRIVS", since it also includes PL/SQL objects and their execute permissions

How to export empty tables in oracle

倖福魔咒の 提交于 2019-12-20 14:39:34
问题 I have a big problem When i take a dump of database the empty tables are truncated How i can export the all tables in oracle 10g exp SYSTEM/password FILE=expdat.dmp 回答1: This might be because of these tables may not be extent allocated. Before taking backup you need to identify all the tables that do not have data. Then alter these tables to allocate extent. ALTER TABLE <table_name> ALLOCATE EXTENT; Use the below script to alter all tables they do not have extent allocated. SELECT 'ALTER

How to optimize an update SQL that runs on a Oracle table with 700M rows

时光总嘲笑我的痴心妄想 提交于 2019-12-20 12:35:39
问题 UPDATE [TABLE] SET [FIELD]=0 WHERE [FIELD] IS NULL [TABLE] is an Oracle database table with more than 700 million rows. I cancelled the SQL execution after it had been running for 6 hours. Is there any SQL hint that could improve performance? Or any other solution to speed that up? EDIT: This query will be run once and then never again. 回答1: First of all is it a one-time query or is it a recurrent query ? If you only have to do it once you may want to look into running the query in parallel

How to optimize an update SQL that runs on a Oracle table with 700M rows

你说的曾经没有我的故事 提交于 2019-12-20 12:35:19
问题 UPDATE [TABLE] SET [FIELD]=0 WHERE [FIELD] IS NULL [TABLE] is an Oracle database table with more than 700 million rows. I cancelled the SQL execution after it had been running for 6 hours. Is there any SQL hint that could improve performance? Or any other solution to speed that up? EDIT: This query will be run once and then never again. 回答1: First of all is it a one-time query or is it a recurrent query ? If you only have to do it once you may want to look into running the query in parallel

How to disable oracle cache for performance tests

最后都变了- 提交于 2019-12-20 10:33:03
问题 I'm trying to test the utility of a new summary table for my data. So I've created two procedures to fetch the data of a certain interval, each one using a different table source. So on my C# console application I just call one or another. The problem start when I want to repeat this several times to have a good pattern of response time. I got something like this: 1199,84,81,81,81,81,82,80,80,81,81,80,81,91,80,80,81,80 Probably my Oracle 10g is making an inappropriate caching. How I can solve

How to reconfigure Oracle 10g xe on Linux

假如想象 提交于 2019-12-20 09:46:50
问题 I have installed Oracle 10g xe from a deb file on linux, and then started to configure it using this terminal command sudo /etc/init.d/oracle-xe configure but after finishing configuration I forgot the password, so how can I reconfigure it again after reinstallation as now when I use the previous command I receive Oracle Database 10g Express Edition is already configured Thanks, 回答1: Oracle creates a system account named oracle. To change password to that account just use passwd oracle if you

Oracle - connection Pooling with spring framework

拈花ヽ惹草 提交于 2019-12-20 09:25:23
问题 We are trying to implement Oracle connection pooling with the help of Spring Framework. We are using DBCP connection pooling method. However the integration between DBCP and spring doesn't go down that well. Problem that we face is that DBCP returns PoolableConnections Object while Oracle expects OracleConnection Objects. (Throws ClassCastException) It seems that this problem has been handled in Oracle 11g. However I am curious as to how others have implemented Oracle connection pooling using

How to delete a user in Oracle 10 including all it's tablespace and datafiles

安稳与你 提交于 2019-12-20 09:07:31
问题 When I give the command to drop a user i.e. DROP USER 'username' cascade, Does it deletes all the tablespace and datafiles used by that particular user. If not, what is the command to delete all the tablespace / datafiles / disk space that were used by that particular user. 回答1: After dropping the user, you need to, for each related tablespace, take it offline and drop it. For example if you had a user named 'SAMPLE' and two tablespaces called 'SAMPLE' and 'SAMPLE_INDEX', then you'd need to

ora_rowscn and joins not working together

断了今生、忘了曾经 提交于 2019-12-20 06:46:03
问题 SELECT "Rental".*, "Rental".ora_rowscn as TimeStamp FROM "Rental" inner join "UserBranch" on "UserBranch"."fkBranchId" = "Rental"."fkBranchId" WHERE "Rental"."IsDeleted"='N' ; This query returns me invalid identifier exception in oracle 10g. I'm a beginner and don't know why the exception is coming. please help. Thank you. 回答1: Select "Rental".* ,"UserBranch"."fkBranchId", "Rental".ora_rowscn as TimeStamp from "Rental","UserBranch" where "UserBranch"."fkBranchId" = "Rental"."fkBranchId" and

How to open direct CSV file using TEXT_IO in oracle forms?

余生颓废 提交于 2019-12-20 06:25:13
问题 I applied this code in oracle forms 10g on trigger WHEN-BUTTON-PRESSED. This code only save the file on target location. CODE: PROCEDURE GEN_EXCEL IS IN_FILE TEXT_IO.FILE_TYPE; VC_HEAD Varchar2(32000); vc_file_path Varchar2(50) := 'C:\'; BEGIN IN_FILE := TEXT_IO.FOPEN(vc_file_path||'Test'||'.CSV','W'); TEXT_IO.PUT_LINE(IN_FILE,'YOUR_TITLE'||chr(10)); VC_HEAD := 'header1,header2,header3,header4'; TEXT_IO.PUT_LINE(IN_FILE,VC_HEAD); FOR C1 IN ( SELECT column1, column2, column3, column4 FROM