Please, help me to create the foreign key.
Oracle 10g using sqldbxI tried everything I could but all in vain.
(Folder) CREATE TABLE
FolderId INT NOT NULL PRIMARY KEY,
FolderName varchar (255) NOT NULL,
CreatedBy varchar (255) NOT NULL,
CreateDate TIMESTAMP NOT NULL
)
(Document) CREATE TABLE
DocumentID INT NOT NULL PRIMARY KEY,
FolderId INT NOT NULL,
DocumentTitle varchar (255) NOT NULL,
DocumentAuthor varchar (255) NOT NULL,
CreateDate TIMESTAMP NOT NULL
)
Document of ALTER TABLE ADD CONSTRAINT fkdocument FOREIGN KEY (document.folderid) REFERENCES (the folder. FOLDERID)
the last statement says invalid folder name. Help, please
Hello
Welcome to the forum!
See the Manual of the SQL language for the correct syntax:
ALTER TABLE document
ADD CONSTRAINT fkdocument
FOREIGN KEY (folderid)
REFERENCES folder (FOLDERID)
;
Thanks for posting your code! It is very useful.
Have you seen the FAQ forum yet? {message: id = 9360002}
Tags: Database
Similar Questions
-
Maker of SQL data - how to create the foreign key in the relationship 1 to 1?
Hi guys...
I had 2 tables...
Table 1 - CFR
-----------------------
CFR_ID = primary key
Table 2 - USER_PLAN
----------------------------
User_id = primary key
PLAN_ID ARGUMENT,
CFR_ID = reference foreign key (table 1)
Business flow go like this...
table insdie CFR, it contains all the documents / transactions of a particular plan user. each time a new transaction occurs for a plan/user, a new CFR_ID / row will be generated.
After that, the newly generated for the new line, CFR_ID will be updated to the CFR_ID in USER_PLAN
Thus, there is always a 1 to 1 relationship between table 2, no matter how much CFR_ID is generated for a particular USER_PLAN. as the CFR_ID in the USEr_plan table will always be the last being produced within the table of the CFR.
However, in the Data Modeler, I am unable to create this foreign key relationship... NO idea how create a 1 on 1 relationship of foreign key? or there is no way...
Thank you and best regards,
NoobHey Noob,
Yes, that's correct.
Best regards
Philippe -
Please, I have the following question on the foreign key and the ora-00904
Thanks in advance!
I created the table:
Create the Department table
(
DNAME varchar (15) NOT NULL,
deptID number (5) NOT NULL,
Primary key (dname, deptid)
)
then...
Create table Manager
(
MgrID number (10) not null,
Not null, name varchar (10)
Start_date date not null,
Primary key (mgrid),
CONSTRAINT fk_department
FOREIGN KEY (dname, deptip)
Department of REFERENCES (dname, deptid)
)
Trying to create the table with the constraint, it yeilds one:
ORA-00904: "DNAME": invalid identifier
+.. .with an asterisk under "dname" in line: FOREIGN KEY (dname, deptip) +.
I tried joining my name of the column with quotation marks ("" "); capitalized for consistency; and we tried creating and editing then - all to nothing will do. I also tried to use the user interface with Oracle Express Edition and the moment where I click on create, the same error appears. Could someone help please straighten out me up - was this threat for four days.
Thanks again!Hello
Welcome to the forum!
Columns that will reference the other table must be declared just like all the other columns; including the names in a FOREIGN KEY constraint is not auotmatically define them.
It works:CREATE TABLE Manager ( mgrid NUMBER (10) NOT NULL, Name VARCHAR (10) NOT NULL, Start_date DATE NOT NULL, dname VARCHAR2 (15), -- New deptid NUMBER (5), -- New PRIMARY KEY (mgrid), -- CONSTRAINT fk_department FOREIGN KEY (dname, deptid) REFERENCES department (dname, deptid) );
(assuming that the departments table, you posted, there).
Is there a reason why you use VARCHAR instead of VARCHAR2?
In the departments table, do you really need both dname and deptid in the primary key? For example, if you have a line with name = "ACCOUNTING" and deptid = 10; is it possible that you could have another line with deptid = 10 and some different dname, say 'REASEARCH '? It is more common to only have a deptid as primary key and have columns in the foreign key constraints that reference.
-
Drop partition without disabling the foreign key
Hi all
I have a table parent and child.
Parent table
create the table parent_1
(identification number,
create_date date,
Constraint parent_1_pk001 PRIMARY KEY (id))
PARTITION OF RANGE (create_date)
INTERVAL (NUMTODSINTERVAL(1,'DAY'))
(PARTITION parent_1_part VALUES LESS THAN (January 1, 2010 '));
Child table
create the table child_1
(identification number,
create_date date,
Constraint child_1_fk001 FOREIGN KEY (id)
REFERENCES parent_1 (id))
PARTITION OF RANGE (create_date)
INTERVAL (NUMTODSINTERVAL(1,'DAY'))
(PARTITION create_date_part VALUES LESS THAN (January 1, 2010 '));
I have problems to delete partition.
Parent_1
1 JULY 26, 12
2 JULY 26, 12
Child_1
1 JULY 26, 12
ALTER drop partition table CHILD_1 SYS_P274;
table altered CHILD_1.
ON THE PARENT PARTITION A FALL
ALTER drop partition table parent_1 SYS_P273;
Error report:
SQL error: ORA-02266: unique/primary keys in table referenced by foreign keys enabled
02266 00000 - "unique/primary keys in table referenced by foreign keys enabled.
* Cause: An attempt was made to truncate a single table or
primary keys referenced by foreign keys in another table.
Other unauthorized trades are a drop/truncate partition a
partitioned table or an ALTER TABLE EXCHANGE PARTITION.
* Action: Before performing the operations described above, the table, disable the
constraints foreign key in other tables. You can see what
constraints are making reference to a table by issuing the following
command:
SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = 'tabnam ';
PLEASE KNOW IF THERE IS A WAY TO THE PARENT PARTITION DROP WITHOUT TOGGLE FOREIGN CONSTRAINTS
Thank youSQL Error: ORA-02266: unique/primary keys in table referenced by enabled foreign keys 02266. 00000 - "unique/primary keys in table referenced by enabled foreign keys" *Cause: An attempt was made to truncate a table with unique or primary keys referenced by foreign keys enabled in another table. Other operations not allowed are dropping/truncating a partition of a partitioned table or an ALTER TABLE EXCHANGE PARTITION. *Action: Before performing the above operations the table, disable the foreign key constraints in other tables.
You can do until you disable the foreign key constraint
http://jonathanlewis.WordPress.com/2006/12/10/drop-parent-partition/
Hope this helps
Mohamed Houri
www.hourim.WordPress.com -
Forgive my question. I am very new to Oracle.
How can I make sure that changes in the key primary supplier_id (concerning the supplier table) would also appear directly in the FOREIGN KEY (supplier_id) in the products table?
Is that not all the primary key and FOREIGN KEY on?
My paintings:
I created 2 tables and connect to apply in the data base referential integrity, as I learned.
CREATE TABLE - parent provider
(the numeric (10) of supplier_id not null,)
supplier_name varchar2 (50) not null,
Contact_Name varchar2 (50).
CONSTRAINT supplier_pk PRIMARY KEY (supplier_id)
);
CREATE TABLE - child products
(the numeric (10) of product_id not null,)
supplier_id numeric (10) not null,
CONSTRAINT fk_supplier
FOREIGN KEY (supplier_id)
REFERENCES beg (supplier_id)
);
I inserted the following text:
INSERT INTO provider
(supplier_id, supplier_name, contact_name)
VALUES
(5000, 'Apple', 'first name');
I expect that the supplier_id (5000) to the provider of the table also appears in the products table under key supplier_id having the same value which is 5000. But this does not happen.
How to get there?
Thanks in advance!
Hello
What is a foreign key in Oracle?
A foreign key is a way to ensure referential integrity in your Oracle database. A foreign key means that the values of a table must appear also in another table.
Ok!??
What is now the right way to implement referential integrity in your Oracle database that the values of a table must also be included in another table?
A foreign key referential integrity indeed enfore in ensuring that the value in the child table must have a corresponding parent key (otherwise you will encounter an error, as evidenced by "SomeoneElse"). However, it will never automatically insert a row in the other table.
If you are looking for a solution that automatically inserts a record in the other table, maybe you should go for triggers:
See:
-
Can we create a foreign key by using built in functions?
Hi all
I'm in the need to create a foreign key referring to an expression of a column in another table.
For example, I try below and I got some errors.
CREATE TABLE TABLE_A
(
student_id VARCHAR2 (30),
student_name VARCHAR2 (100),
CONSTRAINT fk_A FOREIGN KEY (student_id) REFERENCES TABLE_B (UPPER (column_name))
);
Please suggest if it is possible that a foreign key could be made in an expression or not?
2761969 wrote:
Hi all
I'm in the need to create a foreign key referring to an expression of a column in another table.
For example, I try below and I got some errors.
CREATE TABLE TABLE_A
(
student_id VARCHAR2 (30),
student_name VARCHAR2 (100),
CONSTRAINT fk_A FOREIGN KEY (student_id) REFERENCES TABLE_B (UPPER (column_name))
);
Please suggest if it is possible that a foreign key could be made in an expression or not?
No - it isn't.
You can, however, create a VIRTUAL column in the parent table, and then create a foreign key that references.
-
Add the foreign key refers to a different schema
Hello
We have a database with schemaA and schemaB and we use a data model for schemaA with SQL Data Modeler.
Our data model is based on SchemaA and we do not want add schemaB or create subview in our current model for schemaB since our dev team do not want schemaB in the model
We have created a synonym in tableB schemaB shcemaA after granting select them, references to schemaA
We have added a foreign key on tableA in referencing TableB on schemaB schemaA.
for example. Add ALTER table tableA foreign constraint key(column-name) references tableB(colum-name)
So far so good.
But if we try to produce the DDL for tableA it has not provided the ALTAR of the foreign key that is based on shcmeaB
We know that we cannot add foreign key on dblinks.
How can I get the Modeler DDL from SQL data for tableA, including the foreign key
We appreciate the answers
Kind regards
Zafar
Hi zak,.
We have created a synonym in tableB schemaB shcemaA after granting select them, references to schemaA
We have added a foreign key on tableA in referencing TableB on schemaB schemaA.
You can do it in the database because TableB exists in the database and DB knows its definition, including the existing constraint of PK/UK.
This is the same model of data Modeler - you must have the definition of the table referenced in order to create the FK that refer to the constraint of PK/UK.
As it works now (we can change it) you can have modeled for SchemaA and ModelB for SchemaB. Then, you can drag & drop tableB form the Navigator to the diagram of the ModelA and TableB there will exist as an object remote read-only, you can use to create the FK.
With the help of subviews, DDL generation and configurations of reports, you can display the dev team than objects that they want to see - on the charts in generated DDL and reports.
Philippe
-
Identify the foreign key table
I have a table that has a few constraints that are foreign keys to other tables (see column FK_ETHNIC below). My naming conventions are consistent so they all start with 'FK_ ". In SQL, how can I find the table that the foreign key column references? I have a process that must find this table and then get all of its columns.
Thank you!
CREATE TABLE STU_BASE
(PK_ID VARCHAR2 (32), sys_guid() by default)
CONSTRAINT pk_stu_base
KEY ELEMENTARY SCHOOL
With the HELP of INDEX TABLESPACE sis_express_index
STORAGE (INITIAL 524288
NEXT 524288
PCTINCREASE 0),.
STUDENT_ID VARCHAR2 (15).
Fk_stu_base_ethnic FK_ETHNIC VARCHAR2 (32) CONSTRAINT
REFERENCES
Ethnic (PK_ID)
REMOVE THE NULL VALUE;
CREATE TABLE ETHNIC
(PK_ID VARCHAR2 (32), sys_guid() by default)
CONSTRAINT pk_ethnic
KEY ELEMENTARY SCHOOL
With the HELP of INDEX TABLESPACE sis_express_index
STORAGE (4096 INITIAL
NEXT 4096
PCTINCREASE 0),.
VARCHAR2 (2) ETHNIC,.
ETHNIC_DESC VARCHAR2 (30),
STATE_CODE VARCHAR2 (2),
FEDERAL_CODE VARCHAR2 (2))You could do a self-join with CONSTRAINTS (USER, ALL, s/n) views. You can search a constrainttype of 'R' and you can attach it to itself based on the R_OWNER and R_CONSTRAINT_NAME columns.
For example:
SELECT r1.owner AS child_owner , r1.table_name AS child_table , r2.owner AS parent_owner , r2.table_name AS parent_table FROM all_constraints r1 JOIN all_constraints r2 ON r2.owner = r1.r_owner AND r2.constraint_name = r1.r_constraint_name WHERE r1.constraint_type = 'R' ;
Published by: Centinul on February 16, 2012 15:36
-
How to create the "clear key" for the control panel simple search
Hello
I have a QueryRN with mode of construction research = none.
I would like to add a button 'Clear' on the search panel simple I know is there any settings / need to create the clear key caraa?
Please share with me the method to create the clear key... Thanks :)
pls help...Hello
Use below a
OAMessageLovInputBean LovBean = (OAMessageLovInputBean)webBean.findIndexedChildRecursive("Item"); if(LovBean!=null) { LovBean.setValue(pageContext,null); }
Kind regards
GYAN -
How to create a foreign key constraint on a table nested column
Dear Experts,
I create 2 tables using the object type. the VESSEL_PARAM table contains the list of the parameters allowed.
The table VESSEL_TYPE containe single item we list some parameters.
On this table, I love the column VESSEL_PARAM table VESSEL_PARAM to check if the settings are and the reference value is allowed.
How to create a foreign key?
Here my script that generates this runtime error: 00904. 00000 - '% s: invalid identifier' on this line
ALTER TABLE VESSEL_PARAM_TAB ADD CONSTRAINT FK_VESSEL_TYPE FOREIGN KEY (NAME, DATA_VALUE)
REFERENCES VESSEL_PARAM (PARAM_NAME, LIST_PARAM_VALUE. DATA_VALUE)
Thank youCREATE OR REPLACE TYPE OBJ_PARAM_VALUE AS OBJECT ( DATA_VALUE VARCHAR2(20) ,DESCRIPTION VARCHAR2(125) ) NOT FINAL; / CREATE OR REPLACE TYPE LIST_PARAM_VALUE AS TABLE OF OBJ_PARAM_VALUE; / -- derive object subtype from object supertype CREATE OR REPLACE TYPE OBJ_PARAM_NAME UNDER OBJ_PARAM_VALUE ( NAME VARCHAR2(30) )NOT FINAL; / CREATE OR REPLACE TYPE LIST_PARAM_NAME AS TABLE OF OBJ_PARAM_NAME; / Prompt create table VESSEL_PARAM; CREATE TABLE VESSEL_PARAM ( PARAM_NAME VARCHAR2(20) NOT NULL ,PARAM_DESC VARCHAR2(125) ,PARAM_VALUE LIST_PARAM_VALUE ,CONSTRAINT PK_VESSEL_PARAM PRIMARY KEY (PARAM_NAME) ) NESTED TABLE PARAM_VALUE STORE AS PARAM_VALUE_TAB TABLESPACE CMS_ADMDATA; / ALTER TABLE PARAM_VALUE_TAB ADD CONSTRAINT UN_PARAM_VALUE_TAB UNIQUE (DATA_VALUE); / SHOW ERROR; Prompt create table CMS_ADM.VESSEL_TYPE; CREATE TABLE CMS_ADM.VESSEL_TYPE ( VESSEL_TYPE VARCHAR2(20) NOT NULL ,VESSEL_DESC VARCHAR2(125) ,VESSEL_PARAM LIST_PARAM_NAME ,CONSTRAINT PK_VESSEL_TYPE PRIMARY KEY (VESSEL_TYPE) -- ,CONSTRAINT FK_VESSEL_TYPE FOREIGN KEY (VESSEL_PARAM) -- REFERENCES VESSEL_PARAM (PARAM_NAME) ) NESTED TABLE VESSEL_PARAM STORE AS VESSEL_PARAM_TAB TABLESPACE CMS_ADMDATA; / ALTER TABLE VESSEL_PARAM_TAB ADD CONSTRAINT UN_VESSEL_PARAM_TAB UNIQUE (NAME); ALTER TABLE VESSEL_PARAM_TAB ADD CONSTRAINT FK_VESSEL_TYPE FOREIGN KEY (NAME,DATA_VALUE) REFERENCES VESSEL_PARAM (PARAM_NAME,LIST_PARAM_VALUE.DATA_VALUE) / SHOW ERROR;
SalvatoreCould you please indicate your answer as correct if you judge them correct.
Best regards
Mohamed Houri
-
How can I get the data in the foreign key? PHP/mysql
I managed to create registration, log-in and results pages appear for accounts of client with PHP/Mysql/Dreamweaver 8. I have another page for more information to be contained in a child table, I used the Insert Wizard to create. I can't make it work. I get either a foreign key cannot be null error or a foreign key constraint.
If I include the foreign key in the form on the page, I can manually enter the appropriate identification number, and it works. How to automatically enter the id into the foreign key column?
I got the authentication of users using e-mail, password and user type.
Thanks for your help
When someone connects, Dreamweaver creates a session variable called $_SESSION ['MM_Username"]. Use this session variable to create a recordset object to get the ID of the user, who can then be entered in the child table's foreign key field.
Dreamweaver automatically updates the code for recordsets immediately above the DOCTYPE declaration, then you will need to move above the code for the server behavior insert record. So it must be in the following order:
- Recordset to get the user ID
- Insert the record to the child table
-
Creating a relationship creates no foreign key attribute (s)
Hello
In my logical model, I have an entity supertype/subtype with 2 subtypes with no own attributes (each subtype has only 1: m relationship). When I create the relationship of 1:m of subtype to another entity (the entity-side m), there is no attribute generated FK. I found a trick to create the relationship first of Supertype in the other entity, and then reconnect it to the subtype. Then, the foreign key is generated (I see that in the dialogue relationship property > FK attributes).
So I guess it's a bug.
Robert
Hi Robert,.
Thanks for reporting the issue that is fixed in 4.1.2 code
Philippe
-
Schema import Gets the foreign key number
Hi all;
Scott has a table named rank-> he has primary key-> different tablespace
Sharma has a table named emp-> he has foreign key-> different tablespace
$ imp/System Manager queue = refresh_sharma.dmp log = refresh_sharma_imp.log fromuser = touser = sharma sharma
Import: Free 11.2.0.1.0 - Production Thursday, may 7, 18:35:03-2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With partitioning, OLAP, Data Mining and Real Application Testing options
Export file created by EXPORT: V11.02.00 direct
import in US7ASCII and AL16UTF16 NCHAR character set
import server uses WE8MSWIN1252 (possible character set conversion) character set
Customer export uses the (possible character set conversion) WE8MSWIN1252 character set
. import of objects in SHARMA SHARMA
. . import of partition "CONT_EMP": "P1" 4000 imported lines
. . import of partition "CONT_EMP": "P2" 5000 imported lines
. . import of partition 'CONT_EMP': 'P3' 5000 imported lines
. . "DEPT" table import 12 lines imported
. . import of table 'EMP' 68278 imported lines
. . importing table "EMP_AUDIT" 4 imported lines
. . table 'Method' import 68000 lines imported
. . importing table "EMP_PERS_INFO" 68278 imported lines
. . importing table "EMP_PROJ_INFO" 68278 imported lines
. . table 'LOGTAB' import 603 lines imported
. . table import "PAYROLL" 186282 imported lines
. . import of table 'of the PROJECT"22 rows imported
. . importation of "TAB1" 4000000 imported table rows
. . table import 'TRANSPORT' 0 rows imported
IMP-00017: statement failed with error ORACLE 1031:
'ALTER TABLE 'EMP' ADD 'EMP_EMPLEV_C12_FK' OF CONSTRAINT FOREIGN KEY ("EMP_LEVE" '.
""L") REFERS TO"SCOTT" CATEGORY"("GRADE_NAME") ENABLE NOVALIDATE.
IMP-00003: ORACLE error 1031
ORA-01031: insufficient privileges
About to activate the constraints...
IMP-00017: statement failed with error ORACLE 2430:
' ALTER TABLE 'EMP' ENABLE CONSTRAINT "EMP_EMPLEV_C12_FK"
Import completed successfully with warnings.
30, 31 line number is display error.
'ALTER TABLE 'EMP' ADD 'EMP_EMPLEV_C12_FK' OF CONSTRAINT FOREIGN KEY ("EMP_LEVE" '.
""L") REFERS TO"SCOTT" CATEGORY"("GRADE_NAME") ENABLE NOVALIDATE.
After the import operation, to recreate the foreign key is the right option. but
By performing the import operation, how can all I avoid this error dump file or log file?
I don't want to use constraints = N.
Thanks in advance
You gave * of * SCOTT * at * SHARMA. The grant received by SHARMA not getting exported when you export SHARMA. So, it is not imported when you import SHARMA. If you did an export and import of SCOTT before SHARMA, the award of the cross-schema would have also been imported. (Subsidies granted by a user are exported with the user, the subsidies received by a user are not exported with the user).
Hemant K Collette
-
Please help, data queue on the remote server
Hello Experts,
Kindly help, to learn how to roll up the data from the remote server. I need a detailed procedure to make settings on my local machine to connect to remote Oracle using SQL Server * MORE.
I installed on my local machine which is 32-bit Oracle 11 g Release 2:+.
SQL * more: Production of release 11.2.0.1.0 Fri Feb 8 12:02:30 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter the user name: SYSTEM
Enter the password:
Connected to:
Oracle Database 11g Release 11.2.0.1.0 - Production
SQL >
and on a remote server below is the version installed.
Log in as: B_DB1user
[email protected] password:
Last login: Sat Feb 7 18:19:35 2013 10.10.167.8
[B_DB1user@bamdb001 ~] $ sqlplus
SQL * more: version 11.1.0.7.0 - Production Fri Feb 8 12:06:35 2013
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Enter the user name: B_DB1user
Enter the password:
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
With the partitioning, Real Application Clusters, OLAP, data mining
and Real Application Testing options
SQL >
----------------------------------------------------------------------------------------------------------------------------
That's what I have in tnsnames.ora
tnsnames.ora # Network Configuration file: E:\app\managerproj3\product\11.2.0\dbhome_5\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.10.167.8)
)
)
---------------------------------------------------------------------------------------------------------------------------------
That's what I have in listener.ora
listener.ora # Network Configuration file: E:\app\managerproj3\product\11.2.0\dbhome_5\network\admin\listener.ora
# Generated by Oracle configuration tools.
AUDITEUR1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.10.167.8)(PORT = 1521))
)
)
ADR_BASE_LISTENER1 = E:\app\managerproj3
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521))
)
)
ADR_BASE_LISTENER = E:\app\managerproj3
------------------------------------------------------------------------------------------------------------------------------------------
Database server: ORACLE
HOSTNAME: BAMDB001
IP address: 156.1.3.4
and here is the script I tried data spool in the local computer using SQL * MORE
set colsep,
set pagesize 120
Set trimspool on
headsep off Set
set linesize 1000
coil D:\test\myfile.csv
Select table_name, tablespace_name of all_tables;
spool off
It is effective on the local machine... Please help me to get the data from the remote server to the local computer?
Kindly let me know if you need anything whatsoever.
Thanks in advance
Kind regards
BoschIs not more or less the same question you asked in {message identifier: = 10835497}?
You must have a user to the remote database and an entry for the remote database in your tnsnames.ora file
If you have just to coil of database of remote and local database didn't need to be involved:
Edit your tnsnames.ora and add an entry with the remotedb, the information and you need to have the following information:Ip address or the name of the server (BAMDB001?)
Name of the service (?)
Port configured for this database. (??)Also, you must be sure that the connectivity of your local computer to a remote server is granted (without firewall block).
Only when you have this information, you can connect to the remote database from your laptop.From the Unix server where you connect to the database, you can get the information to be inserted in your local tnsnames.ora by typing:
tnsping dbname
Of course, you need to replace dbname with the name of your database.
Another way is to check the remote tnsnames.ora when logged in Unix:cat $ORACLE_HOME\network\admin\tnsnames.ora
and check the configuration it.
Kind regards.
Al -
Rename the foreign key constraint
Hello
I have table tbl_a with a column a_col1 SEO tbl_b.b_col1
I want to create the name of the foreign key as FK_A_COL1 constraint which is FK_ < COLUMN NAME OF the CHILD >.
Foreign naming key standards does not have the use of the name of the child under the name column.
Is there any other solution/script to achieve this?
Thank you.fkeys = model.getFKIndexAssociationSet().toArray(); for (var i = 0; i
;//also can use fk.getTable().getAbbreviation()fkname = "FK_"+fk.getTable().getName();cols = fk.getColumns();for( var k = 0;k
Maybe you are looking for
-
Versions of Firefox Sync for stable, beta and aurora
I think of experimenting with the string "Aurora", but before I got what I need to confirm how Firefox Sync will work on several channels. During the development of synchronization and in previous versions as an add-on stand alone the synchronization
-
Satellite L510 begins with BSOD
Hello... I had a problem in my laptop (Toshiba Satellite L510, running windows 7) during loading it s going to stop a while then windows BSoD... I use all programs to diagnose my memory with memtest, that s the only test I've run because other softwa
-
ICON for Local Area Connection ICON shows a sign of DEADLOCK.
Hi all Internet works. It's the connection to the local network. But no ICON for Local Area Connection ICON shows a sign of DEADLOCK. There is no Internet connection ICON in "network connections". I want to display ICONS in the systray. If I try to d
-
I get a popup stating the windows key that I use is not valid.
Activate Windows when already activated? I just did a major update to my computer with a new motherboard, video card and processor, and now I get a popup stating the windows key that I use is not valid. The key on the sticker still gives me the same
-
Product key Office 2007 pre-installed can be transferred to the new Thinkpad?
Hello When I bought my x 200 Thinkpad 4 years ago I bought Office 2007 pre-installed. I still have the product key for MS Office, but I do not believe that the x 200 comes with the software CDs. Now, I'm going to buy a new Thinkpad and want to use my