We help IT Professionals succeed at work.

how to import ddl scripts into schema

gudii9 asked
Medium Priority
Last Modified: 2013-12-18

I have newly created schema/user and granted all privileges to it.  I would like to import DDL scripts to create table structure, indexes, triggers etc. How can import the DDL script using Toad or SqlDeveloper. When I use Sql Plus fot that purpose it  always saying cannot open the file when i give like
@ C:\Users\user_xyz\abc.sql

Any ideas, suggestions, links, syntax highly appreciated. Thanks in advance
Watch Question

1) connect to the schema in which you want to execute DDL script in toad or sqldeveloper, and then open abc.sql  and click at execute script button (or menu).

2) is this file available at C:\ check it and then try @C:\Users\user_xyz\abc.sql
check the file name and extension also.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Is there a a option to import entire .sql script file from its location to create table structure etc. Please advise

yes, click at open in toad or sqldeveloper and select the .sql file and then execute it
I would recommed SQL* plus.  you can use drag and drop option to run the SQL. Just open the sql plus window (remember it is not SQL* plus for windows i.e. sqlplusw.exe rather it is sqlplus.exe --- you can open the command window from run option and then type sqlplus). open the folder, where your sql script is. go to sql prompt and put @ sign and come back to the folder where the script is, just drag the script and drop at your SQL* plus window and press enter.
hope this help


in sqlloader there is button at top which says 'execute as script ' apart from 'execute' which is running entire  ddl sql script ( ddl sql script generated from toad  client  tool version using option Database--->Export--->Generate Schema Script....on other note when i revisited toad tool today to same schema with all same settings, after 1 day  i cannot see that option now any more ) which consist of like 10 sequences and then 10 tables and then10 triggers etc. ( does after each and every sequence, table,trigger do I need to keep delimitter like'/ '...i tried with or without both ways...toad did not generate sql ddl script with '/' in between) I was able to create corresponding structure from  sql ddl script successfully in sql loader by using 'execute script' button. In toad  I created new schema, granted  all privileges and tried to run the  sql ddl script to generate structure. But i do not see button like 'execute script' there. When i copy paste or open the script file from file---->open file.... and execute saying invalid character ora 0091. When take only part of script generating only first sequence not all. Can you please advise on how can I regenerate entire ddl schema script  file and how can i run using Toad entire generated ddl script. Thanks in advance. Any screenshots, syntax, step by step procedure is appreciated.



thank you very much. I appreciate your help.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.