Thursday, March 29, 2012

DB backup to another server

How do I configure SQL Server Agent and my Database Maintenance Plans to
enable sending backups to another server via UNC pathnames and restoring
from the same location? Backing up locally and copying files to the other
server doesn't make good use of the functionality of deleting backups older
than a certain number of days.
I've already created a domain admin user, shared the destination folder to
this user will full permissions, set SQL Server Agent to login under the
context of this domain admin user, but my backups still won't go to that
remote server.This is a multi-part message in MIME format.
--=_NextPart_000_0525_01C3B825.106A5290
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
Have you also configured SQL Server itself to run under that domain account?
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"David Morrison" <me@.nospam.com> wrote in message
news:u$XDJ5EuDHA.424@.TK2MSFTNGP11.phx.gbl...
How do I configure SQL Server Agent and my Database Maintenance Plans to
enable sending backups to another server via UNC pathnames and restoring
from the same location? Backing up locally and copying files to the other
server doesn't make good use of the functionality of deleting backups older
than a certain number of days.
I've already created a domain admin user, shared the destination folder to
this user will full permissions, set SQL Server Agent to login under the
context of this domain admin user, but my backups still won't go to that
remote server.
--=_NextPart_000_0525_01C3B825.106A5290
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Have you also configured SQL Server =itself to run under that domain account?
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"David Morrison" wrote in message news:u$XDJ5EuDHA.424@.T=K2MSFTNGP11.phx.gbl...How do I configure SQL Server Agent and my Database Maintenance Plans =toenable sending backups to another server via UNC pathnames and =restoringfrom the same location? Backing up locally and copying files to the =otherserver doesn't make good use of the functionality of deleting backups =olderthan a certain number of days.I've already created a domain admin user, =shared the destination folder tothis user will full permissions, set SQL =Server Agent to login under thecontext of this domain admin user, but my =backups still won't go to thatremote server.

--=_NextPart_000_0525_01C3B825.106A5290--|||This is a multi-part message in MIME format.
--=_NextPart_000_0014_01C3B816.F2397930
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
No. Is that necessary?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:%23T3787EuDHA.2448@.TK2MSFTNGP12.phx.gbl...
Have you also configured SQL Server itself to run under that domain =account?
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"David Morrison" <me@.nospam.com> wrote in message =news:u$XDJ5EuDHA.424@.TK2MSFTNGP11.phx.gbl...
How do I configure SQL Server Agent and my Database Maintenance Plans =to
enable sending backups to another server via UNC pathnames and =restoring
from the same location? Backing up locally and copying files to the =other
server doesn't make good use of the functionality of deleting backups =older
than a certain number of days.
I've already created a domain admin user, shared the destination =folder to
this user will full permissions, set SQL Server Agent to login under =the
context of this domain admin user, but my backups still won't go to =that
remote server.
--=_NextPart_000_0014_01C3B816.F2397930
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

No. Is that =necessary?
"Tom Moreau" = wrote in message news:%23T3787EuDHA.=2448@.TK2MSFTNGP12.phx.gbl...
Have you also configured SQL Server =itself to run under that domain account?
-- Tom

=---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql


"David Morrison" wrote in message news:u$XDJ5EuDHA.424@.T=K2MSFTNGP11.phx.gbl...How do I configure SQL Server Agent and my Database Maintenance Plans =toenable sending backups to another server via UNC pathnames and =restoringfrom the same location? Backing up locally and copying files to the otherserver doesn't make good use of the functionality of deleting =backups olderthan a certain number of days.I've already created a =domain admin user, shared the destination folder tothis user will full permissions, set SQL Server Agent to login under thecontext of =this domain admin user, but my backups still won't go to thatremote server.

--=_NextPart_000_0014_01C3B816.F2397930--|||This is a multi-part message in MIME format.
--=_NextPart_000_0022_01C3B81B.15455940
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
That was it! You made my day. Thanks!
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message =news:%23T3787EuDHA.2448@.TK2MSFTNGP12.phx.gbl...
Have you also configured SQL Server itself to run under that domain =account?
-- Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"David Morrison" <me@.nospam.com> wrote in message =news:u$XDJ5EuDHA.424@.TK2MSFTNGP11.phx.gbl...
How do I configure SQL Server Agent and my Database Maintenance Plans =to
enable sending backups to another server via UNC pathnames and =restoring
from the same location? Backing up locally and copying files to the =other
server doesn't make good use of the functionality of deleting backups =older
than a certain number of days.
I've already created a domain admin user, shared the destination =folder to
this user will full permissions, set SQL Server Agent to login under =the
context of this domain admin user, but my backups still won't go to =that
remote server.
--=_NextPart_000_0022_01C3B81B.15455940
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

That was it! You made my =day. Thanks!
"Tom Moreau" = wrote in message news:%23T3787EuDHA.=2448@.TK2MSFTNGP12.phx.gbl...
Have you also configured SQL Server =itself to run under that domain account?
-- Tom

=---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql


"David Morrison" wrote in message news:u$XDJ5EuDHA.424@.T=K2MSFTNGP11.phx.gbl...How do I configure SQL Server Agent and my Database Maintenance Plans =toenable sending backups to another server via UNC pathnames and =restoringfrom the same location? Backing up locally and copying files to the otherserver doesn't make good use of the functionality of deleting =backups olderthan a certain number of days.I've already created a =domain admin user, shared the destination folder tothis user will full permissions, set SQL Server Agent to login under thecontext of =this domain admin user, but my backups still won't go to thatremote server.

--=_NextPart_000_0022_01C3B81B.15455940--|||I have the same problem. SQL Server runs using an NT account, this account has permissions on the backup server and while logged into the first server using this same NT account I'm able to map a drive to the backup server. But when I go through Enterprise Manager and look for this destination via the SQL Server Backup window, I don't find it. Please advise
-- David Morrison wrote: --
No. Is that necessary
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message news:%23T3787EuDHA.2448@.TK2MSFTNGP12.phx.gbl..
Have you also configured SQL Server itself to run under that domain account
--
To
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDB
SQL Server MV
Columnist, SQL Server Professiona
Toronto, ON Canad
www.pinnaclepublishing.com/sq
"David Morrison" <me@.nospam.com> wrote in message news:u$XDJ5EuDHA.424@.TK2MSFTNGP11.phx.gbl..
How do I configure SQL Server Agent and my Database Maintenance Plans t
enable sending backups to another server via UNC pathnames and restorin
from the same location? Backing up locally and copying files to the othe
server doesn't make good use of the functionality of deleting backups olde
than a certain number of days
I've already created a domain admin user, shared the destination folder t
this user will full permissions, set SQL Server Agent to login under th
context of this domain admin user, but my backups still won't go to tha
remote server|||This is a multi-part message in MIME format.
--=_NextPart_000_00AA_01C3B84F.60E51960
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
Use the full UNC name for the backup destination. You cannot map to a drive
letter.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"Simi Rao" <anonymous@.discussions.microsoft.com> wrote in message
news:21C576AF-AB76-49E8-899D-8058242FE3F2@.microsoft.com...
I have the same problem. SQL Server runs using an NT account, this account
has permissions on the backup server and while logged into the first server
using this same NT account I'm able to map a drive to the backup server.
But when I go through Enterprise Manager and look for this destination via
the SQL Server Backup window, I don't find it. Please advise.
-- David Morrison wrote: --
No. Is that necessary?
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:%23T3787EuDHA.2448@.TK2MSFTNGP12.phx.gbl...
Have you also configured SQL Server itself to run under that domain
account?
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"David Morrison" <me@.nospam.com> wrote in message
news:u$XDJ5EuDHA.424@.TK2MSFTNGP11.phx.gbl...
How do I configure SQL Server Agent and my Database Maintenance Plans
to
enable sending backups to another server via UNC pathnames and
restoring
from the same location? Backing up locally and copying files to the
other
server doesn't make good use of the functionality of deleting backups
older
than a certain number of days.
I've already created a domain admin user, shared the destination
folder to
this user will full permissions, set SQL Server Agent to login under
the
context of this domain admin user, but my backups still won't go to
that
remote server
--=_NextPart_000_00AA_01C3B84F.60E51960
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Use the full UNC name for the backup destination. You cannot map to a drive letter.
-- Tom
----Thomas A. =Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql.
"Simi Rao" wrote in message news:21C=576AF-AB76-49E8-899D-8058242FE3F2@.microsoft.com...I have the same problem. SQL Server runs using an NT account, this =account has permissions on the backup server and while logged into the first =server using this same NT account I'm able to map a drive to the backup =server. But when I go through Enterprise Manager and look for this destination =via the SQL Server Backup window, I don't find it. Please advise. -- =David Morrison wrote: -- = No. Is that necessary? ="Tom Moreau" = wrote in message news:%23T3787EuDHA.=2448@.TK2MSFTNGP12.phx.gbl... =Have you also configured SQL Server itself to run under that domain account? = -- Tom = --- = Thomas A. Moreau, BSc, PhD, MCSE, =MCDBA SQL Server MVP Columnist, SQL =Server Professional Toronto, ON Canada http://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql ="David Morrison" =wrote in message news:u$XDJ5EuDHA.424@.T=K2MSFTNGP11.phx.gbl... How do I configure SQL Server Agent and my Database Maintenance Plans to enable sending backups to =another server via UNC pathnames and =restoring from the same location? Backing up locally and copying files to =the other server doesn't make good =use of the functionality of deleting backups older than a certain number of days. = I've already created a domain admin user, shared the destination folder to this user will full =permissions, set SQL Server Agent to login under =the context of this domain admin user, but my backups still won't go to that remote server

--=_NextPart_000_00AA_01C3B84F.60E51960--|||I'm having a similar problem. Does SQL Server itself have
to run under the domain account? Is this the MSSQLSERVER
service? I have the permissions on the remote folder set
for the domain admin. The SQL job for the maintenance
plan is owned by the domain admin. The SQL Agent service
is started under the domain admin. Still, the backups are
failing and the log indicates that access is denied in
creating the backup and it appears that 'sa' is invoking
the job.
>--Original Message--
>No. Is that necessary?
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in
message news:%23T3787EuDHA.2448@.TK2MSFTNGP12.phx.gbl...
> Have you also configured SQL Server itself to run under
that domain account?
> --
> Tom
> ---
--
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
>
> "David Morrison" <me@.nospam.com> wrote in message
news:u$XDJ5EuDHA.424@.TK2MSFTNGP11.phx.gbl...
> How do I configure SQL Server Agent and my Database
Maintenance Plans to
> enable sending backups to another server via UNC
pathnames and restoring
> from the same location? Backing up locally and copying
files to the other
> server doesn't make good use of the functionality of
deleting backups older
> than a certain number of days.
> I've already created a domain admin user, shared the
destination folder to
> this user will full permissions, set SQL Server Agent
to login under the
> context of this domain admin user, but my backups still
won't go to that
> remote server.
>|||This is a multi-part message in MIME format.
--=_NextPart_000_001C_01C3C328.296D6850
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
The SQL Server service has to run under a domain account to do what you
want. That said, you should not use the domain admin account. That's way
to much authority. Create a separate account that can run as a service and
use it.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
<anonymous@.discussions.microsoft.com> wrote in message
news:108a01c3c33e$5b4bd170$3101280a@.phx.gbl...
I'm having a similar problem. Does SQL Server itself have
to run under the domain account? Is this the MSSQLSERVER
service? I have the permissions on the remote folder set
for the domain admin. The SQL job for the maintenance
plan is owned by the domain admin. The SQL Agent service
is started under the domain admin. Still, the backups are
failing and the log indicates that access is denied in
creating the backup and it appears that 'sa' is invoking
the job.
>--Original Message--
>No. Is that necessary?
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in
message news:%23T3787EuDHA.2448@.TK2MSFTNGP12.phx.gbl...
> Have you also configured SQL Server itself to run under
that domain account?
> --
> Tom
> ---
--
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
>
> "David Morrison" <me@.nospam.com> wrote in message
news:u$XDJ5EuDHA.424@.TK2MSFTNGP11.phx.gbl...
> How do I configure SQL Server Agent and my Database
Maintenance Plans to
> enable sending backups to another server via UNC
pathnames and restoring
> from the same location? Backing up locally and copying
files to the other
> server doesn't make good use of the functionality of
deleting backups older
> than a certain number of days.
> I've already created a domain admin user, shared the
destination folder to
> this user will full permissions, set SQL Server Agent
to login under the
> context of this domain admin user, but my backups still
won't go to that
> remote server.
>
--=_NextPart_000_001C_01C3C328.296D6850
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

The SQL Server service has to run =under a domain account to do what you want. That said, you should not use the =domain admin account. That's way to much authority. Create a =separate account that can run as a service and use it.
-- Tom
----Thomas A. =Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql.
wrote in message news:108a01c3c33e$5b=4bd170$3101280a@.phx.gbl...I'm having a similar problem. Does SQL Server itself have to run =under the domain account? Is this the MSSQLSERVER service? I have the permissions on the remote folder set for the domain admin. The =SQL job for the maintenance plan is owned by the domain admin. The SQL =Agent service is started under the domain admin. Still, the backups =are failing and the log indicates that access is denied in creating =the backup and it appears that 'sa' is invoking the job.>--Original Message-->No. Is that necessary?> "Tom Moreau" = wrote in message news:%23T3787EuDHA.=2448@.TK2MSFTNGP12.phx.gbl...> Have you also configured SQL Server itself to run under that domain account?>> -- > =Tom>> -----&g=t; Thomas A. Moreau, BSc, PhD, MCSE, MCDBA> SQL Server MVP> Columnist, SQL Server Professional> =Toronto, ON Canada>http://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql>>> "David Morrison" wrote in message news:u$XDJ5EuDHA.424@.T=K2MSFTNGP11.phx.gbl...> How do I configure SQL Server Agent and my Database Maintenance =Plans to> enable sending backups to another server via UNC =pathnames and restoring> from the same location? Backing up =locally and copying files to the other> server doesn't make good =use of the functionality of deleting backups older> than a certain =number of days.>> I've already created a domain admin user, =shared the destination folder to> this user will full =permissions, set SQL Server Agent to login under the> context of this =domain admin user, but my backups still won't go to that> =remote server.>>

--=_NextPart_000_001C_01C3C328.296D6850--

DB backup to a mapped drive on another server?

In SQL 2000, is it possible to perform a DB backup where the backup is
written to a disk drive on a different server. Someone had mentioned that
this is possible using backup devices (instead of backup files).
I tried adding a dump device with the following command:
sp_addumpdevice @.devtype = 'disk',
@.logicalname = 'SorClinTest_E',
@.physicalname = '\\RemoteServerName\e$\Backuptest\FromProd.ext'
When i tried backing up to that device i got an error that the backup failed
(no details). I am guessing that it failed because of the remote device.
If anyone can shed some light on this - I would appreciate it.
Thanks,
Tom
See if this helps: http://vyaskn.tripod.com/administration_faq.htm#q17
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"TJT" <TJT@.nospam.com> wrote in message
news:OTIQNZTNFHA.1176@.TK2MSFTNGP12.phx.gbl...
In SQL 2000, is it possible to perform a DB backup where the backup is
written to a disk drive on a different server. Someone had mentioned that
this is possible using backup devices (instead of backup files).
I tried adding a dump device with the following command:
sp_addumpdevice @.devtype = 'disk',
@.logicalname = 'SorClinTest_E',
@.physicalname = '\\RemoteServerName\e$\Backuptest\FromProd.ext'
When i tried backing up to that device i got an error that the backup failed
(no details). I am guessing that it failed because of the remote device.
If anyone can shed some light on this - I would appreciate it.
Thanks,
Tom
|||You don't need to add a dump device if you just want to backup the database
to another server.
BACKUP DATABASE dbname TO DISK = '\\server\share\filename'
"TJT" wrote:

> In SQL 2000, is it possible to perform a DB backup where the backup is
> written to a disk drive on a different server. Someone had mentioned that
> this is possible using backup devices (instead of backup files).
> I tried adding a dump device with the following command:
> sp_addumpdevice @.devtype = 'disk',
> @.logicalname = 'SorClinTest_E',
> @.physicalname = '\\RemoteServerName\e$\Backuptest\FromProd.ext'
> When i tried backing up to that device i got an error that the backup failed
> (no details). I am guessing that it failed because of the remote device.
> If anyone can shed some light on this - I would appreciate it.
> Thanks,
> Tom
>
>
|||Hello Tom,
Check the login id the SQLServer service runs as and login to the server
with that ID and try to copy a file
into that share. If you cannot copy the file then you have a
access/permission problem ... etc.
ie, Can you copy a file to this location " \RemoteServerName\e$\Backuptest\
" using the login id that SQLServer
service runs with. Try this from command prompt.
Gopi
"TJT" <TJT@.nospam.com> wrote in message
news:OTIQNZTNFHA.1176@.TK2MSFTNGP12.phx.gbl...
> In SQL 2000, is it possible to perform a DB backup where the backup is
> written to a disk drive on a different server. Someone had mentioned that
> this is possible using backup devices (instead of backup files).
> I tried adding a dump device with the following command:
> sp_addumpdevice @.devtype = 'disk',
> @.logicalname = 'SorClinTest_E',
> @.physicalname = '\\RemoteServerName\e$\Backuptest\FromProd.ext'
> When i tried backing up to that device i got an error that the backup
> failed
> (no details). I am guessing that it failed because of the remote device.
> If anyone can shed some light on this - I would appreciate it.
> Thanks,
> Tom
>
|||All The above are correct. I will add the idea of getting backup in a dump
device with Complete, differential, transactional backups to another server.
1. Create a map network drive
2. Restart your sql server in order to see the drive
3. Create a dump device via EM (It's easier) pointing the drive
4. Create the jobs you want.
Andreas
"Jack" wrote:
[vbcol=seagreen]
> You don't need to add a dump device if you just want to backup the database
> to another server.
> BACKUP DATABASE dbname TO DISK = '\\server\share\filename'
> "TJT" wrote:
|||Yes , follow the below steps.
There are Few Pre requisites to do backup remotely;
1. You Should start SQL server using Domain user who got access to remote machine Share
2. Should have share in the remote machine
3. If you need to schedule this as a job then SQL Agent should use the same Domain user in which SQL server was started
4. Restart the services
Now you can execute the Backup script with UNC path
BACKUP Database <dbname> to disk='\\computername\sharenameX\dbname.bak' with init
Note:
Backup to remote machine will not work if you start SQL server using Local system account
Thanks
Hari
SQL Server MVP
____________________________________
TJT Wrote:
In SQL 2000, is it possible to perform a DB backup where the backup is
written to a disk drive on a different server. Someone had mentioned that
this is possible using backup devices (instead of backup files).
I tried adding a dump device with the following command:
sp_addumpdevice @.devtype = 'disk',
@.logicalname = 'SorClinTest_E',
@.physicalname = '\\RemoteServerName\e$\Backuptest\FromProd.ext'
When i tried backing up to that device i got an error that the backup failed
(no details). I am guessing that it failed because of the remote device.
If anyone can shed some light on this - I would appreciate it.
Thanks,
Tom
Sent via SreeSharp NewsReader http://www.SreeSharp.com
sql

DB backup to a mapped drive on another server?

In SQL 2000, is it possible to perform a DB backup where the backup is
written to a disk drive on a different server. Someone had mentioned that
this is possible using backup devices (instead of backup files).
I tried adding a dump device with the following command:
sp_addumpdevice @.devtype = 'disk',
@.logicalname = 'SorClinTest_E',
@.physicalname = '\\RemoteServerName\e$\Backuptest\FromProd.ext'
When i tried backing up to that device i got an error that the backup failed
(no details). I am guessing that it failed because of the remote device.
If anyone can shed some light on this - I would appreciate it.
Thanks,
TomSee if this helps: http://vyaskn.tripod.com/administration_faq.htm#q17
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"TJT" <TJT@.nospam.com> wrote in message
news:OTIQNZTNFHA.1176@.TK2MSFTNGP12.phx.gbl...
In SQL 2000, is it possible to perform a DB backup where the backup is
written to a disk drive on a different server. Someone had mentioned that
this is possible using backup devices (instead of backup files).
I tried adding a dump device with the following command:
sp_addumpdevice @.devtype = 'disk',
@.logicalname = 'SorClinTest_E',
@.physicalname = '\\RemoteServerName\e$\Backuptest\FromProd.ext'
When i tried backing up to that device i got an error that the backup failed
(no details). I am guessing that it failed because of the remote device.
If anyone can shed some light on this - I would appreciate it.
Thanks,
Tom|||You don't need to add a dump device if you just want to backup the database
to another server.
BACKUP DATABASE dbname TO DISK = '\\server\share\filename'
"TJT" wrote:
> In SQL 2000, is it possible to perform a DB backup where the backup is
> written to a disk drive on a different server. Someone had mentioned that
> this is possible using backup devices (instead of backup files).
> I tried adding a dump device with the following command:
> sp_addumpdevice @.devtype = 'disk',
> @.logicalname = 'SorClinTest_E',
> @.physicalname = '\\RemoteServerName\e$\Backuptest\FromProd.ext'
> When i tried backing up to that device i got an error that the backup failed
> (no details). I am guessing that it failed because of the remote device.
> If anyone can shed some light on this - I would appreciate it.
> Thanks,
> Tom
>
>|||Hello Tom,
Check the login id the SQLServer service runs as and login to the server
with that ID and try to copy a file
into that share. If you cannot copy the file then you have a
access/permission problem ... etc.
ie, Can you copy a file to this location " \RemoteServerName\e$\Backuptest\
" using the login id that SQLServer
service runs with. Try this from command prompt.
Gopi
"TJT" <TJT@.nospam.com> wrote in message
news:OTIQNZTNFHA.1176@.TK2MSFTNGP12.phx.gbl...
> In SQL 2000, is it possible to perform a DB backup where the backup is
> written to a disk drive on a different server. Someone had mentioned that
> this is possible using backup devices (instead of backup files).
> I tried adding a dump device with the following command:
> sp_addumpdevice @.devtype = 'disk',
> @.logicalname = 'SorClinTest_E',
> @.physicalname = '\\RemoteServerName\e$\Backuptest\FromProd.ext'
> When i tried backing up to that device i got an error that the backup
> failed
> (no details). I am guessing that it failed because of the remote device.
> If anyone can shed some light on this - I would appreciate it.
> Thanks,
> Tom
>|||All The above are correct. I will add the idea of getting backup in a dump
device with Complete, differential, transactional backups to another server.
1. Create a map network drive
2. Restart your sql server in order to see the drive
3. Create a dump device via EM (It's easier) pointing the drive
4. Create the jobs you want.
Andreas
"Jack" wrote:
> You don't need to add a dump device if you just want to backup the database
> to another server.
> BACKUP DATABASE dbname TO DISK = '\\server\share\filename'
> "TJT" wrote:
> > In SQL 2000, is it possible to perform a DB backup where the backup is
> > written to a disk drive on a different server. Someone had mentioned that
> > this is possible using backup devices (instead of backup files).
> >
> > I tried adding a dump device with the following command:
> > sp_addumpdevice @.devtype = 'disk',
> > @.logicalname = 'SorClinTest_E',
> > @.physicalname = '\\RemoteServerName\e$\Backuptest\FromProd.ext'
> >
> > When i tried backing up to that device i got an error that the backup failed
> > (no details). I am guessing that it failed because of the remote device.
> >
> > If anyone can shed some light on this - I would appreciate it.
> >
> > Thanks,
> > Tom
> >
> >
> >

DB backup to a mapped drive on another server?

In SQL 2000, is it possible to perform a DB backup where the backup is
written to a disk drive on a different server. Someone had mentioned that
this is possible using backup devices (instead of backup files).
I tried adding a dump device with the following command:
sp_addumpdevice @.devtype = 'disk',
@.logicalname = 'SorClinTest_E',
@.physicalname = '\\RemoteServerName\e$\Backuptest\FromPr
od.ext'
When i tried backing up to that device i got an error that the backup failed
(no details). I am guessing that it failed because of the remote device.
If anyone can shed some light on this - I would appreciate it.
Thanks,
TomSee if this helps: http://vyaskn.tripod.com/administration_faq.htm#q17
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"TJT" <TJT@.nospam.com> wrote in message
news:OTIQNZTNFHA.1176@.TK2MSFTNGP12.phx.gbl...
In SQL 2000, is it possible to perform a DB backup where the backup is
written to a disk drive on a different server. Someone had mentioned that
this is possible using backup devices (instead of backup files).
I tried adding a dump device with the following command:
sp_addumpdevice @.devtype = 'disk',
@.logicalname = 'SorClinTest_E',
@.physicalname = '\\RemoteServerName\e$\Backuptest\FromPr
od.ext'
When i tried backing up to that device i got an error that the backup failed
(no details). I am guessing that it failed because of the remote device.
If anyone can shed some light on this - I would appreciate it.
Thanks,
Tom|||You don't need to add a dump device if you just want to backup the database
to another server.
BACKUP DATABASE dbname TO DISK = '\\server\share\filename'
"TJT" wrote:

> In SQL 2000, is it possible to perform a DB backup where the backup is
> written to a disk drive on a different server. Someone had mentioned that
> this is possible using backup devices (instead of backup files).
> I tried adding a dump device with the following command:
> sp_addumpdevice @.devtype = 'disk',
> @.logicalname = 'SorClinTest_E',
> @.physicalname = '\\RemoteServerName\e$\Backuptest\FromPr
od.ext'
> When i tried backing up to that device i got an error that the backup fail
ed
> (no details). I am guessing that it failed because of the remote device.
> If anyone can shed some light on this - I would appreciate it.
> Thanks,
> Tom
>
>|||Hello Tom,
Check the login id the SQLServer service runs as and login to the server
with that ID and try to copy a file
into that share. If you cannot copy the file then you have a
access/permission problem ... etc.
ie, Can you copy a file to this location " \RemoteServerName\e$\Backuptest\
" using the login id that SQLServer
service runs with. Try this from command prompt.
Gopi
"TJT" <TJT@.nospam.com> wrote in message
news:OTIQNZTNFHA.1176@.TK2MSFTNGP12.phx.gbl...
> In SQL 2000, is it possible to perform a DB backup where the backup is
> written to a disk drive on a different server. Someone had mentioned that
> this is possible using backup devices (instead of backup files).
> I tried adding a dump device with the following command:
> sp_addumpdevice @.devtype = 'disk',
> @.logicalname = 'SorClinTest_E',
> @.physicalname = '\\RemoteServerName\e$\Backuptest\FromPr
od.ext'
> When i tried backing up to that device i got an error that the backup
> failed
> (no details). I am guessing that it failed because of the remote device.
> If anyone can shed some light on this - I would appreciate it.
> Thanks,
> Tom
>|||All The above are correct. I will add the idea of getting backup in a dump
device with Complete, differential, transactional backups to another server.
1. Create a map network drive
2. Restart your sql server in order to see the drive
3. Create a dump device via EM (It's easier) pointing the drive
4. Create the jobs you want.
Andreas
"Jack" wrote:
[vbcol=seagreen]
> You don't need to add a dump device if you just want to backup the databas
e
> to another server.
> BACKUP DATABASE dbname TO DISK = '\\server\share\filename'
> "TJT" wrote:
>|||Yes , follow the below steps.
There are Few Pre requisites to do backup remotely;
1. You Should start SQL server using Domain user who got access to remote ma
chine Share
2. Should have share in the remote machine
3. If you need to schedule this as a job then SQL Agent should use the same
Domain user in which SQL server was started
4. Restart the services
Now you can execute the Backup script with UNC path
BACKUP Database <dbname> to disk='\\computername\sharename_\dbname.bak' wit
h init
Note:
Backup to remote machine will not work if you start SQL server using Local s
ystem account
Thanks
Hari
SQL Server MVP
____________________________________
TJT Wrote:
In SQL 2000, is it possible to perform a DB backup where the backup is
written to a disk drive on a different server. Someone had mentioned that
this is possible using backup devices (instead of backup files).
I tried adding a dump device with the following command:
sp_addumpdevice @.devtype = 'disk',
@.logicalname = 'SorClinTest_E',
@.physicalname = '\\RemoteServerName\e$\Backuptest\FromPr
od.ext'
When i tried backing up to that device i got an error that the backup failed
(no details). I am guessing that it failed because of the remote device.
If anyone can shed some light on this - I would appreciate it.
Thanks,
Tom
Sent via SreeSharp NewsReader http://www.SreeSharp.com

db backup simple vs. full recovery mode

When we do a full database backup manually, we are seeing the trn file reflect the current date/time, but we are not seeing the mdf reflect the new date/time. And we are not seeing the transaction log file decrease in size. the recovery mode is set to full, do we need to change to simple to see both the mdf being backup'ed?

When you do a backup, markers are written to the Transaction Log file, however, the backup process does not change anything about the datafiles -therefore the 'trn' file gets a new datetime and the data file does not.

The Transaction Log file does not shrink UNLESS specifically so instructed. See Books Online for DBCC 'Shrinkfile'.

|||

Hi,

You can schedule half/hourly t-log backup to keep it in shape, how ever if its growing unpexctingly refer below thread:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1221599&SiteID=1

Hemantgiri S. Goswami

|||

What we are seeing are current timestamps on the trn file, current timestamps on the ldf, but about a six month old modified date on the mdf. I would assume that the trn file would have the most recent transactions, the ldf the intermediate, and then the mdf.

With the truncate command on the trn file, do the transactions immediately hit the mdf file or the ldf (I would think the ldf)? however when does the mdf get updated by the ldf file?

Am I completely lost--I thought that the ldf (a locked mdf file, correct?) would eventually post the edits/updates to the mdf.

|||

The ldf is the transaction log file. Data changes are moved to the mdf (data file) on a regular basis -usually within seconds.

The OS stamps the file date. SQL Server has a data file (mdf) open with a, perhaps, large, amount of empty space. The OS does not know what is happening inside the mdf file unless there are specific interactions between SQL Server and the OS regarding the file.

It seems like you are confused because the mdf file date is not changing. It most likely will not change unless one of the following actions occur: Filegrowth, Fileshrink, Detach/Attach.

DB backup script

Hello, I inherited a SQL Server from my predecissor and came accross this backup script..Can anyone please help me in understanding what this means?
This script is currently backing up the 1.3GB database. and the current backup file size is 67GB. Maybe this script is adding up all the backs cummulatively everyday. I want it to make a fullbackup once a day and make incremental backups remaining 6 days. At the end of the week, I want to save the file somewhere and then start fresh with a new backup file. Is that possible? How do I achieve it. Any online sources to read some helpful tips? Appreciate your help...
-------

BACKUP DATABASE [STS_pthsps01_1] TO DISK = N'E:\PTHSPS01_BACKUP\SharepointDB' WITH NOINIT , NOUNLOAD , NAME = N'STS_pthsps01_1 backup', NOSKIP , STATS = 10, NOFORMAT DECLARE @.i INT
select @.i = position from msdb..backupset where database_name='STS_pthsps01_1'and type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name='STS_pthsps01_1')
RESTORE VERIFYONLY FROM DISK = N'E:\PTHSPS01_BACKUP\SharepointDB' WITH FILE = @.iYou are correct. The script is only appending backups. The NOINIT is what does that. If you want to overwrite the file change NOINIT to INIT.

As to changing it, you can set up 2 jobs under SQLAgent. The first runs weekly, and does the following:
1) copy the old backups to a new directory
2) Backs up the database (with init)

The second job would run 6 days a week and just do the differential backups probably to the same file, and let the weekly job pick up it's old file.

Play around with jobs in SQLAgent, and you should get it quickly enough. Also, look up BACKUP in BOL, so you can see all the bells and whistles there.|||You are correct. The script is only appending backups. The NOINIT is what does that. If you want to overwrite the file change NOINIT to INIT.

As to changing it, you can set up 2 jobs under SQLAgent. The first runs weekly, and does the following:
1) copy the old backups to a new directory
2) Backs up the database (with init)

The second job would run 6 days a week and just do the differential backups probably to the same file, and let the weekly job pick up it's old file.

Play around with jobs in SQLAgent, and you should get it quickly enough. Also, look up BACKUP in BOL, so you can see all the bells and whistles there.
Hi Thanks.
Thats a good suggestion. I will do that. Also, In the script that I copied F is for full. What needs to be changed to make full to differential.
I want to create 2 jobs.
1- Full backup every friday night with INIT
2- Diff backup the remaining days with NOINIT.
I will have a windows scheduler to copy this file every week to alternate location.|||Hello, I inherited a SQL Server from my predecissor and came accross this backup script..Can anyone please help me in understanding what this means?
This script is currently backing up the 1.3GB database. and the current backup file size is 67GB. Maybe this script is adding up all the backs cummulatively everyday. I want it to make a fullbackup once a day and make incremental backups remaining 6 days. At the end of the week, I want to save the file somewhere and then start fresh with a new backup file. Is that possible? How do I achieve it. Any online sources to read some helpful tips? Appreciate your help...
-------

BACKUP DATABASE [STS_pthsps01_1] TO DISK = N'E:\PTHSPS01_BACKUP\SharepointDB' WITH NOINIT , NOUNLOAD , NAME = N'STS_pthsps01_1 backup', NOSKIP , STATS = 10, NOFORMAT DECLARE @.i INT
select @.i = position from msdb..backupset where database_name='STS_pthsps01_1'and type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name='STS_pthsps01_1')
RESTORE VERIFYONLY FROM DISK = N'E:\PTHSPS01_BACKUP\SharepointDB' WITH FILE = @.i

The switch database_name='STS_pthsps01_1'and type!='F' means that it is fullbackup. How do I change it to be Differential? I tried creating a new job, but, its all T-SQL that I can do. I didnt see a GUI way.|||The restore command actually ends at "STATS = 10, NOFORMAT" After that, a query to determine the filenumber starts. The restore verifyonly checks the validity of the backup (kinda).
The types of backups are as follows:
D: Full
I: Differential (incremental)
L: Transaction log

Why the query is looking for type not equal to "F", I am not sure, since all of them are not equal to "F".|||Thanks Mcrowly for the clarification. I am clear now on the existing command. Now, Looking at the script, I am not seeing it to backup FULL. Can you please point me to where I can say backup D or backup I? I looked in BOL, and couldnt find any help from the T-SQL perspective there. Appreciate your help.|||A full backup is the default behaviour of the BACKUP DATABASE command. In order to get a differential backup, you have to supply the DIFFERENTIAL argument in the WITH list.|||Hi, Thanks for your reply.
I have modified the script to take differential as follows and it works fine.. Is this correct?
-------
BACKUP DATABASE [STS_pthsps01_1] TO DISK = N'E:\PTHSPS01_BACKUP\SharepointDB' WITH NOINIT , DIFFERENTIAL, NOUNLOAD , NAME = N'STS_pthsps01_1 backup', NOSKIP , STATS = 10, NOFORMAT DECLARE @.i INT
select @.i = position from msdb..backupset where database_name='STS_pthsps01_1'and type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name='STS_pthsps01_1')
RESTORE VERIFYONLY FROM DISK = N'E:\PTHSPS01_BACKUP\SharepointDB' WITH FILE = @.i
----------

Looks like this script backs up the diff between the full backup and the time diff is executed. The next diff backup will be again between full backup and 3rd day.
1) Full backup
2) Diff bwtween 1 and 2
3) Diff between 1 and 3
4) Diff between 1 and 4

How do we make the 3) to be 2 and 3 instead of 1 and 3?

DB Backup Question

Hello,
I know the transaction log will grow while backing up a
database, but will the database file grow as well if the
database is not in use?
Any help would be greatly appreciated!
Thanks in advance.
If the Db is not being actively updated i would not expect either the
databse, or the log to grow t all during a backup.
I am not sure what you mean when you say you "know the log will grow". Is
there an underlying problem you are trying to resolve?
Mike John
"Gene S." <anonymous@.discussions.microsoft.com> wrote in message
news:21b801c4ac8b$c816de30$a601280a@.phx.gbl...
> Hello,
> I know the transaction log will grow while backing up a
> database, but will the database file grow as well if the
> database is not in use?
> Any help would be greatly appreciated!
> Thanks in advance.
sql