How to create database from .sql file

how to create database from .sql file..?? i put the sintax query in a sql file.. and i want to call it in java code..
ho to do it..??

why do you want to do this from java?
i just don't see the point.
find your dba and have him/her run it for you

Similar Messages

  • How to create database from scratch using user input

    what I am trying to do is to create database via my java code (using hibernate and my sql) and based on user input.
    The details like the name of table.... or the number of columns in it are all supposed to be determined from user input (only the first time).
    On subsequent run the program should remember the previously created database and hence work with it.
    Can somebody help me through this?
    Suppose I did create it using firing queries from my program then the next problem is how my program would start up next time......?????

    Anuvrat wrote:
    what I am trying to do is to create database via my java code (using hibernate and my sql) and based on user input.
    The details like the name of table.... or the number of columns in it are all supposed to be determined from user input (only the first time).
    On subsequent run the program should remember the previously created database and hence work with it.
    Can somebody help me through this?Presumably because you want to (fun) rather than because you need to (job or project.)
    If the second then don't do it.
    >
    Suppose I did create it using firing queries from my program then the next problem is how my program would start up next time......?????You would start by learning about DDL which is the common name for the languages, which vary by database, used to create the entities that represent the structure of a database. Until you figure out the syntax of that you can't do anything in java.

  • How to create Exe From Data files

    my requirement is very much similar to registration of file extension.
    lets say if you have a file with extension .xyz then you can decide which program should invoke .xyz but instead of any other extension i need that extension of my file should be .exe
    and when user double clicks on this exe files the file should get opened with my own program, but if the file is true .exe (i.e. Created by some other program) then it should not get invoked by my program...
    i dont know how to do this but i know this is possible
    e.g. Flash can create an exe files from their .swf files which when opened run using flash player (but it doesnt get fooled by any .exe file. also flash exe files have different icons)
    similarly winzip can create self extracting exe files from .zip files
    can anybody help me out
    the files i am trying to create will have numeric data in spreadsheet format and when launched the player will show the data in animated format.
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

    i think i will briefly describe the things; what exactly i want to acheive
    my client will have one application which will acquire data and log them into files. but he want to distibute these files to other people who will not have the application developed by me.
    he wants that file should show the reports in specific way. but to see those reports end user should not be required to install any specific application.
    i know that this thing is possible. as per msdn developer can include any data (text, graphics, audio, video etc.) inside exe in the form of resource file. (and there are programs are avaiable on internet which allow to extract, edit, add resource files inside exe)
    what i dont know right now is how i can access the resource file inside exe
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

  • How to create PDF from text file with specific layout?

    I wanted to create the pdf from text file in specific layout - Landscape orientation and JIS B3 Page size while at Adobe Acrobat Pro.
    In past, I could do a right click on a text file (desktop area) and select print to print out the document into .pdf BUT only if I set the Adobe PDF to Landscape and JIS B3 Page size BEFORE.  And I could only do 15 text documents at once.
    I wanted to see if I could do the create the pdf from text file with specific layout in Adobe Acrobat without having to go to Control Panel to preset the Adobe PDF to specific layout at every time.   I would have to set Adobe PDF back to normal layout after I'm done with these pdf print outs.  I do lots of pdfs in normal layout.  Sometimes I would forget to do that.
    So, How do I do that?

    No such luck.  It would output the contents in letter size even in JIS B3 Page layout at MS word. 
    Is there a script or action where I could set the orientation and page size before creating PDF on these text files?

  • How to Create Hierarchy From Flat file Structure

    Hi Gurus,
    There is a scenario for me regarding the Hierarchy.
    Required Hierarchy structure - Region>Director>Manager-->Sales id
    I have flat file which gives the info like user id , sales id , manager id, director id.
    But the transaction data Flat file has structure with sales id, region id, sales amt, sales qty.
    Note : Region id is another Master Data.
    How i can create hierarchy from the first flat file which doesnot have region info in that but it is available in the transaction data Flat file.
    Is there anyway we can create hierarchy based on the first Flat file structure which contains more that 1,00,000 records.
    Try to Suggest me in this regard .
    This is urgent.
    Regards,
    Mano

    Hi Mano,
                    Defining the source system from which to load data
    Choose the source system tree File  ® Create.
           2.      Defining the InfoSource for which you want to load data
    Optional: choose InfoSource Tree ® Root (InfoSources) ® Create Application Components.
    Choose InfoSource Tree ® Your Application Component ® Other Functions  ® Create InfoSource 3.x ® Direct Update.
    Choose an InfoObject from the proposal list, and specify a name and a description.
           3.      Assigning the source system to the InfoSource
    Choose InfoSource Tree ® Your Application Component ® Your InfoSource ® Assign Source System. The transfer structure maintenance screen appears.
    The system automatically generates DataSources for the three different data types to which you can load data.
    ○       Attributes
    ○       Texts
    ○       Hierarchies (if the InfoObject has access to hierarchies)
    The system automatically generates the transfer structure, the transfer rules, and the communication structure (for attributes and texts).
           4.      Maintaining the transfer structure / transfer rules
    Select the DataSource for uploading hierarchies.
    IDoc transfer method: The system automatically generates a proposal for the DataSource and the transfer structure. This consists of an entry for the InfoObject for which hierarchies are loaded. With this transfer method, the structure is converted to the structure of the PSA during loading, which affects performance.
    PSA transfer method: The transfer methods and the communication structure are also generated here.
           5.      Maintaining the hierarchy
    Choose Hierarchy Maintenance, and specify a technical name and a description of the hierarchy
    Hope this helps
    Regards
    Karthik
    Assign points if Helpful

  • How to create database from servlet?

    Hey all,
    I want to create database and store the tables in that database.
    I don't have idea.
    any help..
    the concern is...
    I am using WSAD as a IDE.my backend is Oracle.
    First ,I need to check if user having ms-access in his system.if yes
    then I need to create datbase in that ..and store some tables in that database .
    any sample code snippet helpful for me..

    ok.Thank you.
    I am developing business application.The users enter some data.and I am storing that data into the oracle database.
    for every month...they need to check again that data and validate.
    for that...I want to create MS-access connection and get (oracle ) those data and store in ms-access ,I need to give link for that data to validate them. after that I will update.
    I don't have any idea how to store the data after i am retrieving data from the oracle database.how to generate link to that.
    now...I am trying to create database connection to the MS-ACCESS.I am
    using WSAD 5.1.2 VERSION.and jdk 1.4 version.
    below is my code..for connecting ms-access..
                        System.out.println("start connect");
                        try {
                             Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
                        } catch (Exception e1) {
                             e1.printStackTrace();
                        System.out.println("connected..");
                   Connection con=DriverManager.getConnection("jdbc:odbc:msd","","");
                   Statement stmt=con.createStatement();
                   result=stmt.execute("create table test(col1 char(10))");
                   System.out.println("the success");
    its giving below error. I know that the classpath error.But where I need to give that classpath .I think I need to get driver software from somewhere.please any suggestions......
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at java.lang.Class.forName1(Native Method)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at java.lang.Class.forName(Class.java(Compiled Code))
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.philips.servlets.DBGenerationServlet.dbCreate(DBGenerationServlet.java:102)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.philips.servlets.DBGenerationServlet.doPost(DBGenerationServlet.java:87)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.philips.servlets.DBGenerationServlet.doGet(DBGenerationServlet.java:73)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/7/06

  • How to recover database from .mdf file

    create a database of
    equal size to the one you're trying to attach
    shutdown the server (Stop)
    swap in the old mdf file (replace new .mdf file with .mdf file to be recovered )
    Location: C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA
    bring up the server (start) and let the database attempt to be recovered and then go into suspect mode
    put the database into emergency mode with ALTER DATABASE
    run DBCC CHECKDB (dbname, REPAIR_ALLOW_DATA_LOSS) which will rebuild the log and run full repair
    Your database will be available again but you'll have lost data and the data won't be transactionally consistent
    USE [master]
    GO
    ALTER DATABASE [RdmStoreInformation] SET EMERGENCY
    GO
    ALTER DATABASE [RdmStoreInformation] SET SINGLE_USER
    GO
    DBCC CHECKDB ([RdmStoreInformation], REPAIR_ALLOW_DATA_LOSS)
    GO
    ALTER DATABASE [RdmStoreInformation] SET MULTI_USER
    GO
    ALTER DATABASE [RdmStoreInformation] SET ONLINE
    GO
    This is a issue I had to fix and it's solution listed here for your reference(I gathered all the In-formations by surfing web)

    Interesting, did you get any errors trying to attach the .mdf file?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to create table from .ini file

    Hi,
    The file *.ini generates a Multicolumn Listbox where is indicated a number (variable) of tables with them characteristics (row and column) as in the picture below.
    I need to find the way to create automatically, on word file, the tables as indicated in the *.ini file. Do you think that it could be possible? That you know, exist a Macro to do this?
    Best regards
    Attachments:
    Multicolunms .png ‏8 KB

    As Taki said above, to do this you need to use the Report Generation Toolkit. This will allow you to generate tables in a word document. Look for the examples in the LabVIEW Help for a rough idea of how to use the toolkit and if you have any specific questions after that then feel free to post them here.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • If ur database crash u have only export of database how u create database f

    if ur database crash u have only export of database how u create database from starting with help of export give steps

    What is an "export give steps?"
    If ur's database crashes, how is it u's responsibility to restore it?
    Now, if my database crashes, I just restart it in crash recovery mode and not even worry about the backup or export. It is not needed.

  • How to create database link from oracle to sql server

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal
    Hi Vishal,
    I found a lof of information regarding how to create a database link from Oracle to SQL Server, please see:
    https://www.google.co.in/?gws_rd=cr&ei=vd3XUvGFO8TgkAXqlYCADg#q=how+to+create+database+link+from+oracle+to+sql+server
    We discuss SQL Server related issue in this forum. If you have any more question regarding Oracle, please post it in Oracle communities forum for better support.
    Regards,
    Elvis Long
    TechNet Community Support

  • How can get a database like ****.SQL file for test in sqlplus in oracle8i

    How can get a database like ****.SQL file for test in sqlplus in oracle8i,I am a beginner,thanks

    I'll give it a guess as to what it is you want but I'm afraid you'll have to give some more information to go on. I appreciate it's difficult for people who are beginners or who don't have English as their first language.
    Are you trying to run a SQL file? From SQL*plus you can do either of these:
    SQL> start my_file
    or
    SQL> @my_file
    N.B.: if th efile has a .sql extension you don't need to include it, but you do for any other file extension e.g.
    SQL> @myfile.run
    Here is the page Vijay referred to:
    Re: Physical storage Checks & adding disk on server. I hope you find it useful.
    You will more helpful links (including links to the Oracle on-line manuals at this page:
    Re: How to attach a java bean in forms6i
    good luck, APC

  • How to insert data from *.dmp file to  oracle 11g using Oracle SQL Develope

    hi
    i backup my database using PL/SQL developer and made *.dmp file
    how to insert data from *.dmp file to oracle 11g using Oracle SQL Developer 2.1.1.64
    and how to make *.dmp file from sql*plus ?
    thanks in advance

    Pl/Sql developer has a config window, there you choose the exec to do the import/export.
    Find it and his home version, it may be exp or expdp, the home version is the version of the client where the exp executable is.
    Then use the same version of imp or impdp to execute the import, you do not need to use Oracle SQL Developer 2.1.1.64. If you want to use it, you must have the same version in the oracle home that exp/imp of sql developer use.

  • How to select data from Sql server 2005 database tableinto oracle database table

    Hi,
    I have table text1 in sql server database and text2 in oracle database (11g). Now how to move data from SQL Server table into oracle table. So please help me how to do it.
    Thanks a lot in advance.
    rk
    OS: Windows 7 professional

    Hi,
    you can use export/import wizard and specify sql server as a source and oracle as destination.
    I hope this is helpful.
    Please Mark it as Answered if it answered your question
    OR mark it as Helpful if it help you to solve your problem
    Elmozamil Elamir Hamid
    MCSE Data Platform
    MCITP: SQL Server 2008 Administration/Development
    MCSA SQL Server 2012
    MCTS: SQL Server Administration/Development
    MyBlog

  • How to generate XML file from SQL file !

    I am new to XML publisher. I known one way to generate XML file is register one report file in concurrent manager.
    But I want to generate XML file from sql file.
    Could someone show me how to code in sql file, how to register is in concurrent manager.
    Thanks !

    Hi
    Phew ... not sure we have the space here. So I can point you in the right direction:
    1. XML data generation - there are two packages in the db you can use with a plsql procedure, XMLGEN and SQL XML. You can also use java APIs too. Try checking the db documentation and search for the above methods.
    2. Registering the report - the system administrators guide will provide this info. Hooking the program up with XMLP is covered here - http://www.oracle.com/technology/products/applications/publishing/resource/CM%20Whitepaper5.0.pdf
    Regards, Tim

  • How to Migrate my database from SQL Server 2000 to Oracle

    I want to transfer my database from SQL Server 2000 to Oracle, Can I do this without using Oracle Migration Workbench ??
    Please help me.
    Thanks in advance
    Vicky... :-)

    Do you have a good technical reason for not wanting to use the Migration Workbench?
    Given that it's free and does a hell of a lot of the work for you, why wouldn't you use it?
    Other than that, I would say you would be on your own...
    cheers,
    Anthony

Maybe you are looking for

  • 3rd party cookies in safari

    A web site owner wants to include my .Net web site in an iframe on their site. My site is on a different domain and so current security restrictions in Safari prevent my site from loading because it uses cookies for the .Net sessions. The parent site

  • Not able to connect to My SQL from CIM in ATG 10.2

    Hi, I have installed ATG10.2 and trying to configure MySQL database with cim. I have given all the details as per the documentation. After creating the database connection for production_core, i have tried to test the connection but it says that   >>

  • Payload from Two diff Outbound interfaces and Business Service

    Hi All: I created a scenario....where messge is coming from two diff outbound message interface..and have only one inbound inteface... Message_One is coming from one OA interface. Message_Two is coming from other OA interface. I am using only one Inb

  • Digital I/O of PCI 6224

    Actually I have a small doubt regarding PCI 6224.So far I have seen that the digital pins are only used for frequency measurement and PWM generation. But there are 48 digital pins which is more compared to analog pins. so can you suggest me some new

  • Crm ic error message cant be displayed

    hi guys , i have a problem y want to display an error message in my interaction center error area and i put this code portion IF IS_ORDERADM_H_WRK-PROCESS_TYPE EQ 'ZIOR'. SELECT SINGLE OBJECT_ID INTO NUMOPERACION FROM CRMD_ORDERADM_H WHERE PROCESS_TY