Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help me to take sql server DB backup using JDBC

Author  Topic 

George_Levis
Starting Member

3 Posts

Posted - 2008-11-12 : 07:29:22
Hi,

I am working in java environment but i am totally new to this SQL. Is it possible to take SQL Server DB backup using JDBC ? If yes, could you help me with some sample code or any java open source tool. I searched through the google and i found some java tools but they don't have this DB backup feature.

Any quick help will be appreciated.

-- George

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2008-11-12 : 08:38:05
Umh...we are talking MS SQL Server here right? SQL Server backups are done using sql commands, and the communication protocol doesn't have anything to do with anything. I've never done any java before but maybe my pseudocode will get you going...:

MyConnection = SomeCodeForCreatingJDBCConnectionObject(connectionstring)
SQL = "BACKUP DATABASE myDatabaseName TO DISK 'd:\backup\filename.bak'"
MyConnection.Execute(SQL)

- Lumbago
Go to Top of Page
   

- Advertisement -