Focal Point
Create Synonym using SQL Script

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/1491031582

May 22, 2008, 05:58 PM
F-One
Create Synonym using SQL Script
Can some guide me on how to create Synonym using SQL script.

I tried it but it is giving me this error:

(FOC1658) DATASOURCE/u02/app/ibi/apps/fiload/bldg_count.sql FOR SYNONYM IS NOT FOUND

Right now my sql file has plain SQL statement.


WebFOCUS 7
Linux
Output: pdf, excel, and html
May 28, 2008, 08:27 AM
Pascal Bellerose
F-one,

Could it be possible for you to post the script you are using?


WFS/FFS/DM 7.6.4 / WFS/FFS/DM 7.6.8 / WFS/FFS/DM 7.6.9 / AS400 V5R4M0 / HTML / iSM 5.5sp2
August 02, 2008, 12:40 AM
Kar
Hi,

i have a script with plain sql-

how do I create Synonym using SQL script and load into table.

kat

Web Focus 7.6
Data Migrator 7.6.2 Unix


---
Insert into customer values(50,"John","Smith",2);
August 22, 2008, 09:13 AM
<murali swarna>
Try this,


SQL SQLORA SET SERVER XYZ
SQL SQLORA
DROP TABLE T_COUNTRY;
END
SQL SQLORA
CREATE TABLE T_COUNTRY
( "COUNTRY_CODE" CHAR(5 CHAR) NULL,
"COUNTRY_ID" CHAR(5 CHAR) NULL
) ;
END
-EXIT
August 23, 2008, 07:25 PM
Endre Pekarik
Murali,

If I understand this correctly, F-One is trying to create a WebFOCUS synonym (master file and Access file). Your example creates the physical table, not a synonym for an exiting physical table,
Endre


...
August 26, 2008, 03:09 AM
<murali swarna>
Hi Endre,

I understand your Question, basically it will create physical table, for synonym we have to create using adapter connection.

Murali
August 26, 2008, 11:38 AM
Endre Pekarik
Murali,

Yes, the above will create the table, and also, you can use WebFOCUS to create the synonym (master file and access file) instead of the synonym tool.

For example if you know the makeup up a master file and an access file, just write two flat files like this:

APP PATH xxxxxxxxx
FILEDEF ACCESSFILE DISK /home/iadmin/ibi/apps/xxxxx/xxxxx.acx

-RUN

-WRITE ACCESSFILE
SEGNAME=xxxxx,TABLENAME=xxxxxxx,KEYS=0,$

-RUN


...