| Author |
Importing a SQLServer Schema using java
|
Ronan Dowd
Ranch Hand
Joined: Jan 21, 2006
Posts: 84
|
|
Hi All,
Does Java have any support for importing a SQL Server database ?
I have a SQL Server database schema which I've backed up. So it's called something like "ms-schema.bak"
Basically my application needs to take in as input a database backup (i.e a bak file) and actually restore the database
Any help would be great on this..
Thanks, Ro.
|
SCJP 1.4 | OCWCD JEE 5
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16813
|
|
Here is the JDBC driver for SQL server...
http://msdn.microsoft.com/en-us/data/aa937724.aspx
With this, you should be able to get to SQL server, with Java via JDBC. Now, how to do the restore and stuff, I guess that is a SQL server capability.
Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
Steve Luke
Bartender
Joined: Jan 28, 2003
Posts: 3090
|
|
I did a little search, and it seems that there are SQL commands for restoring a database. See: this Google Search. What commands and how to use them depend on version of SQL Server, and where your files are stored.
Some of those search returns suggest there is a command line you can use to restore a DB, but I didn't read enough to know if it was custom written, builtin to the the SQL Server bin directory, or a third party product.
|
Steve
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19232
|
|
|
Moving to JDBC
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Importing a SQLServer Schema using java
|
|
|