How to export database schema?
I'm running a developer SQL Server 2012 Express version on my PC. I've restored a sample .bak database to this server. How or is there a way to export out the database schema or how all of the tables are interconnected/linked together out?
hi,
you can generate the DDL of the objects in your database using SQL Server Management Studio... select your database node, rx click, "Tasks->Generate Script"... the "Generate and Publish script" wizard will prompt you... in the "Set Scripting Options"
task, you can access the "Advanced" dialog, where you can interact a little on "how" the output will be generated..
as regards the "way" to understand how the objects are "interconnected", you can access the "Database Diagram" dialog... create a new one for your database, add all desired/required objects, and they will be "rendered" as objects on a window showing all
relationships (in the meaning of SQL relationships) among them... this feature is not as powerfull as in full comercial tools like erWin or the like, but it's a nice one..
regards
http://www.asql.biz - DbaMgr2k - DbaMgr and further SQL Tools http://www.hotelsole.com/
Similar Messages
-
Hello
How to export database in one line query in command Prompt. Again i explain Single Line Query. I have some Problem in it.
ThanksHi
It comes bundled with 10g DB Software so when you install your DB software it is automatically installed and available to you.
Follow this link to get more info on EXPDP
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_overview.htm
Cheers -
SOS!! How to export a schema while the SYSAUX tablespace is offline?
Hello,
the SYSAUX for one of our productive database became corrupted and I had to take it offline in order to open the database. There is no way to recover it since there are missing archive logs from the sequence.
So I need to export a database schema which holds all the productive tables/indexes (there are no procedure, functions, packages, triggers,etc - just tables, constraints and indexes).
When I try to export the schema, I get the following error:
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in UTF8 character set and UTF8 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user CMS31_ARMENTEL_SITE_N
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user CMS31_ARMENTEL_SITE_N
About to export CMS31_ARMENTEL_SITE_N's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
EXP-00056: ORACLE error 376 encountered
ORA-00376: file 3 cannot be read at this time
ORA-01110: data file 3: '/opt/data1/oradata/UTF8/sysaux01.dbf'
ORA-06512: at "SYS.DBMS_METADATA", line 1511
ORA-06512: at "SYS.DBMS_METADATA", line 1548
ORA-06512: at "SYS.DBMS_METADATA", line 1864
ORA-06512: at "SYS.DBMS_METADATA", line 3707
ORA-06512: at "SYS.DBMS_METADATA", line 3689
ORA-06512: at line 1
EXP-00000: Export terminated unsuccessfully
I've tried direct export, data pump (expdp) but with the same unsucessfull results.
Is there any way to use the export or expdp utility to get the actual data from a specific schema ?
Many thanksHello Harry and many thanks for your reply.
EXCLUDE is an option of expdp not exp. So I used expdp and get the following error:
expdp impexp/blabla dumpfile=SITE_N.dmp schemas=SITE_N exclude=CLUSTER:SITE_N
Export: Release 10.1.0.2.0 - Production on Tuesday, 29 January, 2008 20:56
Copyright (c) 2003, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
ORA-31626: job does not exist
ORA-31638: cannot attach to job SYS_EXPORT_SCHEMA_05 for user IMPEXP
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT_INT", line 377
ORA-39077: unable to subscribe agent KUPC$A_1_20080129205606 to queue "KUPC$C_1_20080129205606"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPC$QUE_INT", line 248
ORA-25448: rule SYS.KUPC$C_1_20080129205606$227 has errors
ORA-00376: file 3 cannot be read at this time
ORA-01110: data file 3: '/opt/data1/oradata/UTF8/sysaux01.dbf'
Different error (since now I use expdp) but for the same reason (SYSAUX is offline)
Regards
Argyris -
How to change database schema of data source in OWB?
Hi,
Could someone give me hint about my questions:
I select many database schema in TOAD. like "My Shema" and "All Schema".
If I create a Oracle Data Source in OWB 10.2. All tables/viewsI can see only from "My Schema" (I think it is default), However, I need to connect "All Scema". There are lots of prod tables/views. I don't know how to set/change/config in OWB even reading guide.
Thanks a lot
LanLan,
You can ONE of the following:
1. Dbl click the src/target module and go to metadata location tab and select a location that has the details pointing to the different schema (If you do not have this location created, you may have to create one).
2. Create synonyms in "My Schema" to objects from other schema. Then try to import the tables again. This time you will be able to see the other tables (the icon will be different for synonyms.)
Hope That Helps.
Kaushik. -
How to export a schema.
Hi guys!
How do I use SQL Developer to export a schema?
I kind of hoped, that I would end up with a file containing a complete setup-script for the schema. This way I would be able to use SQL*Plus to create an empty version of the schema on another server.
Whenever I use Tools -> Export I get a blank file or, if I'm lucky, I get a file containing only my sequences and my packages. But no CREATE TABLE... :-( Even if I've checked "tables" in the tree.
Is this kind of export at all possible with SQL Developer? Or am I doing this all wrong?
SQL Developer version: 1.0.0.14.57
OS: Windows XP Professional SP2
Java version: 1.5.0_05
Oracle IDE: 1.0.0
Best regards.
Soeren LauritsenThe above statement gives me the following (I'm sorry, but my Oracle is in Danish):
SQL> SELECT dbms_metadata.get_ddl('TABLE', 'AREAS', 'username') FROM DUAL;
ERROR:
ORA-04031: kan ikke allokere 65564 byte af fælles hukommelse ("large
pool","unknown object","session heap","kuxLpxAlloc")
ORA-06512: ved "SYS.UTL_XML", linje 0
ORA-06512: ved "SYS.DBMS_METADATA_INT", linje 4157
ORA-06512: ved "SYS.DBMS_METADATA", linje 458
ORA-06512: ved "SYS.DBMS_METADATA", linje 615
ORA-06512: ved "SYS.DBMS_METADATA", linje 1221
ORA-06512: ved linje 1
The english translation should be:
ORA-04031: unable to allocate string bytes of shared memory ("string","string","string","string")
I kind of got the feeling that our Oracle server has a crappy setup. So any suggestions will be given to my DBA.
Best Regards
Soeren -
hi,
I want to do export from the database with only one schema, do anyone know what is the command.
AmyHere you have a complete example to export/import a schema.
[oracle@ozawa bin]$ export ORACLE_SID=LQACNS1
[oracle@ozawa bin]$
[oracle@ozawa bin]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.1.0 - Production on Thu Mar 4 09:43:57 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn / as sysdba
Connected.
SQL>
SQL> create user joelp identified by joelp
2 default tablespace users
3 temporary tablespace temp;
User created.
SQL>
SQL> grant connect, resource to joelp;
Grant succeeded.
SQL>
SQL> conn joelp/joelp
Connected.
SQL>
SQL> create table t1 ( c1 number );
Table created.
SQL> insert into t1 values (10);
1 row created.
SQL> commit;
Commit complete.
SQL> quit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
[oracle@ozawa bin]$
[oracle@ozawa bin]$ exp joelp/joelp file=joel.dmp log=joel.log
Export: Release 9.2.0.1.0 - Production on Thu Mar 4 09:47:40 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user JOELP
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user JOELP
About to export JOELP's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export JOELP's tables via Conventional Path ...
. . exporting table T1 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@ozawa bin]$
[oracle@ozawa bin]$ sqlplus joelp/joelp
SQL*Plus: Release 9.2.0.1.0 - Production on Thu Mar 4 09:48:41 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> drop table t1;
Table dropped.
SQL> quit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
[oracle@ozawa bin]$
[oracle@ozawa bin]$ imp joelp/joelp file=joel.dmp
Import: Release 9.2.0.1.0 - Production on Thu Mar 4 09:49:16 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
import done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
. importing JOELP's objects into JOELP
. . importing table "T1" 1 rows imported
Import terminated successfully without warnings.
[oracle@ozawa bin]$
[oracle@ozawa bin]$ sqlplus joelp/joelp
SQL*Plus: Release 9.2.0.1.0 - Production on Thu Mar 4 09:49:28 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> select * from t1;
C1
10
SQL> quit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
[oracle@ozawa bin]$
[oracle@ozawa bin]$
Joel Pérez
http://otn.oracle.com/experts -
How to Request Database Schema from a Linked DB
How does one Request Database Schema to be added to your workspace when that Schema is in a linked DB ?
You can't do that.
Scott -
How to export database from oracle 9.2 and 10g
Hi,
I want export the database from oracle 9i and 10g.
i tried like....... start button--->run--->exp--->
then it asked password. I have no password to my local database only scott/tiger. i given this, but in one attempt window has closed.
pls guide me how to export data.
Thanks and regards,
Venkat.I have no password to my local database only scott/tigerThen use OS authentication :
C:\>set ORACLE_SID=<your SID>
C:\>exp \"/ as sysdba\" <options>or change passwords, e.g.
C:\>set ORACLE_SID=<your SID>
C:\>sqlplus "/ as sysdba"
SQL> alter user system identified by <new password>; -
How to generate database schema from CMP?
I'm using JDeveloper 10g to design J2EE application in the Up-bottom manner. Then I have written UML model with CMP beans and now I would like deploy the model to the database. Is there a wizard to automaticly generate database schema from CMP beans?
MarekHere are some links that might help you:
The Oracle XML Developer's Kits (XDK) contain the basic building blocks for reading, manipulating, transforming and viewing XML documents. Includes XML Schema Processor: supporting Java, C, and C++, allows use of XML simple and complex datatypes.
http://otn.oracle.com/tech/xml/xdkhome.html
Building Server-Side XML Schema Validation
Discusses how XML Schema can be used within Oracle9i to validate XML documents.
http://otn.oracle.com/tech/xml/xdk_sample/xdksample_093001.html
How XML Schemas Simplify Dynamic Content Management
With XML Schema now a W3C Recommendation, compare Document Type Definitions to XML Schema.
http://otn.oracle.com/tech/xml/htdocs/SchemDTD.html
Regards,
-rh -
Hi experts,
How to copying database without Data.
Its very urgent..pls help out me......
Thanks
VijayUse Transfer database objects task or script the objects out using generate scripts wizard from SSMS and apply them in the new server
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to export user/schema WMSYS
Trying to export WMSYS using datapump. Output is shown below. Need help....
Schema is present and has procedure/functions/types [encripted]/tables etc.
C:\>expdp system@orcl directory=data_pump_dir dumpfile=wmsys.dmp logfile=wmsys.log schemas=wmsys
Export: Release 10.2.0.1.0 - Production on Tuesday, 21 November, 2006 16:53:32
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Password:
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/********@orcl directory=data_pump_dir dumpfile=wmsys.dmp logfile=wmsys
.log schemas=wmsys
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
ORA-39165: Schema WMSYS was not found.
ORA-31655: no data or metadata objects selected for job
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" completed with 2 error(s) at 16:54:15
Also tried with exp. Below is output-
C:\>exp userid=system@orcl owner=wmsys file=c:\oratmp\wmsys.dmp log=C:\oratmp\wmsys.log
Export: Release 10.2.0.1.0 - Production on Tue Nov 21 17:42:41 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Password:
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export specified users ...
EXP-00010: WMSYS is not a valid username
Export terminated successfully with warnings.
Thanks and regards.I have created WMSYS at target but I wanted the objects, the procedures, functions, types tables etc. etc.
I could get them from datadic using metadata package but most of these objects are encrypted. So I thought to export the user itself.
Need suggestions and help.............
Thanks & regards. -
How to export a schema and import the schema to a different schema name
I am using Oracle9i Oracle Enterprise Manager Console.
I can export the HR to a dmp file.
I have created another user call MYHR and I would like to import hr.dmp to the new user.
1. How can I add a schema using OEM?
I can do it by creating a table in MYHR and refresh OEM.
2. How can I import HR.dmp to MYHR using OEM.
I can import it using command line:
imp user/password@connectstring file='c:\hr.dmp' full='Y'
Any hints are appreciatedHi,
1.
You don't have to create a schema explictly.
Say you create a user u1. Now this user u1 create some object s, then the schema u1 is automatically created.
Schema is actually a logical collection of objects.
2.
Why using OEM for importing. Using the command is much more easier.
Your command is bit incorrect. Don't use full=y to import a schema.
Use ; imp userid=user/password@connect_string file=filename fromuser=HR touser=MYHR
Better add "log=some text file". Then use can see the log also.
Regards. -
How to export oracle schema with only TABLE and TABLE DATA
Dear All,
Is possible to export (expdp) all tables in a schema?
Thank you in advanceHi, Yes it is possible:
For example:
expdp user/password direcory=my_dir dumfile=my_dump.dmp tables=schama1.table1,schema1.table2,etc content=metadata_only include=table
OR
expdp system/pass directory=DATA_PUMP dumpfilr=test.dmp log file=test.log schamas=Scahems_name
https://forums.oracle.com/message/4103671#4103671
https://forums.oracle.com/thread/1087857?start=0&tstart=0
ORACLE-BASE - Oracle Data Pump (expdp and impdp) in Oracle Database 10g -
How to export database image from form 9i to excel??
I hv some image sotred as blob in database and want to export them from form to excel
here is my code:
DECLARE
MyApplication OLE2.OBJ_TYPE;
workbooks OLE2.OBJ_TYPE;
workbook OLE2.OBJ_TYPE;
worksheets OLE2.OBJ_TYPE;
worksheet OLE2.OBJ_TYPE;
cell OLE2.OBJ_TYPE;
args OLE2.LIST_TYPE;
args1 OLE2.LIST_TYPE;
args2 OLE2.LIST_TYPE;
pictures OLE2.OBJ_TYPE;
picture OLE2.OBJ_TYPE;
BEGIN
--INITIAL CODE ESTABLISHING THE Excel Object and Workbook/Worksheet
MyApplication := OLE2.CREATE_OBJ('Excel.Application');
OLE2.SET_PROPERTY(MyApplication , 'Visible',1);
workbooks := OLE2.GET_OBJ_PROPERTY(MyApplication ,'Workbooks');
workbook := OLE2.INVOKE_OBJ(workbooks,'Add');
---- START Code to create a work sheet and name it as WorkInstruction ---
worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
worksheet:=OLE2.INVOKE_OBJ(worksheets,'Add');
OLE2.SET_PROPERTY(worksheet , 'Name','WorkInstruction');
OLE2.SET_PROPERTY(MyApplication , 'ActiveSheet','WorkInstruction');
---- END Code to create a work sheet and name it as WorkInstruction ---
worksheets := OLE2.GET_OBJ_PROPERTY(MyApplication ,'ActiveSheet');
OLE2.SET_PROPERTY(worksheets , 'Value','WorkInstruction');
args := OLE2.CREATE_ARGLIST;
--- For Writing Image ---
pictures:=OLE2.INVOKE_OBJ(worksheet,'Pictures');
args2:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args2, 'images.img');<---- it works only on local path/ url???
picture:=ole2.get_obj_property(pictures,'Insert', args2);
OLE2.DESTROY_ARGLIST(args2);
args1 := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args1, 'C:\Documents and Settings\YinHan.Chan\Desktop\EXAMPLE.xls');
OLE2.DESTROY_ARGLIST(args1);
ole2.release_obj(picture);
ole2.release_obj(pictures);
ole2.release_obj(workbook);
ole2.release_obj(workbooks);
ole2.release_obj(worksheets);
ole2.release_obj(worksheets);
OLE2.RELEASE_OBJ(MyApplication);
END;
Please help
thanks
Message was edited by:
user570542I am not seeing where you actually get the image from the db to Excel ...... all what you are doing is passing a file name, but did you already download the file to client machine? if so, consider giving full path instead of file name only !
-
How to export database thru sapinst tools
Hi All,
We are going for unicode conversion of our 4.7 systems, i found that DB have to be exported thru Sapinst tool . How can i start this export and where can i found sapinst tool for DB export.
Any suggestions plz..
Thanks in advance.
Subhash.GHi,
make sure to read the "UNICODE Conversion Guide" you find in the SAPNet (Path: SAP NetWeaver -> SAP NetWeaver in Detail -> Application Platform -> ABAP Technology -> Internationalization -> Unicode Conversion Guides).
There you will also find appropriate Checklists.
Check out if you have a single Code Page system or e.g. a MDMP system (using multiple codepages). MDMP system conversion to Unicode is much more complicated. You may have to build up a vocabulary for your texts in different languages / codepages that are stored in tables without language key column (SPRAS).
Kind regards
Waldemar Gaida
Maybe you are looking for
-
I use iTunes 9.2.1. When I try to redeem my gift card, I get the following error: Your session has timed out. I tried following instructions of changing my time zone, restarting the macbook. Nothing works. HELP!!
-
Want to search a word in a column multiple times ????
Hello All, Want to search a word in column and after that word want to read the values till i encounter blank cell, uptill this i could get the code but then in same column again i have to search for same word and again start reading. In short if i
-
I don't really understand processors, but is the 2.0GHz Quad Core i7 really a better processor in terms of performance? If it has 4 cores why not give it greater processing speed like 2.7 or 3.0 GHz? I am asking because I am thinking about getting th
-
I know that if I uncheck the box next to a song in iTunes it will not be updated when I update my iPod, but if I uncheck the box next to a song on my iPod will it be updated when I run and update? I have much more music on my iPod than on my computer
-
Solved. Palm TX Sync problem
I had previously posted several messages regarding my problems with syncing of my Palm TX. Several solutions were given, but the only thing that had worked was replacing my Palm TX since there were several problems with the unit. Now the replacemen