I had a task to reschedule database jobs to a different date as they were Running Statistics job running during business hours..
I used dbms_job.change procedure for the same On Thursday i.e. 17th June i changed a job as follows exec dbms_job.change(11, NULL, TRUNC(SYSDATE+2), 'TRUNC(SYSDATE+7)');
When i checked the status today querying user_jobsi found that the job was started today at 00:57 hrs.
I checked the alert logs as well but couldn't find any errors. How to proceed with the troubleshooting for this issue.
in a 9.2.0 db I create a db link but does not function :
CREATE DATABASE LINK "ONEDB" CONNECT TO "user1" IDENTIFIED BY "****" USING 'ONEDB';
SQL> select * from dual@"ONEDB"; select * from dual@"ONEDB" * ERROR : ORA-12154: TNS:could not resolve service nameBut on the same server I can connect to 11g in sqlplus :
Z:>sqlplus /nolog SQL*Plus: Release 11.2.0.3.0 Production on Mar. Juin 19 10:13:45 2012 Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> connect user1@ONEDB password : Connected.Of cours the other DB links toward 9.2.0 databases work well.
i create new database (Student) using command line, now i want to connect with newly created database (using sys as sysdba), but again it directly connected with old database (ORCL). So what should i do to connect with newly created database (Student).
I have created 2 users named "user_a" and "user_b" in my database and i gave "connect","dba" and "resource" roles to both users,then i created a table,synonym in user_a and i observe that user_b can also access this table and synonym of user_a without "granting" to "user_b", how it is possible. is it because of any of above role?
I have created trigger on database level in system schema. While i am creating new tables in system schema, trigger logged the entry but when i am creating table in scott schema it is not working for that.
CREATE OR REPLACE TRIGGER ddltrigger AFTER DDL ON DATABASE BEGIN INSERT INTO aud_log (user_name, ddl_date, ddl_type, object_type, owner, object_name ) VALUES (ora_login_user, SYSDATE, ora_sysevent, ora_dict_obj_type, ora_dict_obj_owner, ora_dict_obj_name ); END;
I am using 10.2.0.1 on OEL5. I have installed CRS, Oracle home, ASM on both nodes and everything is fine.
When invoked dbca to create a database, it says:
*'DBCA could not startup the ASM instance configured on this node. To proceed with database creation using ASM you need the ASM instance to be up and running. Do you want to recreate the ASM instance on this node?'*
Is it a bug? because some blogs say this is a bug. And patch 8288940 will solve this. They also say this patch is to solve the incompatibility between 11g ASM incompatibility with 10g. But here I am using everything of 10.2.0.1.
I have created a function for knowing the status of link which connect me with remote database.function is as follows
--------------------------------------------------------------------------------------------- CREATE OR REPLACE FUNCTION get_status_db_link (p_db_link_in VARCHAR2) RETURN NUMBER AS rows NUMBER; v_code NUMBER; v_errm VARCHAR2(64); [code]....
Now functin should returns 1 when link is up and it should return 0 when link down but sometime when link is down it continues showing executing it hang my pc.
I have 780(12*65) csv files generated from 65 databases.Now I have to load this 780 csv files into 12 tables created in my database for some monitoring and reporting purpose.to call the sql loader I am plannig to create 780 lines like below.
we know creating 780 control files is the difficult task.So I have created only 12 control files. is there any mechanism to pass a varible (planning to declare it in the sqlldr line) to the infile clause like below in sql loader?
I have a Client Server application that I created using an MS-SQL Server Database (MS-SQL Server 2008 R2 Express).Since MS-SQL Server has wide range (and number) of DATA_TYPEs, I elected to dedicate a few of those DATA_TYPEs to application-specific processing (mainly the MONEY and BOOLEAN DATA_TYPES).
I further decided that within the Client Application that the general processing of a particular field would be determined by the corresponding DATA_TYPE stored in the database.
The DATA_TYPE of a particular field within the SQL Server database and may be determined by querying:
"select DATA_TYPE from INFORMATION_SCHEMA.Columns where ( ( Column_name = 'my_Field' ) and ( Table_Name = 'myTable' ) )"
I also extract/use other DATA_TYPE information as needed/appropriate.
With this information the Client Application can consistently process a MONEY (a DATA_TYPE in MS-SQL Server) differently than perhaps either a DECIMAL or a BIGINT (two other DATA_TYPEs in MS-SQL Server). I have to create the field with the correct DATA_TYPE in the database, but after that I don't have to worry about it.
I am now moving over to an Oracle Database (Oracle Database Express Edition 11g Release 2). And I would like to have the same (or similar) functionality as described above.
Oracle has fewer DATA_TYPES so it is more difficult to tie an application-specific-datatype to an Oracle-database-specific-DATA_TYPE. There simply aren't as many to "sacrifice" to my application-specific-processing. I don't want to treat every NUMERIC field as "the-apps-money-type."
With Oracle I can associate "the-apps-money-type" with, let's say, a NUMERIC(9,2) and then the Client Application will treat all NUMERIC(9,2) as "the-apps-money-type."The Client Application queries the Oracle database for DATA_TYPE, DATA_PRECISION, and DATA_SCALE to make this determination.
But this approach does not appeal to me, suppose that I have other NUMERIC(9,2) fields that are not of "the-apps-money-type." How can I set and then later determine, from the Oracle backend, if the NUMERIC(9,2) field is meant to be used as "the-apps-money-type" or just a regular number?
Is there some way I may create some sort of "sub DATA_TYPE" in Oracle?I considered indicating this in the COMMENTS field that is associated with particular field. Then query for that comment when I process NUMERIC DATA_TYPEs. But the COMMENTS field does not seem to make it into user_tab_columns or all_tab_columns.
(With Oracle SQL Developer one can create/modify/delete the user created tables/fields. COMMENTS may be added to particular fields within a table--these are the COMMENTS that I am referring to above).What I would like to do, and most direct approach to me, would be to somehow create a user defined DATA_TYPE that is simply:
1) a user defined DATA_TYPE name (like, MY_MONEY_TYPE), 2) associated with an Oracle Built-in datatype (like NUMERIC(9,2).
Then when the client application queries user_tab_columns the field may be processed appropriately. If I cannot do that, perhaps there is somewhere else that I may set and subsequently query for this sort of information. What is(are) the most direct way(s) to implement the functionality described above?
I have executed two jobs using dbms_scheduler. The value of the job_queue_process is 10 in my database. It is RAC database with Oracle 10g.
My job gets executed. But the next run is not getting executed at the next run date. In the below example, the systimestamp is 12:27. The first job's next run date is 12:30 so that is fine. But the second job's run date is 12:21 which is 6 mintues less than current time. As a result, the second job does not get executed after this at all..
I am trying to find a way to identify what are the user_jobs currently running. I have found 1 way which requires DBA User ID to execute (e.g. DBA_JOBS and DBA_JOBS_RUNNING) which I don't want.
I believe there is NO equivalent User table for DBA_JOBS_RUNNING table.
I have done my 20 mins search in this forum and unable to find.
I have a procedure that needs to be scheduled as a job. This procedure takes an average of 20-25 minutes to complete. The constraint is that these jobs are submitted using dbms_job.submit with an interval of 5 minutes.
So, will Job2 execute only after Job1 completes [even though Job1 takes 25 minutes to complete] or is there any other mechanism for setting incompatibility for a job with itself.