Showing posts with label remote. Show all posts
Showing posts with label remote. Show all posts

Monday, March 26, 2012

Newbie question - Best practices for local/remote development?

Excuse me, I'm a relative newbie.

My question: What's the best practice for developing locally and then uploading to a production web site?"

Here's my plan:

I will use ASP.NET 2.0. I want to use Visual Web Developer 2005 Express Edition to develop locally using SQL Server 2005 Express Edition (.mdf file).

Then I want to upload my changes to a web site that uses the full version of SQL Server 2005 (not the Express Edition.)

I know how to upload my .aspx files to the remote site using Visual Web Developer.

But how should I handle my data? I imagine I can keep a little test data in my local .mdf database, and then just make sure the tables on the remote SQL Server always exactly mirror what I've got locally.

Then I just upload any changed .aspx files, which should work both locally and remotely.

Is this the best way? Or will I have to every time first change something in my .aspx files, to handle the data connection difference between my local db to the remote db?

Much ThanksThe convention is to store your database ConnectionString in the Web.Config file. Then you will only have one place to change it. See http://www.dotnetjohn.com/articles.aspx?articleid=3

newbie question

i need to import data to excel from an sql db. the sql db is on a server,
excel will be on a remote computer. I'm quite happy to use access as an
intermediary if needed. i would also like to be able to write from excel to
sql is poss. although it this if tricky then i might well concentrate on
importing.

is any of this possible? if so is it hard? and can anyone point me to any
decent resources.

many thanksSearch for DTS packages in the SQL Books Online.
That should help you with what you want to do.

>i need to import data to excel from an sql db. the sql db is on a server,
> excel will be on a remote computer. I'm quite happy to use access as an
> intermediary if needed. i would also like to be able to write from excel
> to
> sql is poss. although it this if tricky then i might well concentrate on
> importing.
> is any of this possible? if so is it hard? and can anyone point me to any
> decent resources.|||Hi strawberry ,
U can try through import external data wizard from excel... Try it out.
Reg
Arijit|||For an alternative try this also

http://sqljunkies.com/WebLog/madhiv...7/27/16233.aspx

Madhivanansql

Monday, March 12, 2012

newbie help--restore to point in time

I have a customer who's cart has been deleting orders incorrectly. I
backed up and restored the database from the remote server to my local.
Would like to restore to point in time before the delete operation.
>From various sources this is the script I'm using:
BACKUP LOG plebesummercom
TO disk= 'C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\
EDTWebsite\butrans\translog.bak'
WITH NORECOVERY, No_truncate
Go
RESTORE DATABASE plebesummercom
FROM disk= 'C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\
EDTWebsite\dbbu080106\8_1_2006_5_30_
42_PM.bak'
WITH NORECOVERY;
GO
RESTORE LOG [plebesummercom]
FROM DISK = N'C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\
EDTWebsite\butrans\translog.bak'
WITH FILE = 1, NOUNLOAD, STATS = 10, STOPAT = N'07/16/2006
11:13:04'
GO
Ok, no errrors are thrown, but when I select from a table, I'm still
finding orders with dates past July 16. Am I trying to do something not
allowed? Both the database bu and the log bu contain transactions and
data through August 2nd. Can someone point me in the right direction?Why are you using the NOUNLOAD option when recovering from a file?
Also,
What is the "N" right before the date/time in your STOPAT ?
Your first statement here says to backup log? I think you would want:
RESTORE DATABASE
(FROM ...)
WITH NORECOVERY
--this one for every full log you want to roll in:
RESTORE LOG
(FROM ...)
WITH NORECOVERY
RESTORE LOG
(FROM ...)
WITH RECOVERY, STOPAT = 'Date/time'
Also,
check out the RESTORE topic in Books Online.
I hope this is helpful.
medusa wrote:
> I have a customer who's cart has been deleting orders incorrectly. I
> backed up and restored the database from the remote server to my local.
> Would like to restore to point in time before the delete operation.
> BACKUP LOG plebesummercom
> TO disk= 'C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\
EDTWebsite\butrans\translog.bak'
> WITH NORECOVERY, No_truncate
> Go
> RESTORE DATABASE plebesummercom
> FROM disk= 'C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\
EDTWebsite\dbbu080106\8_1_2006_5_3
0_42_PM.bak'
> WITH NORECOVERY;
> GO
> RESTORE LOG [plebesummercom]
> FROM DISK = N'C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\
EDTWebsite\butrans\translog.bak'
> WITH FILE = 1, NOUNLOAD, STATS = 10, STOPAT = N'07/16/2006
> 11:13:04'
> GO
> Ok, no errrors are thrown, but when I select from a table, I'm still
> finding orders with dates past July 16. Am I trying to do something not
> allowed? Both the database bu and the log bu contain transactions and
> data through August 2nd. Can someone point me in the right direction?|||Well, that was the latest round of code. The n is put in there if you
tell management studio to script the action. The backup log is in there
because if it's not an error is thrown about not backing up the log
tail. Here, this doesn't work either--contains transactions through Aug
2:
BACKUP LOG plebesummercom
TO disk= 'C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\
EDTWebsite\butrans\translog.bak'
WITH NORECOVERY, No_truncate
Go
RESTORE DATABASE plebesummercom
FROM disk= 'C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\
EDTWebsite\dbbu080106\8_1_2006_5_30_
42_PM.bak'
WITH NORECOVERY;
GO
RESTORE LOG [plebesummercom]
FROM DISK ='C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\
EDTWebsite\butrans\translog.bak'
WITH FILE = 1, STOPAT = '07/16/2006 11:13:04'
GO
SGCSNA wrote:[vbcol=seagreen]
> Why are you using the NOUNLOAD option when recovering from a file?
> Also,
> What is the "N" right before the date/time in your STOPAT ?
> Your first statement here says to backup log? I think you would want:
> RESTORE DATABASE
> (FROM ...)
> WITH NORECOVERY
> --this one for every full log you want to roll in:
> RESTORE LOG
> (FROM ...)
> WITH NORECOVERY
> RESTORE LOG
> (FROM ...)
> WITH RECOVERY, STOPAT = 'Date/time'
> Also,
> check out the RESTORE topic in Books Online.
> I hope this is helpful.
>
> medusa wrote:|||Are you restoring from a full backup that falls *before* your STOPAT
date and all of the subsequent logs, up to the one that contains the
STOPAT date?
medusa wrote:[vbcol=seagreen]
> Well, that was the latest round of code. The n is put in there if you
> tell management studio to script the action. The backup log is in there
> because if it's not an error is thrown about not backing up the log
> tail. Here, this doesn't work either--contains transactions through Aug
> 2:
> BACKUP LOG plebesummercom
> TO disk= 'C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\
EDTWebsite\butrans\translog.bak'
> WITH NORECOVERY, No_truncate
> Go
> RESTORE DATABASE plebesummercom
> FROM disk= 'C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\
EDTWebsite\dbbu080106\8_1_2006_5_3
0_42_PM.bak'
> WITH NORECOVERY;
> GO
> RESTORE LOG [plebesummercom]
> FROM DISK ='C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\
EDTWebsite\butrans\translog.bak'
> WITH FILE = 1, STOPAT = '07/16/2006 11:13:04'
> GO
>
> SGCSNA wrote:|||The full backup goes through Aug 2. I want to stop at July 16.
SGCSNA wrote:[vbcol=seagreen]
> Are you restoring from a full backup that falls *before* your STOPAT
> date and all of the subsequent logs, up to the one that contains the
> STOPAT date?
> medusa wrote:|||STOPAT only works with Transaction Log Backups, so you would need a
full backup from sometime before the time you want on July 16th and the
subsequent log backups through the time you want on 7/16.
medusa wrote:[vbcol=seagreen]
> The full backup goes through Aug 2. I want to stop at July 16.
> SGCSNA wrote:|||Thanks a lot for you help.
SGCSNA wrote:[vbcol=seagreen]
> STOPAT only works with Transaction Log Backups, so you would need a
> full backup from sometime before the time you want on July 16th and the
> subsequent log backups through the time you want on 7/16.
> medusa wrote:

newbie help--restore to point in time

I have a customer who's cart has been deleting orders incorrectly. I
backed up and restored the database from the remote server to my local.
Would like to restore to point in time before the delete operation.
>From various sources this is the script I'm using:
BACKUP LOG plebesummercom
TO disk= 'C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
WITH NORECOVERY, No_truncate
Go
RESTORE DATABASE plebesummercom
FROM disk= 'C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
WITH NORECOVERY;
GO
RESTORE LOG [plebesummercom]
FROM DISK = N'C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
WITH FILE = 1, NOUNLOAD, STATS = 10, STOPAT = N'07/16/2006
11:13:04'
GO
Ok, no errrors are thrown, but when I select from a table, I'm still
finding orders with dates past July 16. Am I trying to do something not
allowed? Both the database bu and the log bu contain transactions and
data through August 2nd. Can someone point me in the right direction?Why are you using the NOUNLOAD option when recovering from a file?
Also,
What is the "N" right before the date/time in your STOPAT ?
Your first statement here says to backup log? I think you would want:
RESTORE DATABASE
(FROM ...)
WITH NORECOVERY
--this one for every full log you want to roll in:
RESTORE LOG
(FROM ...)
WITH NORECOVERY
RESTORE LOG
(FROM ...)
WITH RECOVERY, STOPAT = 'Date/time'
Also,
check out the RESTORE topic in Books Online.
I hope this is helpful.
medusa wrote:
> I have a customer who's cart has been deleting orders incorrectly. I
> backed up and restored the database from the remote server to my local.
> Would like to restore to point in time before the delete operation.
> >From various sources this is the script I'm using:
> BACKUP LOG plebesummercom
> TO disk= 'C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> WITH NORECOVERY, No_truncate
> Go
> RESTORE DATABASE plebesummercom
> FROM disk= 'C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
> WITH NORECOVERY;
> GO
> RESTORE LOG [plebesummercom]
> FROM DISK = N'C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> WITH FILE = 1, NOUNLOAD, STATS = 10, STOPAT = N'07/16/2006
> 11:13:04'
> GO
> Ok, no errrors are thrown, but when I select from a table, I'm still
> finding orders with dates past July 16. Am I trying to do something not
> allowed? Both the database bu and the log bu contain transactions and
> data through August 2nd. Can someone point me in the right direction?|||Well, that was the latest round of code. The n is put in there if you
tell management studio to script the action. The backup log is in there
because if it's not an error is thrown about not backing up the log
tail. Here, this doesn't work either--contains transactions through Aug
2:
BACKUP LOG plebesummercom
TO disk= 'C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
WITH NORECOVERY, No_truncate
Go
RESTORE DATABASE plebesummercom
FROM disk= 'C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
WITH NORECOVERY;
GO
RESTORE LOG [plebesummercom]
FROM DISK ='C:\Documents and Settings\HP_Owner\My
Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
WITH FILE = 1, STOPAT = '07/16/2006 11:13:04'
GO
SGCSNA wrote:
> Why are you using the NOUNLOAD option when recovering from a file?
> Also,
> What is the "N" right before the date/time in your STOPAT ?
> Your first statement here says to backup log? I think you would want:
> RESTORE DATABASE
> (FROM ...)
> WITH NORECOVERY
> --this one for every full log you want to roll in:
> RESTORE LOG
> (FROM ...)
> WITH NORECOVERY
> RESTORE LOG
> (FROM ...)
> WITH RECOVERY, STOPAT = 'Date/time'
> Also,
> check out the RESTORE topic in Books Online.
> I hope this is helpful.
>
> medusa wrote:
> > I have a customer who's cart has been deleting orders incorrectly. I
> > backed up and restored the database from the remote server to my local.
> > Would like to restore to point in time before the delete operation.
> > >From various sources this is the script I'm using:
> >
> > BACKUP LOG plebesummercom
> > TO disk= 'C:\Documents and Settings\HP_Owner\My
> > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > WITH NORECOVERY, No_truncate
> > Go
> > RESTORE DATABASE plebesummercom
> > FROM disk= 'C:\Documents and Settings\HP_Owner\My
> > Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
> > WITH NORECOVERY;
> > GO
> >
> > RESTORE LOG [plebesummercom]
> > FROM DISK = N'C:\Documents and Settings\HP_Owner\My
> > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> >
> > WITH FILE = 1, NOUNLOAD, STATS = 10, STOPAT = N'07/16/2006
> > 11:13:04'
> > GO
> >
> > Ok, no errrors are thrown, but when I select from a table, I'm still
> > finding orders with dates past July 16. Am I trying to do something not
> > allowed? Both the database bu and the log bu contain transactions and
> > data through August 2nd. Can someone point me in the right direction?|||Are you restoring from a full backup that falls *before* your STOPAT
date and all of the subsequent logs, up to the one that contains the
STOPAT date?
medusa wrote:
> Well, that was the latest round of code. The n is put in there if you
> tell management studio to script the action. The backup log is in there
> because if it's not an error is thrown about not backing up the log
> tail. Here, this doesn't work either--contains transactions through Aug
> 2:
> BACKUP LOG plebesummercom
> TO disk= 'C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> WITH NORECOVERY, No_truncate
> Go
> RESTORE DATABASE plebesummercom
> FROM disk= 'C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
> WITH NORECOVERY;
> GO
> RESTORE LOG [plebesummercom]
> FROM DISK ='C:\Documents and Settings\HP_Owner\My
> Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> WITH FILE = 1, STOPAT = '07/16/2006 11:13:04'
> GO
>
> SGCSNA wrote:
> > Why are you using the NOUNLOAD option when recovering from a file?
> >
> > Also,
> > What is the "N" right before the date/time in your STOPAT ?
> >
> > Your first statement here says to backup log? I think you would want:
> >
> > RESTORE DATABASE
> > (FROM ...)
> > WITH NORECOVERY
> >
> > --this one for every full log you want to roll in:
> > RESTORE LOG
> > (FROM ...)
> > WITH NORECOVERY
> >
> > RESTORE LOG
> > (FROM ...)
> > WITH RECOVERY, STOPAT = 'Date/time'
> >
> > Also,
> >
> > check out the RESTORE topic in Books Online.
> >
> > I hope this is helpful.
> >
> >
> > medusa wrote:
> > > I have a customer who's cart has been deleting orders incorrectly. I
> > > backed up and restored the database from the remote server to my local.
> > > Would like to restore to point in time before the delete operation.
> > > >From various sources this is the script I'm using:
> > >
> > > BACKUP LOG plebesummercom
> > > TO disk= 'C:\Documents and Settings\HP_Owner\My
> > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > > WITH NORECOVERY, No_truncate
> > > Go
> > > RESTORE DATABASE plebesummercom
> > > FROM disk= 'C:\Documents and Settings\HP_Owner\My
> > > Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
> > > WITH NORECOVERY;
> > > GO
> > >
> > > RESTORE LOG [plebesummercom]
> > > FROM DISK = N'C:\Documents and Settings\HP_Owner\My
> > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > >
> > > WITH FILE = 1, NOUNLOAD, STATS = 10, STOPAT = N'07/16/2006
> > > 11:13:04'
> > > GO
> > >
> > > Ok, no errrors are thrown, but when I select from a table, I'm still
> > > finding orders with dates past July 16. Am I trying to do something not
> > > allowed? Both the database bu and the log bu contain transactions and
> > > data through August 2nd. Can someone point me in the right direction?|||The full backup goes through Aug 2. I want to stop at July 16.
SGCSNA wrote:
> Are you restoring from a full backup that falls *before* your STOPAT
> date and all of the subsequent logs, up to the one that contains the
> STOPAT date?
> medusa wrote:
> > Well, that was the latest round of code. The n is put in there if you
> > tell management studio to script the action. The backup log is in there
> > because if it's not an error is thrown about not backing up the log
> > tail. Here, this doesn't work either--contains transactions through Aug
> > 2:
> >
> > BACKUP LOG plebesummercom
> > TO disk= 'C:\Documents and Settings\HP_Owner\My
> > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > WITH NORECOVERY, No_truncate
> > Go
> > RESTORE DATABASE plebesummercom
> > FROM disk= 'C:\Documents and Settings\HP_Owner\My
> > Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
> > WITH NORECOVERY;
> > GO
> >
> > RESTORE LOG [plebesummercom]
> > FROM DISK ='C:\Documents and Settings\HP_Owner\My
> > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> >
> > WITH FILE = 1, STOPAT = '07/16/2006 11:13:04'
> > GO
> >
> >
> > SGCSNA wrote:
> > > Why are you using the NOUNLOAD option when recovering from a file?
> > >
> > > Also,
> > > What is the "N" right before the date/time in your STOPAT ?
> > >
> > > Your first statement here says to backup log? I think you would want:
> > >
> > > RESTORE DATABASE
> > > (FROM ...)
> > > WITH NORECOVERY
> > >
> > > --this one for every full log you want to roll in:
> > > RESTORE LOG
> > > (FROM ...)
> > > WITH NORECOVERY
> > >
> > > RESTORE LOG
> > > (FROM ...)
> > > WITH RECOVERY, STOPAT = 'Date/time'
> > >
> > > Also,
> > >
> > > check out the RESTORE topic in Books Online.
> > >
> > > I hope this is helpful.
> > >
> > >
> > > medusa wrote:
> > > > I have a customer who's cart has been deleting orders incorrectly. I
> > > > backed up and restored the database from the remote server to my local.
> > > > Would like to restore to point in time before the delete operation.
> > > > >From various sources this is the script I'm using:
> > > >
> > > > BACKUP LOG plebesummercom
> > > > TO disk= 'C:\Documents and Settings\HP_Owner\My
> > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > > > WITH NORECOVERY, No_truncate
> > > > Go
> > > > RESTORE DATABASE plebesummercom
> > > > FROM disk= 'C:\Documents and Settings\HP_Owner\My
> > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
> > > > WITH NORECOVERY;
> > > > GO
> > > >
> > > > RESTORE LOG [plebesummercom]
> > > > FROM DISK = N'C:\Documents and Settings\HP_Owner\My
> > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > > >
> > > > WITH FILE = 1, NOUNLOAD, STATS = 10, STOPAT = N'07/16/2006
> > > > 11:13:04'
> > > > GO
> > > >
> > > > Ok, no errrors are thrown, but when I select from a table, I'm still
> > > > finding orders with dates past July 16. Am I trying to do something not
> > > > allowed? Both the database bu and the log bu contain transactions and
> > > > data through August 2nd. Can someone point me in the right direction?|||STOPAT only works with Transaction Log Backups, so you would need a
full backup from sometime before the time you want on July 16th and the
subsequent log backups through the time you want on 7/16.
medusa wrote:
> The full backup goes through Aug 2. I want to stop at July 16.
> SGCSNA wrote:
> > Are you restoring from a full backup that falls *before* your STOPAT
> > date and all of the subsequent logs, up to the one that contains the
> > STOPAT date?
> > medusa wrote:
> > > Well, that was the latest round of code. The n is put in there if you
> > > tell management studio to script the action. The backup log is in there
> > > because if it's not an error is thrown about not backing up the log
> > > tail. Here, this doesn't work either--contains transactions through Aug
> > > 2:
> > >
> > > BACKUP LOG plebesummercom
> > > TO disk= 'C:\Documents and Settings\HP_Owner\My
> > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > > WITH NORECOVERY, No_truncate
> > > Go
> > > RESTORE DATABASE plebesummercom
> > > FROM disk= 'C:\Documents and Settings\HP_Owner\My
> > > Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
> > > WITH NORECOVERY;
> > > GO
> > >
> > > RESTORE LOG [plebesummercom]
> > > FROM DISK ='C:\Documents and Settings\HP_Owner\My
> > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > >
> > > WITH FILE = 1, STOPAT = '07/16/2006 11:13:04'
> > > GO
> > >
> > >
> > > SGCSNA wrote:
> > > > Why are you using the NOUNLOAD option when recovering from a file?
> > > >
> > > > Also,
> > > > What is the "N" right before the date/time in your STOPAT ?
> > > >
> > > > Your first statement here says to backup log? I think you would want:
> > > >
> > > > RESTORE DATABASE
> > > > (FROM ...)
> > > > WITH NORECOVERY
> > > >
> > > > --this one for every full log you want to roll in:
> > > > RESTORE LOG
> > > > (FROM ...)
> > > > WITH NORECOVERY
> > > >
> > > > RESTORE LOG
> > > > (FROM ...)
> > > > WITH RECOVERY, STOPAT = 'Date/time'
> > > >
> > > > Also,
> > > >
> > > > check out the RESTORE topic in Books Online.
> > > >
> > > > I hope this is helpful.
> > > >
> > > >
> > > > medusa wrote:
> > > > > I have a customer who's cart has been deleting orders incorrectly. I
> > > > > backed up and restored the database from the remote server to my local.
> > > > > Would like to restore to point in time before the delete operation.
> > > > > >From various sources this is the script I'm using:
> > > > >
> > > > > BACKUP LOG plebesummercom
> > > > > TO disk= 'C:\Documents and Settings\HP_Owner\My
> > > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > > > > WITH NORECOVERY, No_truncate
> > > > > Go
> > > > > RESTORE DATABASE plebesummercom
> > > > > FROM disk= 'C:\Documents and Settings\HP_Owner\My
> > > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
> > > > > WITH NORECOVERY;
> > > > > GO
> > > > >
> > > > > RESTORE LOG [plebesummercom]
> > > > > FROM DISK = N'C:\Documents and Settings\HP_Owner\My
> > > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > > > >
> > > > > WITH FILE = 1, NOUNLOAD, STATS = 10, STOPAT = N'07/16/2006
> > > > > 11:13:04'
> > > > > GO
> > > > >
> > > > > Ok, no errrors are thrown, but when I select from a table, I'm still
> > > > > finding orders with dates past July 16. Am I trying to do something not
> > > > > allowed? Both the database bu and the log bu contain transactions and
> > > > > data through August 2nd. Can someone point me in the right direction?|||Thanks a lot for you help.
SGCSNA wrote:
> STOPAT only works with Transaction Log Backups, so you would need a
> full backup from sometime before the time you want on July 16th and the
> subsequent log backups through the time you want on 7/16.
> medusa wrote:
> > The full backup goes through Aug 2. I want to stop at July 16.
> >
> > SGCSNA wrote:
> > > Are you restoring from a full backup that falls *before* your STOPAT
> > > date and all of the subsequent logs, up to the one that contains the
> > > STOPAT date?
> > > medusa wrote:
> > > > Well, that was the latest round of code. The n is put in there if you
> > > > tell management studio to script the action. The backup log is in there
> > > > because if it's not an error is thrown about not backing up the log
> > > > tail. Here, this doesn't work either--contains transactions through Aug
> > > > 2:
> > > >
> > > > BACKUP LOG plebesummercom
> > > > TO disk= 'C:\Documents and Settings\HP_Owner\My
> > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > > > WITH NORECOVERY, No_truncate
> > > > Go
> > > > RESTORE DATABASE plebesummercom
> > > > FROM disk= 'C:\Documents and Settings\HP_Owner\My
> > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
> > > > WITH NORECOVERY;
> > > > GO
> > > >
> > > > RESTORE LOG [plebesummercom]
> > > > FROM DISK ='C:\Documents and Settings\HP_Owner\My
> > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > > >
> > > > WITH FILE = 1, STOPAT = '07/16/2006 11:13:04'
> > > > GO
> > > >
> > > >
> > > > SGCSNA wrote:
> > > > > Why are you using the NOUNLOAD option when recovering from a file?
> > > > >
> > > > > Also,
> > > > > What is the "N" right before the date/time in your STOPAT ?
> > > > >
> > > > > Your first statement here says to backup log? I think you would want:
> > > > >
> > > > > RESTORE DATABASE
> > > > > (FROM ...)
> > > > > WITH NORECOVERY
> > > > >
> > > > > --this one for every full log you want to roll in:
> > > > > RESTORE LOG
> > > > > (FROM ...)
> > > > > WITH NORECOVERY
> > > > >
> > > > > RESTORE LOG
> > > > > (FROM ...)
> > > > > WITH RECOVERY, STOPAT = 'Date/time'
> > > > >
> > > > > Also,
> > > > >
> > > > > check out the RESTORE topic in Books Online.
> > > > >
> > > > > I hope this is helpful.
> > > > >
> > > > >
> > > > > medusa wrote:
> > > > > > I have a customer who's cart has been deleting orders incorrectly. I
> > > > > > backed up and restored the database from the remote server to my local.
> > > > > > Would like to restore to point in time before the delete operation.
> > > > > > >From various sources this is the script I'm using:
> > > > > >
> > > > > > BACKUP LOG plebesummercom
> > > > > > TO disk= 'C:\Documents and Settings\HP_Owner\My
> > > > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > > > > > WITH NORECOVERY, No_truncate
> > > > > > Go
> > > > > > RESTORE DATABASE plebesummercom
> > > > > > FROM disk= 'C:\Documents and Settings\HP_Owner\My
> > > > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\dbbu080106\8_1_2006_5_30_42_PM.bak'
> > > > > > WITH NORECOVERY;
> > > > > > GO
> > > > > >
> > > > > > RESTORE LOG [plebesummercom]
> > > > > > FROM DISK = N'C:\Documents and Settings\HP_Owner\My
> > > > > > Documents\StephsProgramming\Plebesummer\EDTWebsite\butrans\translog.bak'
> > > > > >
> > > > > > WITH FILE = 1, NOUNLOAD, STATS = 10, STOPAT = N'07/16/2006
> > > > > > 11:13:04'
> > > > > > GO
> > > > > >
> > > > > > Ok, no errrors are thrown, but when I select from a table, I'm still
> > > > > > finding orders with dates past July 16. Am I trying to do something not
> > > > > > allowed? Both the database bu and the log bu contain transactions and
> > > > > > data through August 2nd. Can someone point me in the right direction?