aspose file tools*
The moose likes JDBC and the fly likes Restore problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Restore problem" Watch "Restore problem" New topic
Author

Restore problem

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
when i am going to dreate a database schema it gives this error


here is the schema file

-- Sakila Sample Database Schema
-- Version 0.8

-- Copyright (c) 2006, MySQL AB
-- All rights reserved.

-- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

-- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-- * Neither the name of MySQL AB nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



where is the error?
Vinod K Singh
Ranch Hand

Joined: Sep 30, 2008
Posts: 198
How you are trying to run this script, via JDBC ? It would be better if this script is run using MySQL client tools.


My Blog
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39436
    
  28
Beware of long lines inside your code tags; the disclaimer is so long it makes the code difficult to read; I have moved the code tag to reduce that problem.
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
I don't understand what are you saying.I am trying to execute this file using Mysql Restore tab.
Anyway can you show which lines should i romove?
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

DROP SCHEMA is synonym to DROP DATABASE as of MySQL 5.02. What is the version you are using. Check the documentation


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
MySQL 5.0
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

Samanthi perera wrote:MySQL 5.0

Then try DROP DATABASE instead DROP SCHEMA
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
I change DROP SCHEMA to DROP DATABASE.
But then it stuck when i am going to run the file.still give Error


Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
I created Schema named sakila on Mysql manual and run this file.
then it run with Warnings.Anyway it created some tabels.But here are the Warinings
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

It looks like those warnings have something to do with syntaxes. So you should check the documentation of your MySQL for that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Restore problem