Showing posts with label disk. Show all posts
Showing posts with label disk. Show all posts

Friday, March 30, 2012

Restore: Cannot Open Backup Device

I am attempting to restore a database onto "Server_A" from a backup file
located on a disk from a different server, "Server_B". My T-SQL is the
following:
restore database [dbname] from disk = '\\server_b\e$\backups\[backupfile.bak]
'
1. I have a domain account set up, and the domain account is running SQLAgent
on Server_A. This service has been stopped and restarted, and even
MSSQLServer service has been stopped and restarted.
2. From Server_A I can UNC successfully to '\\server_b\e$\backups\[backupfile.
bak]'.
3. When I run master..xp_cmdshell 'dir \\server_b\e$\backups\[backupfile.bak]
' I get returned "Access is Denied"
What am I missing? Since I can successfully UNC to the directory and file on
Server_B, it seems there is something not set up right on SQL Server. Please
help.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200507/1
You need to give read / write permission on the shared folder
"\\server_b\e$\backups" to the account used by sql server and sql agent
services.
AMB
"Robert Richards via droptable.com" wrote:

> I am attempting to restore a database onto "Server_A" from a backup file
> located on a disk from a different server, "Server_B". My T-SQL is the
> following:
> restore database [dbname] from disk = '\\server_b\e$\backups\[backupfile.bak]
> '
> 1. I have a domain account set up, and the domain account is running SQLAgent
> on Server_A. This service has been stopped and restarted, and even
> MSSQLServer service has been stopped and restarted.
> 2. From Server_A I can UNC successfully to '\\server_b\e$\backups\[backupfile.
> bak]'.
> 3. When I run master..xp_cmdshell 'dir \\server_b\e$\backups\[backupfile.bak]
> ' I get returned "Access is Denied"
> What am I missing? Since I can successfully UNC to the directory and file on
> Server_B, it seems there is something not set up right on SQL Server. Please
> help.
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200507/1
>
|||The account has full control on "\\server_b\e$\backups". As a check, I UNC'd
over to the directory and created a text file, just to test.
Alejandro Mesa wrote:[vbcol=seagreen]
>You need to give read / write permission on the shared folder
>"\\server_b\e$\backups" to the account used by sql server and sql agent
>services.
>AMB
>[quoted text clipped - 13 lines]
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200507/1
|||RESOLUTION:
Not only did I have to have the domain account running SQLAgent, but I also
had to have the domain account running MSSQLServer on Server_A.
Robert Richards wrote:
>I am attempting to restore a database onto "Server_A" from a backup file
>located on a disk from a different server, "Server_B". My T-SQL is the
>following:
>restore database [dbname] from disk = '\\server_b\e$\backups\[backupfile.bak]
>'
>1. I have a domain account set up, and the domain account is running SQLAgent
>on Server_A. This service has been stopped and restarted, and even
>MSSQLServer service has been stopped and restarted.
>2. From Server_A I can UNC successfully to '\\server_b\e$\backups\[backupfile.
>bak]'.
>3. When I run master..xp_cmdshell 'dir \\server_b\e$\backups\[backupfile.bak]
>' I get returned "Access is Denied"
>What am I missing? Since I can successfully UNC to the directory and file on
>Server_B, it seems there is something not set up right on SQL Server. Please
>help.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200507/1
|||Robert,

> The account has full control on "\\server_b\e$\backups". As a check, I UNC'd
> over to the directory and created a text file, just to test.
I am not talking about your account, I am talking about the domain account
used by sql server and sql agent services.
Why can't I backup/restore my SQL Server database to a share on another
server?
http://www.windowsitpro.com/Article/...025/14025.html
AMB
"Robert Richards via droptable.com" wrote:

> The account has full control on "\\server_b\e$\backups". As a check, I UNC'd
> over to the directory and created a text file, just to test.
> Alejandro Mesa wrote:
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200507/1
>
sql

Restore: Cannot Open Backup Device

I am attempting to restore a database onto "Server_A" from a backup file
located on a disk from a different server, "Server_B". My T-SQL is the
following:
restore database [dbname] from disk = '\\server_b\e$\backups\[backup
file.bak]
'
1. I have a domain account set up, and the domain account is running SQLAgen
t
on Server_A. This service has been stopped and restarted, and even
MSSQLServer service has been stopped and restarted.
2. From Server_A I can UNC successfully to '\\server_b\e$\backups\[backu
pfile.
bak]'.
3. When I run master..xp_cmdshell 'dir \\server_b\e$\backups\[backupfile
.bak]
' I get returned "Access is Denied"
What am I missing? Since I can successfully UNC to the directory and file on
Server_B, it seems there is something not set up right on SQL Server. Please
help.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200507/1You need to give read / write permission on the shared folder
"\\server_b\e$\backups" to the account used by sql server and sql agent
services.
AMB
"Robert Richards via droptable.com" wrote:

> I am attempting to restore a database onto "Server_A" from a backup file
> located on a disk from a different server, "Server_B". My T-SQL is the
> following:
> restore database [dbname] from disk = '\\server_b\e$\backups\[back
upfile.bak]
> '
> 1. I have a domain account set up, and the domain account is running SQLAg
ent
> on Server_A. This service has been stopped and restarted, and even
> MSSQLServer service has been stopped and restarted.
> 2. From Server_A I can UNC successfully to '\\server_b\e$\backups\[bac
kupfile.
> bak]'.
> 3. When I run master..xp_cmdshell 'dir \\server_b\e$\backups\[backupfi
le.bak]
> ' I get returned "Access is Denied"
> What am I missing? Since I can successfully UNC to the directory and file
on
> Server_B, it seems there is something not set up right on SQL Server. Plea
se
> help.
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1
>|||The account has full control on "\\server_b\e$\backups". As a check, I UNC'd
over to the directory and created a text file, just to test.
Alejandro Mesa wrote:[vbcol=seagreen]
>You need to give read / write permission on the shared folder
>"\\server_b\e$\backups" to the account used by sql server and sql agent
>services.
>AMB
>
>[quoted text clipped - 13 lines]
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200507/1|||RESOLUTION:
Not only did I have to have the domain account running SQLAgent, but I also
had to have the domain account running MSSQLServer on Server_A.
Robert Richards wrote:
>I am attempting to restore a database onto "Server_A" from a backup file
>located on a disk from a different server, "Server_B". My T-SQL is the
>following:
>restore database [dbname] from disk = '\\server_b\e$\backups\[backu
pfile.bak]
>'
>1. I have a domain account set up, and the domain account is running SQLAge
nt
>on Server_A. This service has been stopped and restarted, and even
>MSSQLServer service has been stopped and restarted.
>2. From Server_A I can UNC successfully to '\\server_b\e$\backups\[back
upfile.
>bak]'.
>3. When I run master..xp_cmdshell 'dir \\server_b\e$\backups\[backupfil
e.bak]
>' I get returned "Access is Denied"
>What am I missing? Since I can successfully UNC to the directory and file o
n
>Server_B, it seems there is something not set up right on SQL Server. Pleas
e
>help.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200507/1|||Robert,

> The account has full control on "\\server_b\e$\backups". As a check, I UNC
'd
> over to the directory and created a text file, just to test.
I am not talking about your account, I am talking about the domain account
used by sql server and sql agent services.
Why can't I backup/restore my SQL Server database to a share on another
server?
http://www.windowsitpro.com/Article...4025/14025.html
AMB
"Robert Richards via droptable.com" wrote:

> The account has full control on "\\server_b\e$\backups". As a check, I UNC
'd
> over to the directory and created a text file, just to test.
> Alejandro Mesa wrote:
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1
>

Restore: Cannot Open Backup Device

I am attempting to restore a database onto "Server_A" from a backup file
located on a disk from a different server, "Server_B". My T-SQL is the
following:
restore database [dbname] from disk = '\\server_b\e$\backups\[backupfile.bak]
'
1. I have a domain account set up, and the domain account is running SQLAgent
on Server_A. This service has been stopped and restarted, and even
MSSQLServer service has been stopped and restarted.
2. From Server_A I can UNC successfully to '\\server_b\e$\backups\[backupfile.
bak]'.
3. When I run master..xp_cmdshell 'dir \\server_b\e$\backups\[backupfile.bak]
' I get returned "Access is Denied"
What am I missing? Since I can successfully UNC to the directory and file on
Server_B, it seems there is something not set up right on SQL Server. Please
help.
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200507/1You need to give read / write permission on the shared folder
"\\server_b\e$\backups" to the account used by sql server and sql agent
services.
AMB
"Robert Richards via SQLMonster.com" wrote:
> I am attempting to restore a database onto "Server_A" from a backup file
> located on a disk from a different server, "Server_B". My T-SQL is the
> following:
> restore database [dbname] from disk = '\\server_b\e$\backups\[backupfile.bak]
> '
> 1. I have a domain account set up, and the domain account is running SQLAgent
> on Server_A. This service has been stopped and restarted, and even
> MSSQLServer service has been stopped and restarted.
> 2. From Server_A I can UNC successfully to '\\server_b\e$\backups\[backupfile.
> bak]'.
> 3. When I run master..xp_cmdshell 'dir \\server_b\e$\backups\[backupfile.bak]
> ' I get returned "Access is Denied"
> What am I missing? Since I can successfully UNC to the directory and file on
> Server_B, it seems there is something not set up right on SQL Server. Please
> help.
>
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200507/1
>|||The account has full control on "\\server_b\e$\backups". As a check, I UNC'd
over to the directory and created a text file, just to test.
Alejandro Mesa wrote:
>You need to give read / write permission on the shared folder
>"\\server_b\e$\backups" to the account used by sql server and sql agent
>services.
>AMB
>> I am attempting to restore a database onto "Server_A" from a backup file
>> located on a disk from a different server, "Server_B". My T-SQL is the
>[quoted text clipped - 13 lines]
>> Server_B, it seems there is something not set up right on SQL Server. Please
>> help.
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200507/1|||RESOLUTION:
Not only did I have to have the domain account running SQLAgent, but I also
had to have the domain account running MSSQLServer on Server_A.
Robert Richards wrote:
>I am attempting to restore a database onto "Server_A" from a backup file
>located on a disk from a different server, "Server_B". My T-SQL is the
>following:
>restore database [dbname] from disk = '\\server_b\e$\backups\[backupfile.bak]
>'
>1. I have a domain account set up, and the domain account is running SQLAgent
>on Server_A. This service has been stopped and restarted, and even
>MSSQLServer service has been stopped and restarted.
>2. From Server_A I can UNC successfully to '\\server_b\e$\backups\[backupfile.
>bak]'.
>3. When I run master..xp_cmdshell 'dir \\server_b\e$\backups\[backupfile.bak]
>' I get returned "Access is Denied"
>What am I missing? Since I can successfully UNC to the directory and file on
>Server_B, it seems there is something not set up right on SQL Server. Please
>help.
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200507/1|||Robert,
> The account has full control on "\\server_b\e$\backups". As a check, I UNC'd
> over to the directory and created a text file, just to test.
I am not talking about your account, I am talking about the domain account
used by sql server and sql agent services.
Why can't I backup/restore my SQL Server database to a share on another
server?
http://www.windowsitpro.com/Article/ArticleID/14025/14025.html
AMB
"Robert Richards via SQLMonster.com" wrote:
> The account has full control on "\\server_b\e$\backups". As a check, I UNC'd
> over to the directory and created a text file, just to test.
> Alejandro Mesa wrote:
> >You need to give read / write permission on the shared folder
> >"\\server_b\e$\backups" to the account used by sql server and sql agent
> >services.
> >
> >AMB
> >
> >> I am attempting to restore a database onto "Server_A" from a backup file
> >> located on a disk from a different server, "Server_B". My T-SQL is the
> >[quoted text clipped - 13 lines]
> >> Server_B, it seems there is something not set up right on SQL Server. Please
> >> help.
>
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200507/1
>

Restore without big transaction log

All,
Our production database is growing quite rapidly and I'm having trouble
refreshing our QA and Dev environments due to limited disk space on those
servers. My process now is
- Restore the production DB with a new name
- Set to simple and shrink the log file to 0
- Back up the shrunk db to a new .bak file
- Restore to dev or QA from that .bak file
Our production DB is way to busy to shrink the log file on and it's kind of
a pain to go through all those steps. I was wondering if anyone knew a way to
restore from a backup with an empty .trn file? I don't see that this is
possible, but thought I'd ask.
Thanks in advance.
> I was wondering if anyone knew a way to
> restore from a backup with an empty .trn file? I don't see that this is
> possible, but thought I'd ask.
Your assumption is correct. A restored database need as big file size for each file as the one you
were restoring from.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:3357D5E4-5001-42C7-8ED5-E854B7E90711@.microsoft.com...
> All,
> Our production database is growing quite rapidly and I'm having trouble
> refreshing our QA and Dev environments due to limited disk space on those
> servers. My process now is
> - Restore the production DB with a new name
> - Set to simple and shrink the log file to 0
> - Back up the shrunk db to a new .bak file
> - Restore to dev or QA from that .bak file
> Our production DB is way to busy to shrink the log file on and it's kind of
> a pain to go through all those steps. I was wondering if anyone knew a way to
> restore from a backup with an empty .trn file? I don't see that this is
> possible, but thought I'd ask.
> Thanks in advance.
|||On Jul 10, 2:20 pm, sqlboy2000 <sqlboy2...@.discussions.microsoft.com>
wrote:
> All,
> Our production database is growing quite rapidly and I'm having trouble
> refreshing our QA and Dev environments due to limited disk space on those
> servers. My process now is
> - Restore the production DB with a new name
> - Set to simple and shrink the log file to 0
> - Back up the shrunk db to a new .bak file
> - Restore to dev or QA from that .bak file
> Our production DB is way to busy to shrink the log file on and it's kind of
> a pain to go through all those steps. I was wondering if anyone knew a way to
> restore from a backup with an empty .trn file? I don't see that this is
> possible, but thought I'd ask.
> Thanks in advance.
One solution might be once you backup your production database (full
backup) to truncate your transaction log and shrink it, then perform
the restore after that. I would think that would clear up quite a few
space issues.
|||> One solution might be once you backup your production database (full
> backup) to truncate your transaction log and shrink it, then perform
> the restore after that.
This won't help. I assume you mean shrink the transaction log file for the (existing) destination
database. Won't help, since SQL Server need to create each file with same size as the originating
database has.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"acorcoran" <acorcoran@.gmail.com> wrote in message
news:1184209592.791721.108060@.k79g2000hse.googlegr oups.com...
> On Jul 10, 2:20 pm, sqlboy2000 <sqlboy2...@.discussions.microsoft.com>
> wrote:
> One solution might be once you backup your production database (full
> backup) to truncate your transaction log and shrink it, then perform
> the restore after that. I would think that would clear up quite a few
> space issues.
>
|||On Jul 12, 2:58 am, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> This won't help. I assume you mean shrink the transaction log file for the (existing) destination
> database. Won't help, since SQL Server need to create each file with same size as the originating
> database has.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
> "acorcoran" <acorco...@.gmail.com> wrote in message
> news:1184209592.791721.108060@.k79g2000hse.googlegr oups.com...
>
>
>
>
> - Show quoted text -
This is true, however, I guess I was thinking of backing up the
production database, truncting the log file, then re-backing up the
database (just for day 1). When you restore, you will be restoring a
very limited size log file. Of course, I guess this simply depends on
how large your log file grows between your full backups. As all
future backups would consist of a full backup then a truncation,
maintaining the size on your source database.
Just a though.

Restore without big transaction log

All,
Our production database is growing quite rapidly and I'm having trouble
refreshing our QA and Dev environments due to limited disk space on those
servers. My process now is
- Restore the production DB with a new name
- Set to simple and shrink the log file to 0
- Back up the shrunk db to a new .bak file
- Restore to dev or QA from that .bak file
Our production DB is way to busy to shrink the log file on and it's kind of
a pain to go through all those steps. I was wondering if anyone knew a way t
o
restore from a backup with an empty .trn file? I don't see that this is
possible, but thought I'd ask.
Thanks in advance.> I was wondering if anyone knew a way to
> restore from a backup with an empty .trn file? I don't see that this is
> possible, but thought I'd ask.
Your assumption is correct. A restored database need as big file size for ea
ch file as the one you
were restoring from.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:3357D5E4-5001-42C7-8ED5-E854B7E90711@.microsoft.com...
> All,
> Our production database is growing quite rapidly and I'm having trouble
> refreshing our QA and Dev environments due to limited disk space on those
> servers. My process now is
> - Restore the production DB with a new name
> - Set to simple and shrink the log file to 0
> - Back up the shrunk db to a new .bak file
> - Restore to dev or QA from that .bak file
> Our production DB is way to busy to shrink the log file on and it's kind o
f
> a pain to go through all those steps. I was wondering if anyone knew a way
to
> restore from a backup with an empty .trn file? I don't see that this is
> possible, but thought I'd ask.
> Thanks in advance.|||On Jul 10, 2:20 pm, sqlboy2000 <sqlboy2...@.discussions.microsoft.com>
wrote:
> All,
> Our production database is growing quite rapidly and I'm having trouble
> refreshing our QA and Dev environments due to limited disk space on those
> servers. My process now is
> - Restore the production DB with a new name
> - Set to simple and shrink the log file to 0
> - Back up the shrunk db to a new .bak file
> - Restore to dev or QA from that .bak file
> Our production DB is way to busy to shrink the log file on and it's kind o
f
> a pain to go through all those steps. I was wondering if anyone knew a way
to
> restore from a backup with an empty .trn file? I don't see that this is
> possible, but thought I'd ask.
> Thanks in advance.
One solution might be once you backup your production database (full
backup) to truncate your transaction log and shrink it, then perform
the restore after that. I would think that would clear up quite a few
space issues.|||> One solution might be once you backup your production database (full
> backup) to truncate your transaction log and shrink it, then perform
> the restore after that.
This won't help. I assume you mean shrink the transaction log file for the (
existing) destination
database. Won't help, since SQL Server need to create each file with same si
ze as the originating
database has.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"acorcoran" <acorcoran@.gmail.com> wrote in message
news:1184209592.791721.108060@.k79g2000hse.googlegroups.com...
> On Jul 10, 2:20 pm, sqlboy2000 <sqlboy2...@.discussions.microsoft.com>
> wrote:
> One solution might be once you backup your production database (full
> backup) to truncate your transaction log and shrink it, then perform
> the restore after that. I would think that would clear up quite a few
> space issues.
>|||On Jul 12, 2:58 am, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> This won't help. I assume you mean shrink the transaction log file for the
(existing) destination
> database. Won't help, since SQL Server need to create each file with same
size as the originating
> database has.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asph
ttp://sqlblog.com/blogs/tibor_karaszi
> "acorcoran" <acorco...@.gmail.com> wrote in message
> news:1184209592.791721.108060@.k79g2000hse.googlegroups.com...
>
>
>
>
>
>
> - Show quoted text -
This is true, however, I guess I was thinking of backing up the
production database, truncting the log file, then re-backing up the
database (just for day 1). When you restore, you will be restoring a
very limited size log file. Of course, I guess this simply depends on
how large your log file grows between your full backups. As all
future backups would consist of a full backup then a truncation,
maintaining the size on your source database.
Just a though.

Restore without big transaction log

All,
Our production database is growing quite rapidly and I'm having trouble
refreshing our QA and Dev environments due to limited disk space on those
servers. My process now is
- Restore the production DB with a new name
- Set to simple and shrink the log file to 0
- Back up the shrunk db to a new .bak file
- Restore to dev or QA from that .bak file
Our production DB is way to busy to shrink the log file on and it's kind of
a pain to go through all those steps. I was wondering if anyone knew a way to
restore from a backup with an empty .trn file? I don't see that this is
possible, but thought I'd ask.
Thanks in advance.> I was wondering if anyone knew a way to
> restore from a backup with an empty .trn file? I don't see that this is
> possible, but thought I'd ask.
Your assumption is correct. A restored database need as big file size for each file as the one you
were restoring from.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:3357D5E4-5001-42C7-8ED5-E854B7E90711@.microsoft.com...
> All,
> Our production database is growing quite rapidly and I'm having trouble
> refreshing our QA and Dev environments due to limited disk space on those
> servers. My process now is
> - Restore the production DB with a new name
> - Set to simple and shrink the log file to 0
> - Back up the shrunk db to a new .bak file
> - Restore to dev or QA from that .bak file
> Our production DB is way to busy to shrink the log file on and it's kind of
> a pain to go through all those steps. I was wondering if anyone knew a way to
> restore from a backup with an empty .trn file? I don't see that this is
> possible, but thought I'd ask.
> Thanks in advance.|||On Jul 10, 2:20 pm, sqlboy2000 <sqlboy2...@.discussions.microsoft.com>
wrote:
> All,
> Our production database is growing quite rapidly and I'm having trouble
> refreshing our QA and Dev environments due to limited disk space on those
> servers. My process now is
> - Restore the production DB with a new name
> - Set to simple and shrink the log file to 0
> - Back up the shrunk db to a new .bak file
> - Restore to dev or QA from that .bak file
> Our production DB is way to busy to shrink the log file on and it's kind of
> a pain to go through all those steps. I was wondering if anyone knew a way to
> restore from a backup with an empty .trn file? I don't see that this is
> possible, but thought I'd ask.
> Thanks in advance.
One solution might be once you backup your production database (full
backup) to truncate your transaction log and shrink it, then perform
the restore after that. I would think that would clear up quite a few
space issues.|||> One solution might be once you backup your production database (full
> backup) to truncate your transaction log and shrink it, then perform
> the restore after that.
This won't help. I assume you mean shrink the transaction log file for the (existing) destination
database. Won't help, since SQL Server need to create each file with same size as the originating
database has.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"acorcoran" <acorcoran@.gmail.com> wrote in message
news:1184209592.791721.108060@.k79g2000hse.googlegroups.com...
> On Jul 10, 2:20 pm, sqlboy2000 <sqlboy2...@.discussions.microsoft.com>
> wrote:
>> All,
>> Our production database is growing quite rapidly and I'm having trouble
>> refreshing our QA and Dev environments due to limited disk space on those
>> servers. My process now is
>> - Restore the production DB with a new name
>> - Set to simple and shrink the log file to 0
>> - Back up the shrunk db to a new .bak file
>> - Restore to dev or QA from that .bak file
>> Our production DB is way to busy to shrink the log file on and it's kind of
>> a pain to go through all those steps. I was wondering if anyone knew a way to
>> restore from a backup with an empty .trn file? I don't see that this is
>> possible, but thought I'd ask.
>> Thanks in advance.
> One solution might be once you backup your production database (full
> backup) to truncate your transaction log and shrink it, then perform
> the restore after that. I would think that would clear up quite a few
> space issues.
>|||On Jul 12, 2:58 am, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> > One solution might be once you backup your production database (full
> > backup) to truncate your transaction log and shrink it, then perform
> > the restore after that.
> This won't help. I assume you mean shrink the transaction log file for the (existing) destination
> database. Won't help, since SQL Server need to create each file with same size as the originating
> database has.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
> "acorcoran" <acorco...@.gmail.com> wrote in message
> news:1184209592.791721.108060@.k79g2000hse.googlegroups.com...
>
> > On Jul 10, 2:20 pm, sqlboy2000 <sqlboy2...@.discussions.microsoft.com>
> > wrote:
> >> All,
> >> Our production database is growing quite rapidly and I'm having trouble
> >> refreshing our QA and Dev environments due to limited disk space on those
> >> servers. My process now is
> >> - Restore the production DB with a new name
> >> - Set to simple and shrink the log file to 0
> >> - Back up the shrunk db to a new .bak file
> >> - Restore to dev or QA from that .bak file
> >> Our production DB is way to busy to shrink the log file on and it's kind of
> >> a pain to go through all those steps. I was wondering if anyone knew a way to
> >> restore from a backup with an empty .trn file? I don't see that this is
> >> possible, but thought I'd ask.
> >> Thanks in advance.
> > One solution might be once you backup your production database (full
> > backup) to truncate your transaction log and shrink it, then perform
> > the restore after that. I would think that would clear up quite a few
> > space issues.- Hide quoted text -
> - Show quoted text -
This is true, however, I guess I was thinking of backing up the
production database, truncting the log file, then re-backing up the
database (just for day 1). When you restore, you will be restoring a
very limited size log file. Of course, I guess this simply depends on
how large your log file grows between your full backups. As all
future backups would consist of a full backup then a truncation,
maintaining the size on your source database.
Just a though.

Wednesday, March 28, 2012

RESTORE VERIFYONLY - Disk space

What is the disk space required for RESTORE VERIFYONLY ?
Could it be the size of the database ?
I got a backup of 11.8 GB and only 11.3 GB free.
If I run RESTORE VERIFYONLY, it does not return anything (no 'The
backup set is valid.').
After that I always get MS Windows 'Device full' errors whenever I try to
save any
file even if I still have 11 GB free.
I may not event start the MS Windows event viewer
I have to reboot my server.
Could it be that RESTORE VERIFYONLY restores the DB in some temporary
file and that the space is not actually released after RESTORE
VERIFYONLY failed ?
If this is the case is there a way to specify a directory for RESTORE
VERIFYONLY ?
Thanks in advance.
PS I am using MS SQL Server 2000 (8.00.760 SP3) on Windows 2000 Server
5.00.2195 SP4.
Hi, Eric
RESTORE VERIFYONLY only reads the backup, without writing anything in
any database (not even a temporary file), so free space is not an issue
when you use RESTORE VERIFYONLY (i.e. you can have only 1GB of free
space, and it would still work for a 11GB backup).
Razvan
|||VERIFYONLY simply reads the backup. In SQL Server 2000, it essentially read
the header. In SQL Server 2005, it reads the header, checksums, and page
chain. It doesn't write the backup back out anywhere.
What else is happening on your server when this runs?
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"Paesmans Eric" <epa@.missioncriticalit.com> wrote in message
news:43c3c8d5$0$440$6c56d894@.reader0.news.be.easyn et.net...
> What is the disk space required for RESTORE VERIFYONLY ?
>
> Could it be the size of the database ?
>
> I got a backup of 11.8 GB and only 11.3 GB free.
>
> If I run RESTORE VERIFYONLY, it does not return anything (no 'The
> backup set is valid.').
>
> After that I always get MS Windows 'Device full' errors whenever I try to
> save any
> file even if I still have 11 GB free.
> I may not event start the MS Windows event viewer
> I have to reboot my server.
>
> Could it be that RESTORE VERIFYONLY restores the DB in some temporary
> file and that the space is not actually released after RESTORE
> VERIFYONLY failed ?
>
> If this is the case is there a way to specify a directory for RESTORE
> VERIFYONLY ?
>
> Thanks in advance.
>
> PS I am using MS SQL Server 2000 (8.00.760 SP3) on Windows 2000 Server
> 5.00.2195 SP4.
>
|||The command is executed via a Bash script that is started by the SQL Agent
as a DTS Package.
"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:%233w7T9fFGHA.3172@.TK2MSFTNGP10.phx.gbl...
> VERIFYONLY simply reads the backup. In SQL Server 2000, it essentially
read[vbcol=seagreen]
> the header. In SQL Server 2005, it reads the header, checksums, and page
> chain. It doesn't write the backup back out anywhere.
> What else is happening on your server when this runs?
> --
> Mike
> Mentor
> Solid Quality Learning
> http://www.solidqualitylearning.com
>
> "Paesmans Eric" <epa@.missioncriticalit.com> wrote in message
> news:43c3c8d5$0$440$6c56d894@.reader0.news.be.easyn et.net...
to
>

RESTORE VERIFYONLY - Disk space

What is the disk space required for RESTORE VERIFYONLY ?
Could it be the size of the database ?
I got a backup of 11.8 GB and only 11.3 GB free.
If I run RESTORE VERIFYONLY, it does not return anything (no 'The
backup set is valid.').
After that I always get MS Windows 'Device full' errors whenever I try to
save any
file even if I still have 11 GB free.
I may not event start the MS Windows event viewer
I have to reboot my server.
Could it be that RESTORE VERIFYONLY restores the DB in some temporary
file and that the space is not actually released after RESTORE
VERIFYONLY failed ?
If this is the case is there a way to specify a directory for RESTORE
VERIFYONLY ?
Thanks in advance.
PS I am using MS SQL Server 2000 (8.00.760 SP3) on Windows 2000 Server
5.00.2195 SP4.Hi, Eric
RESTORE VERIFYONLY only reads the backup, without writing anything in
any database (not even a temporary file), so free space is not an issue
when you use RESTORE VERIFYONLY (i.e. you can have only 1GB of free
space, and it would still work for a 11GB backup).
Razvan|||VERIFYONLY simply reads the backup. In SQL Server 2000, it essentially read
the header. In SQL Server 2005, it reads the header, checksums, and page
chain. It doesn't write the backup back out anywhere.
What else is happening on your server when this runs?
--
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"Paesmans Eric" <epa@.missioncriticalit.com> wrote in message
news:43c3c8d5$0$440$6c56d894@.reader0.news.be.easynet.net...
> What is the disk space required for RESTORE VERIFYONLY ?
>
> Could it be the size of the database ?
>
> I got a backup of 11.8 GB and only 11.3 GB free.
>
> If I run RESTORE VERIFYONLY, it does not return anything (no 'The
> backup set is valid.').
>
> After that I always get MS Windows 'Device full' errors whenever I try to
> save any
> file even if I still have 11 GB free.
> I may not event start the MS Windows event viewer
> I have to reboot my server.
>
> Could it be that RESTORE VERIFYONLY restores the DB in some temporary
> file and that the space is not actually released after RESTORE
> VERIFYONLY failed ?
>
> If this is the case is there a way to specify a directory for RESTORE
> VERIFYONLY ?
>
> Thanks in advance.
>
> PS I am using MS SQL Server 2000 (8.00.760 SP3) on Windows 2000 Server
> 5.00.2195 SP4.
>|||The command is executed via a Bash script that is started by the SQL Agent
as a DTS Package.
"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:%233w7T9fFGHA.3172@.TK2MSFTNGP10.phx.gbl...
> VERIFYONLY simply reads the backup. In SQL Server 2000, it essentially
read
> the header. In SQL Server 2005, it reads the header, checksums, and page
> chain. It doesn't write the backup back out anywhere.
> What else is happening on your server when this runs?
> --
> Mike
> Mentor
> Solid Quality Learning
> http://www.solidqualitylearning.com
>
> "Paesmans Eric" <epa@.missioncriticalit.com> wrote in message
> news:43c3c8d5$0$440$6c56d894@.reader0.news.be.easynet.net...
> > What is the disk space required for RESTORE VERIFYONLY ?
> >
> >
> > Could it be the size of the database ?
> >
> >
> > I got a backup of 11.8 GB and only 11.3 GB free.
> >
> >
> > If I run RESTORE VERIFYONLY, it does not return anything (no 'The
> > backup set is valid.').
> >
> >
> > After that I always get MS Windows 'Device full' errors whenever I try
to
> > save any
> > file even if I still have 11 GB free.
> > I may not event start the MS Windows event viewer
> > I have to reboot my server.
> >
> >
> > Could it be that RESTORE VERIFYONLY restores the DB in some temporary
> > file and that the space is not actually released after RESTORE
> > VERIFYONLY failed ?
> >
> >
> > If this is the case is there a way to specify a directory for RESTORE
> > VERIFYONLY ?
> >
> >
> > Thanks in advance.
> >
> >
> > PS I am using MS SQL Server 2000 (8.00.760 SP3) on Windows 2000 Server
> > 5.00.2195 SP4.
> >
> >
>

RESTORE VERIFYONLY - Disk space

What is the disk space required for RESTORE VERIFYONLY ?
Could it be the size of the database ?
I got a backup of 11.8 GB and only 11.3 GB free.
If I run RESTORE VERIFYONLY, it does not return anything (no 'The
backup set is valid.').
After that I always get MS Windows 'Device full' errors whenever I try to
save any
file even if I still have 11 GB free.
I may not event start the MS Windows event viewer
I have to reboot my server.
Could it be that RESTORE VERIFYONLY restores the DB in some temporary
file and that the space is not actually released after RESTORE
VERIFYONLY failed ?
If this is the case is there a way to specify a directory for RESTORE
VERIFYONLY ?
Thanks in advance.
PS I am using MS SQL Server 2000 (8.00.760 SP3) on Windows 2000 Server
5.00.2195 SP4.Hi, Eric
RESTORE VERIFYONLY only reads the backup, without writing anything in
any database (not even a temporary file), so free space is not an issue
when you use RESTORE VERIFYONLY (i.e. you can have only 1GB of free
space, and it would still work for a 11GB backup).
Razvan|||VERIFYONLY simply reads the backup. In SQL Server 2000, it essentially read
the header. In SQL Server 2005, it reads the header, checksums, and page
chain. It doesn't write the backup back out anywhere.
What else is happening on your server when this runs?
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"Paesmans Eric" <epa@.missioncriticalit.com> wrote in message
news:43c3c8d5$0$440$6c56d894@.reader0.news.be.easynet.net...
> What is the disk space required for RESTORE VERIFYONLY ?
>
> Could it be the size of the database ?
>
> I got a backup of 11.8 GB and only 11.3 GB free.
>
> If I run RESTORE VERIFYONLY, it does not return anything (no 'The
> backup set is valid.').
>
> After that I always get MS Windows 'Device full' errors whenever I try to
> save any
> file even if I still have 11 GB free.
> I may not event start the MS Windows event viewer
> I have to reboot my server.
>
> Could it be that RESTORE VERIFYONLY restores the DB in some temporary
> file and that the space is not actually released after RESTORE
> VERIFYONLY failed ?
>
> If this is the case is there a way to specify a directory for RESTORE
> VERIFYONLY ?
>
> Thanks in advance.
>
> PS I am using MS SQL Server 2000 (8.00.760 SP3) on Windows 2000 Server
> 5.00.2195 SP4.
>|||The command is executed via a Bash script that is started by the SQL Agent
as a DTS Package.
"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:%233w7T9fFGHA.3172@.TK2MSFTNGP10.phx.gbl...
> VERIFYONLY simply reads the backup. In SQL Server 2000, it essentially
read
> the header. In SQL Server 2005, it reads the header, checksums, and page
> chain. It doesn't write the backup back out anywhere.
> What else is happening on your server when this runs?
> --
> Mike
> Mentor
> Solid Quality Learning
> http://www.solidqualitylearning.com
>
> "Paesmans Eric" <epa@.missioncriticalit.com> wrote in message
> news:43c3c8d5$0$440$6c56d894@.reader0.news.be.easynet.net...
to[vbcol=seagreen]
>

Monday, March 26, 2012

Restore to different server

If I am restoring a database from a backup file on disk on Server_A to a
database on Server_B, in the restore syntax do I need to specify the "with
move" clause if the data and log files as backed up on Server_A are going to
be restored into differently named directories on Server_B?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200507/1
Here's an example of moving from one location to another.
restore database bar
from disk = 'c:\Program Files\Microsoft SQL Server\MSSQL\Backup\foo.BAK'
with move 'fooData' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar.mdf',
move 'fooLog' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar_log.ldf',
UNLOAD ,
replace
"Robert Richards via droptable.com" wrote:

> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200507/1
>
|||Hi,
If you are restoring the database into different directories which is
differing to source directory, then you have to say
with MOVE clause in RESTORE DATABASE command.
Syntax:-
RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.mdf',
MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.ldf', STATS=10
Thanks
Hari
SQL Server MVP
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:515E51CF9507A@.droptable.com...
> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going
> to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200507/1
|||Just curious, do the data files and such on the originating server remain
usable after the restore to the destination server? That is, I am creating a
backup of production for testing, and I of course want my production database
to remain.
Hari Prasad wrote:[vbcol=seagreen]
>Hi,
>If you are restoring the database into different directories which is
>differing to source directory, then you have to say
>with MOVE clause in RESTORE DATABASE command.
>Syntax:-
>RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
>WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.mdf',
> MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.ldf', STATS=10
>Thanks
>Hari
>SQL Server MVP
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200507/1
|||When you do a backup it essentially makes a pseudo copy. Nothing happens to
the original files at all.
Andrew J. Kelly SQL MVP
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:515FA18FA3868@.droptable.com...
> Just curious, do the data files and such on the originating server remain
> usable after the restore to the destination server? That is, I am creating
> a
> backup of production for testing, and I of course want my production
> database
> to remain.
> Hari Prasad wrote:
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200507/1

Restore to different server

If I am restoring a database from a backup file on disk on Server_A to a
database on Server_B, in the restore syntax do I need to specify the "with
move" clause if the data and log files as backed up on Server_A are going to
be restored into differently named directories on Server_B?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200507/1Here's an example of moving from one location to another.
restore database bar
from disk = 'c:\Program Files\Microsoft SQL Server\MSSQL\Backup\foo.BAK'
with move 'fooData' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar.mdf',
move 'fooLog' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar_log.ldf',
UNLOAD ,
replace
"Robert Richards via droptable.com" wrote:

> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going
to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1
>|||Hi,
If you are restoring the database into different directories which is
differing to source directory, then you have to say
with MOVE clause in RESTORE DATABASE command.
Syntax:-
RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.mdf',
MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.ldf', STATS=10
Thanks
Hari
SQL Server MVP
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:515E51CF9507A@.droptable.com...
> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going
> to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1|||Just curious, do the data files and such on the originating server remain
usable after the restore to the destination server? That is, I am creating a
backup of production for testing, and I of course want my production databas
e
to remain.
Hari Prasad wrote:[vbcol=seagreen]
>Hi,
>If you are restoring the database into different directories which is
>differing to source directory, then you have to say
>with MOVE clause in RESTORE DATABASE command.
>Syntax:-
>RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
>WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.mdf',
> MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.ldf', STATS=10
>Thanks
>Hari
>SQL Server MVP
>
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200507/1|||When you do a backup it essentially makes a pseudo copy. Nothing happens to
the original files at all.
Andrew J. Kelly SQL MVP
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:515FA18FA3868@.droptable.com...
> Just curious, do the data files and such on the originating server remain
> usable after the restore to the destination server? That is, I am creating
> a
> backup of production for testing, and I of course want my production
> database
> to remain.
> Hari Prasad wrote:
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1sql

Restore to different server

If I am restoring a database from a backup file on disk on Server_A to a
database on Server_B, in the restore syntax do I need to specify the "with
move" clause if the data and log files as backed up on Server_A are going to
be restored into differently named directories on Server_B?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200507/1Here's an example of moving from one location to another.
restore database bar
from disk = 'c:\Program Files\Microsoft SQL Server\MSSQL\Backup\foo.BAK'
with move 'fooData' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar.mdf',
move 'fooLog' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar_log.ldf',
UNLOAD ,
replace
"Robert Richards via SQLMonster.com" wrote:
> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200507/1
>|||Hi,
If you are restoring the database into different directories which is
differing to source directory, then you have to say
with MOVE clause in RESTORE DATABASE command.
Syntax:-
RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.mdf',
MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.ldf', STATS=10
Thanks
Hari
SQL Server MVP
"Robert Richards via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:515E51CF9507A@.SQLMonster.com...
> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going
> to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200507/1|||Just curious, do the data files and such on the originating server remain
usable after the restore to the destination server? That is, I am creating a
backup of production for testing, and I of course want my production database
to remain.
Hari Prasad wrote:
>Hi,
>If you are restoring the database into different directories which is
>differing to source directory, then you have to say
>with MOVE clause in RESTORE DATABASE command.
>Syntax:-
>RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
>WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.mdf',
> MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.ldf', STATS=10
>Thanks
>Hari
>SQL Server MVP
>> If I am restoring a database from a backup file on disk on Server_A to a
>> database on Server_B, in the restore syntax do I need to specify the "with
>> move" clause if the data and log files as backed up on Server_A are going
>> to
>> be restored into differently named directories on Server_B?
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200507/1|||When you do a backup it essentially makes a pseudo copy. Nothing happens to
the original files at all.
--
Andrew J. Kelly SQL MVP
"Robert Richards via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:515FA18FA3868@.SQLMonster.com...
> Just curious, do the data files and such on the originating server remain
> usable after the restore to the destination server? That is, I am creating
> a
> backup of production for testing, and I of course want my production
> database
> to remain.
> Hari Prasad wrote:
>>Hi,
>>If you are restoring the database into different directories which is
>>differing to source directory, then you have to say
>>with MOVE clause in RESTORE DATABASE command.
>>Syntax:-
>>RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
>>WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
>>Server\MSSQL\Data\NewNwind.mdf',
>> MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
>>Server\MSSQL\Data\NewNwind.ldf', STATS=10
>>Thanks
>>Hari
>>SQL Server MVP
>> If I am restoring a database from a backup file on disk on Server_A to a
>> database on Server_B, in the restore syntax do I need to specify the
>> "with
>> move" clause if the data and log files as backed up on Server_A are
>> going
>> to
>> be restored into differently named directories on Server_B?
>
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200507/1

Friday, March 23, 2012

restore taking very long time

i have sql 2000 db of about 120 GB. its taking about 10 -12 hours to restore on the same disk as new database.

server configuration is good.

when i try to restore another db of about 10 GB size, its restoring in about 5 minutes.

A slow restore could be any number of things.

Is the backup on the local disk, or the network? What else is the drive with the backup doing? What else is the drive that the restore is going to doing? How much data is in the transaction log that needs to be rolled forward/backward?

|||

backup and restore is on the same local disk.

not much processes are going on, except log backup every 15 min will put data on the disk, the log backup with be finished within seconds.

reg: data in transaction log that needs to be rolled forward/ backword: i really cant say because i dont know how to calculate it.

sql

restore taking very long time

i have sql 2000 db of about 120 GB. its taking about 10 -12 hours to restore on the same disk as new database.

server configuration is good.

when i try to restore another db of about 10 GB size, its restoring in about 5 minutes.

A slow restore could be any number of things.

Is the backup on the local disk, or the network? What else is the drive with the backup doing? What else is the drive that the restore is going to doing? How much data is in the transaction log that needs to be rolled forward/backward?

|||

backup and restore is on the same local disk.

not much processes are going on, except log backup every 15 min will put data on the disk, the log backup with be finished within seconds.

reg: data in transaction log that needs to be rolled forward/ backword: i really cant say because i dont know how to calculate it.

Tuesday, March 20, 2012

Restore script restoring to old version of the database

A month ago I set up a small program to backup my databases – it ran the
following script against the database:
BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
NOINIT, PASSWORD='xxx', RETAINDAYS=90
This was run every day and saves the backup to a removable USB drive which
is taken off-site at night. The backed up file grew every time the script
was run – so I assumed it was working fine and left it to it.
Then yesterday I had a main drive failure and spent the day rebuilding my
machine. Then I went to restore my databases with the following script (in
query analyzer) (note the MOVE was needed as I am storing the data files in
a
different location now):
RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE 'MyDatabase_Log'
TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
But to my horror it has only restored the database to the point it was in a
month ago when I first started these backups – I appear to have lost a mon
ths
worth of data.
The .Bak file has a modified datetime equal to the last time the script was
run (the night before last) – so the backups were happening. What am I do
ing
wrong here? Note that the recovery model was set to FULL.
Please help.Hi
Looks like you appended each new backup into the same file. With your
restore script, you restored the 1st one.
Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
that the file contains. Then use that information to do a RESTORE DATABASE.
If you do the restore though enterprise manager, it will the backups too and
then you can select which one you want to restore.
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
>A month ago I set up a small program to backup my databases - it ran the
> following script against the database:
> BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
> NOINIT, PASSWORD='xxx', RETAINDAYS=90
> This was run every day and saves the backup to a removable USB drive which
> is taken off-site at night. The backed up file grew every time the script
> was run - so I assumed it was working fine and left it to it.
> Then yesterday I had a main drive failure and spent the day rebuilding my
> machine. Then I went to restore my databases with the following script
> (in
> query analyzer) (note the MOVE was needed as I am storing the data files
> in a
> different location now):
> RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
> WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE
> 'MyDatabase_Log'
> TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
> But to my horror it has only restored the database to the point it was in
> a
> month ago when I first started these backups - I appear to have lost a
> months
> worth of data.
> The .Bak file has a modified datetime equal to the last time the script
> was
> run (the night before last) - so the backups were happening. What am I
> doing
> wrong here? Note that the recovery model was set to FULL.
> Please help.|||Thanks Mike. I get 13 rows using RESTORE HEADERONLY. The BackupName and
BackupDescription fields are all Null. So how do I specify that I want to
restore the last one?
Also – I can’t use Enterprise Manager because it doesn’t have the opti
on to
specify a password – so I have to use a script.
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> Looks like you appended each new backup into the same file. With your
> restore script, you restored the 1st one.
> Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
> that the file contains. Then use that information to do a RESTORE DATABASE
.
> If you do the restore though enterprise manager, it will the backups too a
nd
> then you can select which one you want to restore.
>
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
> news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
>
>|||Ahhhh - Problem solved. I needed to add FILE=13 to the WITH parameters:
RESTORE DATABASE MyDatabase
FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
WITH FILE=13,
MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf',
MOVE 'MyDatabase_Log' TO 'D:\SQLData\Mydatabase_Log.ldf',
Password='xxx'
Many thanks Mike for pointing me in the right direction!
"RodneyL" wrote:
[vbcol=seagreen]
> Thanks Mike. I get 13 rows using RESTORE HEADERONLY. The BackupName and
> BackupDescription fields are all Null. So how do I specify that I want to
> restore the last one?
> Also – I can’t use Enterprise Manager because it doesn’t have the op
tion to
> specify a password – so I have to use a script.
>
> "Mike Epprecht (SQL MVP)" wrote:
>

Restore script restoring to old version of the database

A month ago I set up a small program to backup my databases – it ran the
following script against the database:
BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
NOINIT, PASSWORD='xxx', RETAINDAYS=90
This was run every day and saves the backup to a removable USB drive which
is taken off-site at night. The backed up file grew every time the script
was run – so I assumed it was working fine and left it to it.
Then yesterday I had a main drive failure and spent the day rebuilding my
machine. Then I went to restore my databases with the following script (in
query analyzer) (note the MOVE was needed as I am storing the data files in a
different location now):
RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE 'MyDatabase_Log'
TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
But to my horror it has only restored the database to the point it was in a
month ago when I first started these backups – I appear to have lost a months
worth of data.
The .Bak file has a modified datetime equal to the last time the script was
run (the night before last) – so the backups were happening. What am I doing
wrong here? Note that the recovery model was set to FULL.
Please help.
Hi
Looks like you appended each new backup into the same file. With your
restore script, you restored the 1st one.
Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
that the file contains. Then use that information to do a RESTORE DATABASE.
If you do the restore though enterprise manager, it will the backups too and
then you can select which one you want to restore.
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
>A month ago I set up a small program to backup my databases - it ran the
> following script against the database:
> BACKUP DATABASE MyDatabase TO DISK = 'F:\SQLBackups\MyDatabase.bak' WITH
> NOINIT, PASSWORD='xxx', RETAINDAYS=90
> This was run every day and saves the backup to a removable USB drive which
> is taken off-site at night. The backed up file grew every time the script
> was run - so I assumed it was working fine and left it to it.
> Then yesterday I had a main drive failure and spent the day rebuilding my
> machine. Then I went to restore my databases with the following script
> (in
> query analyzer) (note the MOVE was needed as I am storing the data files
> in a
> different location now):
> RESTORE DATABASE MyDatabase FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
> WITH MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf', MOVE
> 'MyDatabase_Log'
> TO 'D:\SQLData\Mydatabase_Log.ldf', Password='xxx'
> But to my horror it has only restored the database to the point it was in
> a
> month ago when I first started these backups - I appear to have lost a
> months
> worth of data.
> The .Bak file has a modified datetime equal to the last time the script
> was
> run (the night before last) - so the backups were happening. What am I
> doing
> wrong here? Note that the recovery model was set to FULL.
> Please help.
|||Thanks Mike. I get 13 rows using RESTORE HEADERONLY. The BackupName and
BackupDescription fields are all Null. So how do I specify that I want to
restore the last one?
Also – I can’t use Enterprise Manager because it doesn’t have the option to
specify a password – so I have to use a script.
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> Looks like you appended each new backup into the same file. With your
> restore script, you restored the 1st one.
> Look at RESTORE HEADERONLY in BOL. This will show you all the backup sets
> that the file contains. Then use that information to do a RESTORE DATABASE.
> If you do the restore though enterprise manager, it will the backups too and
> then you can select which one you want to restore.
>
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "RodneyL" <RodneyL@.discussions.microsoft.com> wrote in message
> news:C55ED1C4-3295-45A7-B6CA-BAF902B56B1B@.microsoft.com...
>
>
|||Ahhhh - Problem solved. I needed to add FILE=13 to the WITH parameters:
RESTORE DATABASE MyDatabase
FROM DISK = 'F:\SQLBackups\MyDatabase.bak'
WITH FILE=13,
MOVE 'MyDatabase' TO 'D:\SQLData\MyDatabase.mdf',
MOVE 'MyDatabase_Log' TO 'D:\SQLData\Mydatabase_Log.ldf',
Password='xxx'
Many thanks Mike for pointing me in the right direction!
"RodneyL" wrote:
[vbcol=seagreen]
> Thanks Mike. I get 13 rows using RESTORE HEADERONLY. The BackupName and
> BackupDescription fields are all Null. So how do I specify that I want to
> restore the last one?
> Also – I can’t use Enterprise Manager because it doesn’t have the option to
> specify a password – so I have to use a script.
>
> "Mike Epprecht (SQL MVP)" wrote:

Restore script does not seem to work

Hello,
I am trying to restore a 1GB database by using the script below:
alter database [auto] set single_user
go
restore database [auto] from disk = 'F:\Temp\Restore\auto_db'
with norecovery,
move 'auto_dat' to 'F:\SQLDATA\MSSQL\Data\auto.mdf',
move 'auto_log' to 'F:\SQLDATA\MSSQL\Data\auto.ldf',
stats = percentage
go
I added the stats line because it ran for over 2 hours.
I let this run for about half an hour, but it never showed any statistics.
The performance monitor shows 345 MB of memory used and mostly 0 % CPU,
going up to 2 % every few seconds.
The machine is a Pentiium 4 2.8 GHz with 512 MB RAM running 2003 Server
Standard, and there is 20 GB of space on F.
I have restored the same DB by using the Enterprise Manager and I think it
took 5 minutes.
I want to write a script to do this to simplify the process, since this is a
backup server and I am trying to make the job easier for whoever end up with
the job of restoring.
Any ideas why this is happening? I have triple checked the folder structures
and the names.
Any help would be much appreciated.
Ragnar
The problem is the stats thing ie
restore database [auto] from disk = 'F:\Temp\Restore\auto_db'
> with norecovery,
> move 'auto_dat' to 'F:\SQLDATA\MSSQL\Data\auto.mdf',
> move 'auto_log' to 'F:\SQLDATA\MSSQL\Data\auto.ldf',
> stats = 5
> go
THis means that SQL should show stats after each 5% has completed...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ragnar Midtskogen" <ragnar_ng@.newsgroups.com> wrote in message
news:ufjA2LqdFHA.3012@.tk2msftngp13.phx.gbl...
> Hello,
> I am trying to restore a 1GB database by using the script below:
> alter database [auto] set single_user
> go
> restore database [auto] from disk = 'F:\Temp\Restore\auto_db'
> with norecovery,
> move 'auto_dat' to 'F:\SQLDATA\MSSQL\Data\auto.mdf',
> move 'auto_log' to 'F:\SQLDATA\MSSQL\Data\auto.ldf',
> stats = percentage
> go
> I added the stats line because it ran for over 2 hours.
> I let this run for about half an hour, but it never showed any statistics.
> The performance monitor shows 345 MB of memory used and mostly 0 % CPU,
> going up to 2 % every few seconds.
> The machine is a Pentiium 4 2.8 GHz with 512 MB RAM running 2003 Server
> Standard, and there is 20 GB of space on F.
> I have restored the same DB by using the Enterprise Manager and I think it
> took 5 minutes.
> I want to write a script to do this to simplify the process, since this is
> a backup server and I am trying to make the job easier for whoever end up
> with the job of restoring.
> Any ideas why this is happening? I have triple checked the folder
> structures and the names.
> Any help would be much appreciated.
> Ragnar
>
|||Thank you Wayne,
It turns out that there was something wrong with the server, our IS guys
eventually had to recycle it.
Once I fixed the STATS statement it ran in 202 seconds.
But I was puzzled about the stats display, nothing showed up until the job
finished!
I had used this before, I just copied some sample code, and as far as I can
remember it would print a line whenever a certain percentage had been
processed.
Ragnar
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:%23ZzzIlqdFHA.2288@.TK2MSFTNGP14.phx.gbl...
> The problem is the stats thing ie
> restore database [auto] from disk = 'F:\Temp\Restore\auto_db'
> THis means that SQL should show stats after each 5% has completed...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Ragnar Midtskogen" <ragnar_ng@.newsgroups.com> wrote in message
> news:ufjA2LqdFHA.3012@.tk2msftngp13.phx.gbl...
>

Restore script does not seem to work

Hello,
I am trying to restore a 1GB database by using the script below:
alter database [auto] set single_user
go
restore database [auto] from disk = 'F:\Temp\Restore\auto_db'
with norecovery,
move 'auto_dat' to 'F:\SQLDATA\MSSQL\Data\auto.mdf',
move 'auto_log' to 'F:\SQLDATA\MSSQL\Data\auto.ldf',
stats = percentage
go
I added the stats line because it ran for over 2 hours.
I let this run for about half an hour, but it never showed any statistics.
The performance monitor shows 345 MB of memory used and mostly 0 % CPU,
going up to 2 % every few seconds.
The machine is a Pentiium 4 2.8 GHz with 512 MB RAM running 2003 Server
Standard, and there is 20 GB of space on F.
I have restored the same DB by using the Enterprise Manager and I think it
took 5 minutes.
I want to write a script to do this to simplify the process, since this is a
backup server and I am trying to make the job easier for whoever end up with
the job of restoring.
Any ideas why this is happening? I have triple checked the folder structures
and the names.
Any help would be much appreciated.
RagnarThe problem is the stats thing ie
restore database [auto] from disk = 'F:\Temp\Restore\auto_db'
> with norecovery,
> move 'auto_dat' to 'F:\SQLDATA\MSSQL\Data\auto.mdf',
> move 'auto_log' to 'F:\SQLDATA\MSSQL\Data\auto.ldf',
> stats = 5
> go
THis means that SQL should show stats after each 5% has completed...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ragnar Midtskogen" <ragnar_ng@.newsgroups.com> wrote in message
news:ufjA2LqdFHA.3012@.tk2msftngp13.phx.gbl...
> Hello,
> I am trying to restore a 1GB database by using the script below:
> alter database [auto] set single_user
> go
> restore database [auto] from disk = 'F:\Temp\Restore\auto_db'
> with norecovery,
> move 'auto_dat' to 'F:\SQLDATA\MSSQL\Data\auto.mdf',
> move 'auto_log' to 'F:\SQLDATA\MSSQL\Data\auto.ldf',
> stats = percentage
> go
> I added the stats line because it ran for over 2 hours.
> I let this run for about half an hour, but it never showed any statistics.
> The performance monitor shows 345 MB of memory used and mostly 0 % CPU,
> going up to 2 % every few seconds.
> The machine is a Pentiium 4 2.8 GHz with 512 MB RAM running 2003 Server
> Standard, and there is 20 GB of space on F.
> I have restored the same DB by using the Enterprise Manager and I think it
> took 5 minutes.
> I want to write a script to do this to simplify the process, since this is
> a backup server and I am trying to make the job easier for whoever end up
> with the job of restoring.
> Any ideas why this is happening? I have triple checked the folder
> structures and the names.
> Any help would be much appreciated.
> Ragnar
>|||Thank you Wayne,
It turns out that there was something wrong with the server, our IS guys
eventually had to recycle it.
Once I fixed the STATS statement it ran in 202 seconds.
But I was puzzled about the stats display, nothing showed up until the job
finished!
I had used this before, I just copied some sample code, and as far as I can
remember it would print a line whenever a certain percentage had been
processed.
Ragnar
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:%23ZzzIlqdFHA.2288@.TK2MSFTNGP14.phx.gbl...
> The problem is the stats thing ie
> restore database [auto] from disk = 'F:\Temp\Restore\auto_db'
>> with norecovery,
>> move 'auto_dat' to 'F:\SQLDATA\MSSQL\Data\auto.mdf',
>> move 'auto_log' to 'F:\SQLDATA\MSSQL\Data\auto.ldf',
>> stats = 5
>> go
> THis means that SQL should show stats after each 5% has completed...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Ragnar Midtskogen" <ragnar_ng@.newsgroups.com> wrote in message
> news:ufjA2LqdFHA.3012@.tk2msftngp13.phx.gbl...
>> Hello,
>> I am trying to restore a 1GB database by using the script below:
>> alter database [auto] set single_user
>> go
>> restore database [auto] from disk = 'F:\Temp\Restore\auto_db'
>> with norecovery,
>> move 'auto_dat' to 'F:\SQLDATA\MSSQL\Data\auto.mdf',
>> move 'auto_log' to 'F:\SQLDATA\MSSQL\Data\auto.ldf',
>> stats = percentage
>> go
>> I added the stats line because it ran for over 2 hours.
>> I let this run for about half an hour, but it never showed any
>> statistics.
>> The performance monitor shows 345 MB of memory used and mostly 0 % CPU,
>> going up to 2 % every few seconds.
>> The machine is a Pentiium 4 2.8 GHz with 512 MB RAM running 2003 Server
>> Standard, and there is 20 GB of space on F.
>> I have restored the same DB by using the Enterprise Manager and I think
>> it took 5 minutes.
>> I want to write a script to do this to simplify the process, since this
>> is a backup server and I am trying to make the job easier for whoever end
>> up with the job of restoring.
>> Any ideas why this is happening? I have triple checked the folder
>> structures and the names.
>> Any help would be much appreciated.
>> Ragnar
>

Monday, March 12, 2012

Restore Problem (6.5)

I need to restore a SQL 6.5 database dump onto my laptop. Unfortunately I
don't have enought disk space, so work has kindly provided a USB external
hard disk. I can create the device on that disk, but what I try and restore
the database. It comes up with a 'Unable to write to server-side connection'
error message.
Any ideas ?
Cheers
MarkHi,
After creating the device , did you tried creating the database. The size
should be identical to the source database from where you received the dump
file.
Give me more information about,
1. Location of Dump file
2. Are you able to see the logical drives (newly attached external disk)
from explorer?
If you still have issues , try creating a table on the new database created.
Thanks
Hari.
MCDBA
"Flems" <Mark.Flemans@.apakgroup.com> wrote in message
news:uLYdnMXvDHA.1788@.tk2msftngp13.phx.gbl...
> I need to restore a SQL 6.5 database dump onto my laptop. Unfortunately I
> don't have enought disk space, so work has kindly provided a USB external
> hard disk. I can create the device on that disk, but what I try and
restore
> the database. It comes up with a 'Unable to write to server-side
connection'
> error message.
> Any ideas ?
> Cheers
> Mark
>

Restore problem

When I try to restore a SQL 2005 database full backup from tape I get ;
"Cannot find table 0".
Restoring from disk works fine.
Have you tried the restore using a RESTORE DATABASE statement instead of the
SSMS GUI?
Hope this helps.
Dan Guzman
SQL Server MVP
"spp" <spp@.nospam.nospam> wrote in message
news:eicmqZSBGHA.208@.tk2msftngp13.phx.gbl...
> When I try to restore a SQL 2005 database full backup from tape I get ;
> "Cannot find table 0".
> Restoring from disk works fine.
>