How to export Synonym where owner=PUBLIC
Hi,
Im using oracle 11g on AIX 5.3, I have taken the export backup with data pump of one schema. its imported successfully,
but the all synonyms are not imported,
My table onwer is user whose backup i have taken ,
bt the owner of the synonyms are PUBLIC
but synonyms are not reflected in import ? why ? what should be the way to import the synonyms where user is PUBLIC?
Please help?
Thanks
You are doing a schema level export so synonyms will not be exported.
Hope this link helps
export of public synonym in oracle
You can also use dbms_metadata.get_ddl to generate synonym definition: select dbms_metadata.get_ddl('SYNONYM','<name-of-synonym>','PUBLIC') from dual;
Thanks
http://swervedba.wordpress.com/
Similar Messages
-
Hello forum,
for creating a test instance we want to export catalog data from selected users/schemas including their synonyms. With loadercli the commands "export user catalog ..." or "export schema <dbuser> ..." don't extract the synoyms. And "export table synonyms ..." doesn't works either.
How can we export synonyms without exporting the data? Our version is 7.6.06.03 on linux (64bit).
Regards,
ThomasHi Lars,
I think, that our solution is a little bit too simple for a HowTo, but here it is:
1. Get values:
select synonymname, tableschemaname, tablename from synonyms where owner = '<dbuser>'
2. Run loop with sql commands generated from extracted values:
create synonym <synonymname> for <tableschemaname>.<tablename>
An shorter alternative will be:
select 'create synonym ' & synonymname & ' for ' & tableschemaname & '.' & tablename from synonyms where owner = '<dbuser>'
That's all.
Regards,
Thomas -
How to export my red flash?
I am new to flash building and somehow to managed to create a great flash on my website with help of opencart.
but now i need to export it to use it on my other wbesite
im confused how to export it , where is it stored?
Have a look at my website, the flash script that i want it the Red High Heels Banners that keep changing
Hope to hear from anyone soon
Thank youUnless you can point to something specific on the page that is made using Flash, there is nothing I can see in that page that uses Flash. I am guessing you have some jquery working for you instead. You'll need to seek out help from the folks in the web design forums for that.
-
Hi all,
How to export synonyms from SQL Developepr using the Tools --> Databse Export
thanks
JoseApologies if I mis-understand your question, but here is how I just did it.
Tested on SQL Developer 1.5.1 connected to 11.1 db instance.
Tools->Database Export
1. Source/Destination: Specify connection + output file, click Next
2. Types to Export: Select Synonyms, click Next
3. Specify Objects: Click "Go" under connection name in left list box to populate, shuttle desired synonyms to right list box, click Next
4. Export Summary: Review work to be done, click Finish
After processing, the export file is shown in a SQL Worksheet editor. -
How to export some data from the tables of an owner with integrity?
Hi to all,
How to export some data from the tables of an owner with integrity?
I want to bring some data from all tables in a single owner of the production database for development environment.
My initial requirements are: seeking information on company code (emp), contract status (status) and / or effective date of contract settlement (dt_liq_efetiva) - a small amount of data to developers.
These three fields are present in the main system table (the table of contracts). Then I thought about ...
- create a temporary table from the query results table to contract;
- and then use this temporary table as a reference to fetch the data in other tables of the owner while maintaining integrity. But how? I have not found the answer, because: what to do when not there is the possibility of a join between the contract and any other table?
I am considering the possibility of consulting the names of tables, foreign keys and columns above, and create dynamic SQL. Conceptually, something like:
select r.constraint_name "FK name",
r.table_name "FK table",
r.column_name "FK column",
up.constraint_name "Referencing name",
up.table_name "Referencing table",
up.column_name "Referencing column"
from all_cons_columns up
join all_cons_columns r
using (owner, position), (select r.owner,
r.constraint_name fk,
r.table_name table_fk,
r.r_constraint_name r,
up.table_name table_r
from all_constraints up, all_constraints r
where r.r_owner = up.owner
and r.r_constraint_name = up.constraint_name
and up.constraint_type in ('P', 'U')
and r.constraint_type = 'R'
and r.owner = 'OWNERNAME') aux
where r.constraint_name = aux.fk
and r.table_name = aux.table_fk
and up.constraint_name = aux.r
and up.table_name = aux.table_r;
-- + Dynamic SQL
If anyone has any suggestions and / or reuse code to me thank you very much!
After resolving this standoff intend to mount the inserts in utl_file by a table and create another program to read and play in the development environment.
Thinking...
Let's Share!
My thanks in advance,
PhilipsThanks, Peter.
Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
Once again, thank you,
Philips
Reading Oracle Docs... -
Goto: How to export some data from the tables of an owner with integrity?
Hi to all,
Help please: How to export some data from the tables of an owner with integrity?
My thanks in advance,
PhilipsThanks, Peter.
Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
Once again, thank you,
Philips
Reading Oracle Docs... -
I just purchased a second hand iPad in carboot.i didn't realised that the old accnt is still linked to the device,now I icant activate my account .I don't know where and how to contact the original owner.what should I do activate my accnt?is there any other option?
Apple cannot help you locate the original owner. If you have no way to contact him/her, and you purchased directly from the seller rather than through a site that offers buyer protection, then the iPad is useless to you and you have wasted your money. The iPad is quite probably stolen and you should turn it in to the police.
This is why it's very risky and usually unwise to purchase out of a car boot from someone you don't know.
Regards. -
Anyone knows how to export ROLES and SYNONYMS with exp command?
Anyone knows how to export ROLES and SYNONYMS with exp/imp commands?
Help is needed. Thanks.Hi,
Pls. post this query in RDBMS forum since Portal export import forum does not handle this.
Thanks,
~Kirit. -
Hello!
Pleas help me!
Problem: How to export Project (slide show) from IPhoto (Iphone) to other computer with windows?
Second: How to save this project in Iphone?
Next: I export this Project to ICloud. Where I will find this?
regards
JerryHi jerryj69,
Welcome to the Support Communities!
The link below to the iPhoto for iOS manual covers many of these topics.
iPhoto Help: Ways to share photos
http://help.apple.com/iphoto/iphone/2.0/#blnk7d8f763e
Ways to share photos
Using iPhoto on your device, you can share your photos in many ways:
Send photos to other devices
Beam photos, albums, events, journals, and slideshows (send wirelessly) from your device to another iOS device with iPhoto installed. Beaming shares photos in full resolution.
If you have a device that supports AirDrop, you can send photos wirelessly to other iOS devices that use AirDrop. You can use AirDrop to share photos, albums, events, journals, and slideshows. AirDrop shares photos in full resolution.
If you have an iCloud account and you’ve set up My Photo Stream, photos you save to the Camera Roll are sent to all of your devices.
Use photos in other apps on your device
Send your photos to other apps installed on your device, including iMovie and other iPhoto-supported apps.
Use your photos in any app by saving them to the Camera Roll.
Send photos to your computer
Import photos directly into iPhoto or Aperture on your computer.
Save photos to your computer using iTunes.
Share photos on the web
Post photos to your Twitter, Flickr, or Facebook accounts directly from iPhoto. You can add comments when you post photos using iPhoto.
Create a web journal with your photos and publish your journal as a webpage using your iCloud account.
Create a slideshow with your photos and publish your sllideshow as a webpage using your iCloud account.
Email, display, and print photos
Send an email with your photos.
Share photos using the Messages app on your device.
Present your photos as a slideshow with music and transition effects.
View photos on an external display using an HDMI cable adapter or on a TV using AirPlay and Apple TV.
Print photos from your device to a printer that supports AirPrint. Tap > Print and select a printer.
Create books of your photos and order professionally printed and bound copies of them.
Order professional-quality prints, and have them delivered to an address you specify.
Cheers,
- Judy -
How to export and use Arrays in UDS XMLServer and Where is forte.zip?
Hi,
I am able to work fine with simple attributes on a class marked as XMLStruct. But I can't figure out
how to export an Array as SOAP compound data type. Any clues?
Also if any one knows what happend to forte.zip file under FORTE_ROOT/install/lib/java direcory. Its
not there in UDS 5.0? Am I missing some install steps?
Thanks
--ShahzadThe UDS Soap support does not yet include arrays. This is documented in the release notes, and is detailed in the following iPlanet knowledge base article:
http://knowledgebase.iplanet.com/ikb/kb/articles/7655.html -
How to export a user and their schema from one 10g database to another?
Hi,
I would like to export a user and their entire schema from one 10g database to another one. How do I do this?
thx
adamIf you want to export a user and the schema owned to the user, and import to the same user in a different database, or a different user in the same database, you can use the exp and imp commands as described in the Utilities manual.
These commands are very versatile and have a lot of options - well worth learning properly. To give you a simplistic shortcut, see below - I create a user 'test_move', create some objects in the schema, export, create a new user in the database 'new_move' and import.
oracle@fuzzy:~> sqlplus system/?????
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 11 21:46:54 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> create user test_move identified by test_move;
User created.
SQL> grant create session, resource to test_move;
Grant succeeded.
SQL> connect test_move/test_move
Connected.
SQL> create table test (x number);
Table created.
SQL> insert into test values (1);
1 row created.
SQL> exit
Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
oracle@fuzzy:~> exp system/????? file=exp.dmp owner=test_move
Export: Release 10.2.0.1.0 - Production on Sat Mar 11 21:48:34 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user TEST_MOVE
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user TEST_MOVE
About to export TEST_MOVE's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export TEST_MOVE's tables via Conventional Path ...
. . exporting table TEST 1 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.
oracle@fuzzy:~> sqlplus system/?????
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 11 21:49:23 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> create user new_move identified by new_move;
User created.
SQL> grant create session, resource to new_move;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
oracle@fuzzy:~> imp system/????? file=exp.dmp fromuser=test_move touser=new_move
Import: Release 10.2.0.1.0 - Production on Sat Mar 11 21:50:12 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Export file created by EXPORT:V10.02.01 via conventional path
import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
. importing TEST_MOVE's objects into NEW_MOVE
. . importing table "TEST" 1 rows imported
Import terminated successfully without warnings.
oracle@fuzzy:~> If moving between databases, remember to set the SID properly before the import. If keeping the same userid, skip the from/to stuff in the import.
There are many variations on the theme ...
You can simplify this. You can select tables individually. You can use a parameter file. You can transport all the constraints and data. You can skip the data and only move the definitions. You can get some help (imp/exp help=yes).
And, if it's all 10g, there is a new and improved facility called expdp/impdp (dp = data pump) which has a lot more capability as well, including direct transfer (no intermediate file) together with suspend/restart. Also documented in the Utilities manual. -
How to export all the views in one schema?
Hi,
I have more than 1000 views in one shcema.
How to export all the views in one schema?
AmyHi,
It's not a very easy question, I have develop a script wich create a script to create view from old database to new database :
/* &1: Oracle SID Source
/* &2: Oracle Schema Source
SET HEAD OFF
SET VERIFY OFF
SET PAGESIZE 0
SET LONG 40000000
SET LONGCHUNKSIZE 2000
SET LINESIZE 2000
SET FEEDBACK OFF
CREATE TABLE RECREATE_VIEW(VIEW_NAME VARCHAR2(30), TEXT LONG);
/* Selection du texte de la vue */
DECLARE
w_text long;
w_text_debut long;
w_text_column long;
w_view varchar2 (30);
w_schema varchar2 (8):='&2';
CURSOR w_cursor IS
SELECT a.view_name, a.text
FROM dba_views a
WHERE a.owner = w_schema;
CURSOR w_column IS
SELECT DECODE (ROWNUM,
1, 'CREATE OR REPLACE FORCE VIEW ' || '&' || '1..'
|| a.table_name || chr(10)
|| '('
|| a.column_name
|| DECODE (ROWNUM, nbcolumns, ')' || chr(10) || 'AS' || chr(10), ',' || chr(10))
FROM (select column_name,table_name
FROM dba_tab_columns
WHERE owner = '&1'
AND table_name = w_view
order by column_id ) a,
(SELECT COUNT (1) nbcolumns
FROM dba_tab_columns
WHERE owner = '&1'
AND table_name = w_view
GROUP BY owner, table_name) b
order by rownum;
BEGIN
OPEN w_cursor;
LOOP
FETCH w_cursor INTO w_view, w_text;
EXIT WHEN w_cursor%NOTFOUND;
w_text_debut := NULL;
w_text_column := NULL;
OPEN w_column;
LOOP
FETCH w_column INTO w_text_column;
EXIT WHEN w_column%NOTFOUND;
w_text_debut := w_text_debut || w_text_column || ' ';
w_text_column := NULL;
END LOOP;
CLOSE w_column;
w_text := w_text_debut||w_text||';';
insert into RECREATE_VIEW(VIEW_NAME, TEXT) VALUES (w_view, w_text);
COMMIT;
w_text := NULL;
w_view := NULL;
END LOOP;
CLOSE w_cursor;
END;
SPOOL scripts_views_&1..sql
PROMPT SPOOL scripts_views_&1..log
PROMPT
SELECT TEXT
FROM RECREATE_VIEW;
PROMPT
PROMPT SPOOL OFF
PROMPT
SPOOL off
PROMPT /* Formattage du fichier SQL */
!sed 's/[ ]*$//' scripts_views_&1..sql > aprilia.tmp
!rm scripts_views_&1..sql
!mv aprilia.tmp scripts_views_&1..sql
DROP TABLE RECREATE_VIEW;
EXIT
I hope that help you.
Nicolas. -
How to export and import java class?
-- OS: RHEL5, Oracle 10.2.0.5
Dear!
I've got one schema contains only java and java-source, with some table object.
Now, I'd like to find the way to export java class and import into the other database, however, I can not find the best way without datapump. My purpose is only export java class (not include java source, the other object). I tried to use dbms_metadata, but not worked with java.
May you show me some thing about that?
Thank you!Thank you for your reply!
As I posted below, I tried to get from dbms_metatdata, but could not. So, please view an example:
system@CLOUD> col object_name format a15
system@CLOUD> col object_type format a15
system@CLOUD> select object_name, object_type, status from dba_objects
2 where owner='CLOUD_ADMIN'
3 and object_type like 'JAVA%'
4 and object_name like 'Ba%'
5 /
OBJECT_NAME OBJECT_TYPE STATUS
Base64 JAVA CLASS VALID
Base64 JAVA SOURCE VALID
system@CLOUD> select dbms_metadata.get_ddl('JAVA CLASS','Base64','CLOUD_ADMIN
2 from dual;
DBMS_METADATA.GET_DDL('JAVA_CLASS','BASE64','CLOUD_ADMIN')
BEGIN NULL; END;Well, the dbms_metadata did not get ddl from java class, but only Java-Source!
Example:
system@CLOUD> ed
Wrote file afiedt.buf
1 select dbms_metadata.get_ddl('JAVA_SOURCE','Base64','CLOUD_ADMIN')
2* from dual
system@CLOUD> /
DBMS_METADATA.GET_DDL('JAVA_SOURCE','BASE64','CLOUD_ADMIN')
CREATE JAVA SOURCE NAMED "CLOUD_ADMIN"."Base64" AS
// To modify this template, edit file JavaS.txt in TEMPLATE// directory of SQL
Navigator//// Purpose: Briefly explain the functionality of the procedure//// MO
DIFICATION HISTORY// Person Date Comments// --------- ------ --------
-----------------------------------//import java.lang.*;import java.io.Unsupport
edEncodingException;public class Base64 { //private static int FACTOR =6;
private final static String LANGUAGE = "ISO8859_1"; public static String
cvt = "opqrstEFGHIJKLMNOPQRSAB3456CDTUVWXYZabcdefghijklmnuvwxyz012789-_";
private static int fillchar1 = '.'; private static int fillchar2 = '.';
public Base64(){}; public static String byteArrayToString(byte[]
input)
throws UnsupportedEncodingException{ if (input != null) return new String
(input, LANGUAGE); else return null; } public static byte[]
stringToByteArray(String input) throws UnsupportedEncodingException{ if
(input != null) return input.getBytes(LANGUAGE); else return null;
} public static String encode(String s) { try {
byte[] data = stringToByteArray(s); int c;
int len = data.length; StringBuffer ret = new StringB
uffer(((len / 3) + 1) * 4); for (int i = 0; i < len; ++i) {
c = (data[i] >> 2) & 0x3f; ret.appe
nd(cvt.charAt(c)); c = (data[i] << 4) & 0x3f;
if (++i < len) c |= (data[i] >> 4) & 0x0f
; ret.append(cvt.charAt(c)); if (i
< len) { c = (data[i] << 2) & 0x3f;
if (++i < len) c |= (data[i] >> 6) & 0
x03; ret.append(cvt.charAt(c));
} else { ++i; ret.append
..... -
How to Discoverer change workbook owner?
Using:
OracleBI Discoverer 10g (10.1.2.1)
Oracle Business Intelligence Discoverer Plus 10g (10.1.2.48.18)
Discoverer Model - 10.1.2.48.18
Discoverer Server - 10.1.2.48.18
End User Layer - 5.1.1.0.0.0
End User Layer Library - 10.1.2.48.18
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
How does one change the owner of a workbook?
The problem is when a user changes their name, then there Oracle database user name changes. The user needs to keep both user names. So
the reports must be re-assigned to the new user name and given access to the old user name that has ownership of the report.
Thanks.A) One way of doing this is to share the workbooks to the new userid and then the new userid saves th
em to the database as their own.
Ensure new userid is created with the EXACT same privileges as the old userid. The Discoverer Administrator must ensure the new userid has security to the EXACT same Business Areas and the same privileges as the old userid.
B)
1. Ensure new userid is created with the EXACT same privileges as the old userid. The Discoverer Administrator must ensure the new userid has security to the EXACT same Business Areas and the same privileges as the old userid.
2. The Discoverer Administrator must export the workbooks File - Export to an .eex file and generate an XML file.
3. The Discoverer Administrator must open the .eex file in Notepad or Wordpad and find the old userid and change manually to the new userid.
4. The Discoverer Administrator then imports File - Import the workbooks back into the EUL.
a) File -> Import
b) Add File
c) The .eex file that was just changed
d) Next
e) Step 2 here is very IMPORTANT ***" Only take ownership if original owner cannot be found "***
****CHECK THIS****
f) Start
g) Finish
5. Login with new userid into Desktop or Plus and then Open an existing workbook from the database and confirm all workbooks are there.
6. The first time you run the workbook Discoverer will prompt with 3 choices:
a) Open the workbook in the account where it was saved.
b) Open the workbook in the current database account. *** CHOOSE this one ***
c) Don't open the workbook.
*** Choose B and confirm the workbook can be seen and runs correctly. *** -
How to export a data as an XML file from oracle data base?
could u pls tell me the step by step procedure for following questions...? how to export a data as an XML file from oracle data base? is it possible? plz tell me itz urgent requirement...
Thankz in advance
BalaSQL> SELECT * FROM v$version;
BANNER
Oracle DATABASE 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS FOR 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
5 rows selected.
SQL> CREATE OR REPLACE directory utldata AS 'C:\temp';
Directory created.
SQL> declare
2 doc DBMS_XMLDOM.DOMDocument;
3 xdata XMLTYPE;
4
5 CURSOR xmlcur IS
6 SELECT xmlelement("Employee",XMLAttributes('http://www.w3.org/2001/XMLSchema' AS "xmlns:xsi",
7 'http://www.oracle.com/Employee.xsd' AS "xsi:nonamespaceSchemaLocation")
8 ,xmlelement("EmployeeNumber",e.empno)
9 ,xmlelement("EmployeeName",e.ename)
10 ,xmlelement("Department",xmlelement("DepartmentName",d.dname)
11 ,xmlelement("Location",d.loc)
12 )
13 )
14 FROM emp e
15 , dept d
16 WHERE e.DEPTNO=d.DEPTNO;
17
18 begin
19 OPEN xmlcur;
20 FETCH xmlcur INTO xdata;
21 CLOSE xmlcur;
22 doc := DBMS_XMLDOM.NewDOMDocument(xdata);
23 DBMS_XMLDOM.WRITETOFILE(doc, 'UTLDATA/marco.xml');
24 end;
25 /
PL/SQL procedure successfully completed.
.
Maybe you are looking for
-
I gotta problem with security question recovery email I'd, mistakenly I entered wrong email I'd so now I want to edit that I'd plz help me
-
Help with converting pdf to word please
When I convert a pdf file to word, the document is showing some pages as corrupt?
-
Uninstalling programs like Photoshop
Hi Everyone, and Happy Holidays I am upgrading from Adobe CS1 to CS4, and want to know if I simply just drag the old application icons to the trash and empty it out to completely uninstall the old programs. Thank you or your time and assistance!
-
Hi All, I have one requirement, In the ALV report output if user selects one record and press one push button, a pop up should come Ex: If user selects SO and press DELETE button, then a pop up screen should come with all the serial nubers related to
-
[SOLVED]Archlinux live boot failed on HP mini 2133
Hello, everyone! I am new here, and also newbie on linux. I found archlinux much fast on my pc. So I would like to install it on my netbook HP mini 2133. But I finally not boot failure on it. I record the booting up process into a video with my phon