How to check the database is running in which normalization
All,
I wanted to know in which normal form(1NF,2NF,BCNF) my database is working. How to find that...Suggestions Please .
Tippu, I will agree with pretty much everything that the other posters have already posted.
Related to the concept of normalization, in the database would be the definitions of primary key (PK), unique key (UK), and foreign key (FK) constainsts within the database. Looking at the constaints definded in the database by querying the rdbms dictionary view DBA_CONSTRAINTS might be of interest for trying to identify and understand the relationship between tables in your applications. However, there is no database requirement that these relationships be defined within the database.
That is instead of declaring a PK on tableA there might just be a unique index and no FK to the header table, tableA, from its child detail table, tableB, declared in the database in this case. It would be totally up to the application to enforce this relationship. Still the view will provide information if most of the table relationships are formally defined in the database or not.
HTH -- Mark D Powell --
Similar Messages
-
How to check the database connection using OCI
I am working on enhhancement of very old application developed using C and OCI. It has a background process which acts as a middleware for interaction of any other front end process with oracle database. Any processes, which needs to interact with database sends a request to background peocess and then it will execute a call to execute the stored procedures for performing requested operation (like select, update, insert) on table and will send the result back to respective process. So this process has to be always running in background and connected to branch database.
If branch database gets restarted or connection gets dropped due to some ad-hoc problem then the background process also has to be restarted manually. Because this process establishes the connection to branch database only once on start up and it does not have the intelligence to reconnect automatically in such scenario.
I am looking forward to build the intelligence in this process to automatically reconnect if connection with branch database is lost. But I am not familer with OCI, and I am not sure if there is any OCI call which can determine if my earlier connection is still available. Can any one please tell me if there is any other way to check the connection other than the execution of dummy query, then check if it gets executed properly and then do the actual query.
Thanks in advance,
DeeapkHi,
If you are reworking the application can you not build in the functionality to re-establish a connection if there is a failure? That is, a submission from the application server to the database server detects a failure, etc. and then re-establishes the connection. If you need a more frequent check than during a user-initiated roundtrip, you may be best served by using the "dummy query" technique on some time interval.
From my understanding using HA Event Notification would require a RAC database (plus a multi-threaded application and services correctly configured on the RAC-side).
In the documentation I see this:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14250/oci09adv.htm#sthref1495
"Applications must connect to a RAC instance to enable HA event notification."
In any case, this has the potential to be a bit complicated...
Regards,
Mark -
How to check the database existence using java.
Hi All,
I need to know if a database exists or not using DB2 sql statements. Is there any sql to find that.
Thanks in advancetry to connect to the database. if it is possible, the database exists - if not - well there may be a number of reasons, but if your database URL is correct, your network is ok and your database engine is running, the database is not existent.
-
Help! how to check the SQL run in Oracle?
Hi all,
I have a problem. the developer said the SQL written in Java code are not the one executed in Oracle DB. that mean the query is some how manipulated by some PL/SQL so the final query run in Oracle is different. So can someone teach me how to check the actual SQL run in Oracle?
Thanks a lot.
Regards,
JasonHi Michel Thanks. But it looks like the query stored in v$sqlarea is not the final executable SQL. for example, the code in application is "select column_A from default_table where column_A = ?" and this ? will be given some value in run time. the query stored in v$sqlarea will be like "select column_A from default_table where column_A = :1"... what is this :1?
Also if some PL/SQL procedure appends some condition to the SQL, is it possible to view the full query from database side?
ok, let me try trace and tkprof first. -
HI
how to check RBS maintainer is running after deleting orphan blobs and while deleting the blobs from rbs storage,
and also how to stop the RBS maintainer for a specific content db.
when I run below query I found the orphancleanup value true
SELECT [config_key],[config_value] FROM [mssqlrbs_resources].[rbs_internal_config]
where config_key='orphan_cleanup_in_progress'
adilHI
the RBS maintainer was run from one of web front end server And for one content database , that fine
but I now know this information only this did by other administrators.
Now I did not found this Maintainer running in windows task scheduler, but blobs are decreasing from content database RBS storage folder, and also I found this maintainer running I checked from when run sql queriy in sql
server
SELECT
[config_key],[config_value]
FROM
[mssqlrbs_resources].[rbs_internal_config]
where
config_key='orphan_cleanup_in_progress’
it given me true
here now I want to stop this orphan cleane up , what settings and script I will run?
adil -
How to check the owner of any Object in the database.
How to check the owner of any Object in the database.
Thanks
HimanshuWhat about this ?
SELECT owner,Object_name,object_type FROM all_objects
OR
SELECT owner,Object_name,object_type FROM dba_objects -
How to check the performance of the database instance in oracle apps 11i
hii everybody,
i want to know,how to check the performance of the database instance using oracle applications 11i.your help highly appreciated,thanks.Pl do not post duplicates - how to check the performance of the server in oracle applications 11i
-
HOW TO CHECK THE CHECKBOX VALUE WITH SQLCE DATABASE
Hai All,
Good Day! I am using VB in Visual Studio 2008. I have a form with check boxes and one button control. If i selected the check box and then click the button, check the database table field and check box text are equal. if both are equal then
how to check?
I have tried it. The code is:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conn As New SqlCeConnection
Dim cmd As New SqlCeCommand
conn.ConnectionString = "DataSource = E:\Vbprojectex\WindowsApplication3\WindowsApplication3\Database1.sdf"
Try
cmd.Connection = conn
conn.Open()
If CheckBox1.CheckState = 1 Then
cmd.CommandText = "SELECT Aerator FROM ttabpagelist where Aerator = CheckBox1.Text"
TextBox1.Text = 1
End If
cmd.ExecuteNonQuery()
Finally
conn.Close()
End Try
End Sub
End Class
Thanks & Regards Sasi ................. Go Greenprobably something like (ofc below will never give result since Aerator can't have 2 values, you will have to adjust the second check box column obviously)
Try
cmd.Connection = conn
conn.Open()
dim strsql as string = "= "SELECT Aerator FROM ttabpagelist "
Dim whereConcatenator As String = " WHERE "
Dim Wherestatement As String = String.Empty
If checkbox1.checked = True Then
Wherestatement += whereConcatenator
Wherestatement += "Aerator = " & checkbox1.Text
whereConcatenator = " AND "
End If
If checkbox2.checked = True Then
Wherestatement += whereConcatenator
Wherestatement += "Aerator = " & checkbox2.Text
End If
cmd.commandtext = strsql & wherestatement
TextBox1.Text = 1
End If
cmd.ExecuteNonQuery()
Finally
conn.Close()
End Try -
Dears,,
If i have running database and i need to make check health for it for performance , tuning , . . . , etc
Is there any steps or advisors or documentations to go ahead with them enable me to check the database health.
Thanks & Regards,,Eng.Mohammed wrote:
Dears,,
If i have running database and i need to make check health for it for performance , tuning , . . . , etc
Is there any steps or advisors or documentations to go ahead with them enable me to check the database health.
Thanks & Regards,,
One way to check for performance issues is to see if your telephone is ringing. If no one is calling to complain, then you don't have any problems.
I'm only half joking. Which means I am half serious. While you shouldn't take a completely cavalier attitude toward performance, neither do you want to fall victim to Compulsive Tuning Disorder.
Start with the 2-Day DBA manual. Follow up with the tuning guide. Both at tahiti.oracle.com
And remember, no matter how much effort you put into tuning, there will always be a "Top Five" wait events. Is it worth 40 man hours of effort to get a 75% reduction in average response time? Really? Even if the average response time is already 0.5 seconds? Is the user going to be able to perceive that 0.38 seconds improvement? -
Can change the size of the redolog files while the database is running.
How the size of the redolog files will hurt your database performance ?
Can change the size of the redolog files while the database is running in oracle 9i. ?
What will be its impact on the standby database ?
Thanks in advance.redo logs that are too small can cause waits on the switches for heavily utilized systems. logs that are too large are a pain the a$$ during recovery. check v$loghist to see how often switches occur - an average of 20 minutes is good; if you have many switches happening back-to-back, that's a bad sign.
you can change the sizes while the db is up. choose a redo group that is INACTIVE, drop it, delete the files, and recreate it with larger files. then force a switch ("alter system switch logfile;"), and do another inactive group. I actually prefer to do as many switches as necessary to make the new group active so I can verify that I didn't screw up before dropping the next group.
not sure of impact on standby database. -
How to check the progress of statistics gathering on a table?
Hi,
I have started the statistics gathering on a few big tables in my database.
How to check the progress of statistics gathering on a table? Is there any data dictionary views or tables to monitor the progress of stats gathering.
Regds,
KunwarHi all
you can check with this small script.
it lists the sid details for long running session like
when it started
when last update
how much time still left
session status "ACTIVE/INACTIVE". etc.
-- Author : Syed Kaleemuddin_
-- Script_name : sid_long_ops.sql
-- Description : list the sid details for long running session like when it started when last update how much time still left.
set lines 200
col OPNAME for a25
Select
a.sid,
a.serial#,
b.status,
a.opname,
to_char(a.START_TIME,' dd-Mon-YYYY HH24:mi:ss') START_TIME,
to_char(a.LAST_UPDATE_TIME,' dd-Mon-YYYY HH24:mi:ss') LAST_UPDATE_TIME,
a.time_remaining as "Time Remaining Sec" ,
a.time_remaining/60 as "Time Remaining Min",
a.time_remaining/60/60 as "Time Remaining HR"
From v$session_longops a, v$session b
where a.sid = b.sid
and a.sid =&sid
And time_remaining > 0;
Sample output:
SQL> @sid_long_ops
Enter value for sid: 474
old 13: and a.sid =&sid
new 13: and a.sid =474
SID SERIAL# STATUS OPNAME START_TIME LAST_UPDATE_TIME Time Remaining Sec Time Remaining Min Time Remaining HR
474 2033 ACTIVE Gather Schema Statistics 06-Jun-2012 20:10:49 07-Jun-2012 01:35:24 572 9.53333333 .158888889
Thanks & Regards
Syed Kaleemuddin.
Oracle Apps DBA
Mobile: +91 9966270072
Email: [email protected] -
How to schedule the job to run evry Sunday at 12 P.M IST.
Hi Experts,
I want to schedule a job which will run evry Sunday at 12 P.M IST.
I have written the below script.
[code]BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB
job_name => 'SERVICE_SAL_FS.SAL_MESSAGE_BUFFER_PURGE_JOB'
,start_date => SYSTIMESTAMP
,repeat_interval => 'FREQ=WEEKLY; BYDAY=SUN; BYHOUR=12;BYMINUTE=0; BYSECOND=0;'
,end_date => NULL
,job_class => 'DEFAULT_JOB_CLASS'
,job_type => 'STORED_PROCEDURE'
,job_action => 'SERVICE_SAL_FS.SAL_MESSAGE_BUFFER_PURGE_PROC'
,comments => 'Run at 12 P.M.IST every Sunday'
,enabled => TRUE
END;[/code]
But the server in US.
[code]SELECT sysdate from Dual;
6/11/2013 3:58:58 AM
--But the time in India is 02:28 PM [/code]
How to convert the timezone to IST.
Please help me how to schedule the job to run evry Sunday at 12 P.M IST.
Thanks.Did you read DBMS_SCHEDULER docs:
The calendaring syntax does not allow you to specify a time zone. Instead the Scheduler retrieves the time zone from the start_date argument. If jobs must follow daylight savings adjustments you must make sure that you specify a region name for the time zone of the start_date. For example specifying the start_date time zone as 'US/Eastern' in New York will make sure that daylight saving adjustments are automatically applied. If instead the time zone of the start_date is set to an absolute offset, such as '-5:00', daylight savings adjustments are not followed and your job execution will be off by an hour half of the year.
When start_date is NULL, the Scheduler will determine the time zone for the repeat interval as follows:
It will check whether the session time zone is a region name. The session time zone can be set by either:
Issuing an ALTER SESSION statement, for example:
SQL> ALTER SESSION SET time_zone = 'Asia/Shanghai';
Setting the ORA_SDTZ environment variable.
If the session time zone is an absolute offset instead of a region name, the Scheduler will use the value of the DEFAULT_TIMEZONE Scheduler attribute. For more information, see the SET_SCHEDULER_ATTRIBUTE Procedure.
If the DEFAULT_TIMEZONE attribute is NULL, the Scheduler will use the time zone of systimestamp when the job or window is enabled.
SY. -
How to Check the report is Finished while calling a report from Forms 6i
Dear All,
I am Calling a report from oracle forms 6i, after runing report in " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);"
I need to copy the pdf to store it in another place once the report is generated.
My Problem is : that i want ot Check first the report has generated after " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);" is executed ? How to check the report is generated ot not?
As i tried to use the below procedure after "Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);"" but his does not work... nothing happens
{code}
PROCEDURE FPC_COPY_REPORT (p_report_name varchar2) IS
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(20);
lv_id varchar2(1000);
BEGIN
repid := find_report_object('AMTP_995.RDF');
v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
if rep_status = 'FINISHED' then
message('Report Completed'); message('Report Completed');
else
message('Error when running report.'); message('Error when running report.');
end if;
END;
{code}
Any Helpactually My code is this:
declare
ln_alert number;
pl_id ParamList;
lv_report_name varchar2(10000);
lv_path varchar2 (100) := 'C:\';
lv_shared_path varchar2(1000);
lv_copy_file varchar2(10000);
cursor cr_dir_path IS
select v_dir_path
from md_directory
where v_dir_code ='SHR';
lv_file_name varchar2(1000);
BEGIN
open cr_dir_path;
fetch cr_dir_path into lv_shared_path;
close cr_dir_path;
lv_report_name := lv_path||:fn_cntl.nb_ref_no||'_M08600000_'||to_char(sysdate,'YYYYMMDD-HHmmss')||'.pdf';
if ffn_check_fields THEN
pl_id := Get_Parameter_List('LAI');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('LAI');
if :fn_cntl.nb_report_name ='MMAT_REPORT'
then
if :fn_cntl.nb_report_desc ='EXPORT'
then
Add_Parameter(pl_id, 'PARAMFORM',TEXT_PARAMETER, 'NO');
Add_Parameter(pl_id, 'DESTYPE', TEXT_PARAMETER,'File');
Add_Parameter(pl_id, 'DESNAME', TEXT_PARAMETER, lv_report_name);
Add_Parameter(pl_id, 'DESFORMAT',TEXT_PARAMETER,'PDF');
Add_Parameter(pl_id, 'p_mat_no',TEXT_PARAMETER, :fn_cntl.nb_mat_no);
Add_Parameter(pl_id, 'p_ref_no', TEXT_PARAMETER, :fn_cntl.nb_ref_no);
Add_Parameter(pl_id, 'p_verified_by',TEXT_PARAMETER, user);
Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);
DECLARE
repid REPORT_OBJECT; v_rep VARCHAR2(100); rep_status varchar2(20);BEGIN
/* REP_OBJ= REPORT OBJECT CREATED UNDER REPORT NODE AT FORM */
repid := find_report_object('MMAT_REPORT'); v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
if rep_status = 'FINISHED' then
message('Report Completed'); message('Report Completed');
--copy_report_object_output(v_rep,'c:\local.pdf');
-- host('netscape c:\tlocal.pdf');
else message('Error when running report.');
message('Error when running report.');
end if;
END;
end if;
end if;
if :fn_cntl.nb_report_desc ='EXPORT'
then
error_handler('This report will be Storde in ' ||lv_report_name||' and '||lv_shared_path|| ' Location',3);
lv_copy_file :='copy '||' "'||lv_report_name||'" "'||lv_shared_path||'"';
host(lv_copy_file,no_screen);
error_handler('Report Has been Generated Sucessfully.',3);
end if;
end if;
END;I will try first the another solution you have replied perviously... and will let you no the results... thanks a lot... -
In ecatt - how to check at database level using ABAP
Hi,
How to check at database level using ABAP in Ecatt tool.
say,for example I want to check a particular sales order is invoiced or not ,at the database level and if it is invoiced I have stop proceeding to invoicing of that sales order number.
Could anybody suggest on this with an example?
thanks.Hi,
you can use the command GETTAB to access single db records.
Full specified or partitial specified keys can be use at GETTAB. It will return always only one record, also if a couple could match your selection.
For more advanced scenarios you can also use eCATTs Inline ABAP. In a block between the commands ABAP. ENDABAP. you can code ABAP statements, e.g. SELECT ... INTO TABLE ...
eCATT script parameters of type 'V' defined in that script using ABAP/ENDABAP will be transfered into the ABAP block and back to script after ABAP perform.
Best regards
Jens -
How to recover the database when some of the archive log file get deleted.
I am facing a problem with Oracle database, which is related to archivelogs.
Our development database is running in archivelog mode, but we don't have backups scheduled and have no recovery catalog.
When the database was in running condition, disk got full, so some archivelogs were deleted manually.
After this they restarted the DB, and now DB is not coming up. Errors are as follows:
SQL> startup
ORACLE instance started.
Total System Global Area 1444383504 bytes
Fixed Size 731920 bytes
Variable Size 486539264 bytes
Database Buffers 956301312 bytes
Redo Buffers 811008 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs;
alter database open resetlogs
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/export/home/oracle/dev/ADVFRW/ADVFRW.system'
SQL> recover datafile '/export/home/oracle/dev/ADVFRW/ADVFRW.system'
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
SQL> recover database using backup controlfile;
ORA-00279: change 215548705 generated at 09/02/2008 17:06:10 needed for thread
1
ORA-00289: suggestion :
/export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC
ORA-00280: change 215548705 for thread 1 is in sequence #1107
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC
ORA-00308: cannot open archived log
'/export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SQL>
1. How to recover the database and bring it online
Any help will be highly appreciated.
With Regards
Hemant Joshi
Edited by: hem_Kec on Sep 7, 2008 9:07 AMHi,
Archive log files are the copies of redolog files.As redo log files are circularly overwritten,oracle generates archive log file of the corresponding redo logfiles being overwritten.So if you have a backup that dates back to 10 am in the morning and if your database creashed at 3 pm,you cannot use the redo log files alone as they have incomplete information.To completely recover the database upto 3 pm,you need archive log files generated between 10 am to 3 pm. In your case since you are missing one archive log file,you cannot perform complete recovery and hence would suffer data loss.
Maybe you are looking for
-
Photoshop CC: When I'm trying to draw a rectangle I can't fill it or create a stoke because there is a message telling me; "Could not complete your request because of a program error. What can I do?
-
Wb_rt_api_exec in pl/sql as OWB target
I've got a question similar to the one posted by Donna Kelley on 26-mar-2007 ( Re: 10gR2: How do you run OWB from Enterprise Manager (OEM) and Scheduler? I'm unable to figure out the grants needed to execute wb_rt_api_exec.run_task within a pl/sql pr
-
Sync after changing my email?
I need help... After I change my email (I´v change it everywere, Iphone, Apple, Itunes) i can´t sync apps with my developer. I have no problem to sync it with other apps in my phone/itunes. But when my developer send me a copy of an app(the app is no
-
Pricing Condition Type - Not visible to the customer
Dear All, What all the config need to set up in the pricing procuder for a condition type to ensure customer did not wish to see the value for the particular condition type on the invoice. However it should have the ability to value in the condition
-
Hi, over the last few days (since Fri 6th Dec) I have been experiencing a BEX crash while gaming. The problem suddenly arose and persisted a few days ago with no obvious cause. Here is the crash report: Problem Event Name: BEX Application Name: S