RESTORE DATABASE Example. MS SQL is a pain, pain, pain.
Hint: Use e.g.
RESTORE FILELISTONLY FROM DISK='C:\MyData.bak'
to get the necessary information.
Here the command from the cited blog entry:
ALTER DATABASE MyData
SET SINGLE_USER WITH
ROLLBACK IMMEDIATE
RESTORE DATABASE MyData
FROM DISK = 'C\:BackupMyData.bak'
WITH MOVE 'MyData_Data' TO 'C:\Data\datafile.mdf',
MOVE 'MyData_Log' TO 'C:\Data\logfile.ldf',
REPLACE
Exception Handling with Spring and Log4J
How to log exceptions. This technique will log messages to your server log file, send an email, with the tag stack of the error, for error level warnings and display a generic page to the user.
First step is to set up Log4j.
Make sure you have the following classes in application lib or common server lib.
activation.jar
This can be got from http://java.sun.com/products/javabeans/jaf/downloads/index.html
Set up your log4J configuration file, put this file in your WEB-INF directory
...and welcome to We Are What We do, a new movement inspiring people to use their everyday actions to change the world. We're not talking moving big mountains. More of a gentle nudge from the corner desk. A little prod from the sofa. A gentle push from the PE room.
So go on then! Track an action, share, connect.
Where possible, creating Web applications — including Ajax-based applications — in a RESTful way avoids a large class of bugs. However, a pitfall of REST (REpresentational State Transfer) is sending duplicate data across similar XMLHttpRequests. This tip shows how the moderate use of session cookies can maintain just enough server-side state to significantly reduce client-server traffic, while still allowing fallback to cookie-free operation.