Showing posts with label restore. Show all posts
Showing posts with label restore. Show all posts

Tuesday, March 27, 2012

Backing up SQL DB

We're trying to create a .bak file to send it to our site's admin to restore it on the

server:

1. When I try to do that get this error:
http://www.radiorient.net/errors/export_sql.gif

Why is that? and how can I fix it?

2. Should we add both files of the db (.MDF, and .LDF) or only the .MDF file?

Can please someone help me with this, Thanx.

Do not bakcup a datbase to its own data/log file, instead, you can backup to any other file that can be written by SQL Server. The purpose of backup is to gurantee the database can be recovered in case of database corruption (usually the physical files are corrupted), so bakcup a database to its data/log files doesn't make sense, right?Smile

For more information about backup, please refer to:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ba-bz_35ww.asp

|||

Thanx, we did it, we have some debugging to do now, but at least the DB is online, I hate H-Sphere, I worked with many control panels that is a lot easier.

Now when we upload image using the admin area, it doesn't upload the image on the server, we checked the permission of the image folder and it's 777, so what could be wrong?!

Thursday, March 22, 2012

Backing up an SQL Express Database

Hi,
Can someone tell how I create a backup of an SQL Express Database, so that I
can restore it into SQL Server 2005.
Many thanks
Wayne
You should be able to use T-SQL:
BACKUP DATABASE foo TO DISK = 'x:\foo.bak' WITH INIT
Keith
"Wayne Gibson" <wayne.gibson@.rendersoft.com> wrote in message
news:d9u24i$68b$1$8302bc10@.news.demon.co.uk...
> Hi,
> Can someone tell how I create a backup of an SQL Express Database, so that
> I can restore it into SQL Server 2005.
> Many thanks
> Wayne
>

Backing up an SQL Express Database

Hi,
Can someone tell how I create a backup of an SQL Express Database, so that I
can restore it into SQL Server 2005.
Many thanks
Wayne
You should be able to use T-SQL:
BACKUP DATABASE foo TO DISK = 'x:\foo.bak' WITH INIT
Keith
"Wayne Gibson" <wayne.gibson@.rendersoft.com> wrote in message
news:d9u24i$68b$1$8302bc10@.news.demon.co.uk...
> Hi,
> Can someone tell how I create a backup of an SQL Express Database, so that
> I can restore it into SQL Server 2005.
> Many thanks
> Wayne
>

Backing up an SQL Express Database

Hi,
Can someone tell how I create a backup of an SQL Express Database, so that I
can restore it into SQL Server 2005.
Many thanks
WayneYou should be able to use T-SQL:
BACKUP DATABASE foo TO DISK = 'x:\foo.bak' WITH INIT
--
Keith
"Wayne Gibson" <wayne.gibson@.rendersoft.com> wrote in message
news:d9u24i$68b$1$8302bc10@.news.demon.co.uk...
> Hi,
> Can someone tell how I create a backup of an SQL Express Database, so that
> I can restore it into SQL Server 2005.
> Many thanks
> Wayne
>sql

Backing up an SQL Express Database

Hi,
Can someone tell how I create a backup of an SQL Express Database, so that I
can restore it into SQL Server 2005.
Many thanks
WayneYou should be able to use T-SQL:
BACKUP DATABASE foo TO DISK = 'x:\foo.bak' WITH INIT
Keith
"Wayne Gibson" <wayne.gibson@.rendersoft.com> wrote in message
news:d9u24i$68b$1$8302bc10@.news.demon.co.uk...
> Hi,
> Can someone tell how I create a backup of an SQL Express Database, so that
> I can restore it into SQL Server 2005.
> Many thanks
> Wayne
>

Backing up a database in one server and restoring in another

Hi,
I am backing up one database in one server and trying to restore it in another server. In the process of retoring, I am getting an error which states that I should be using in single mode.
Question 1) Is this restore process feasible?
Question 2) Is it possible to set single user mode from Sql Server Enterprise Manager. If not, how is this restore can be done.
I am familiar with attach detach method. However, I am trying to see whether this operation works. I appreciate any help in advance. Thanks.
Hi,
Restore database can not be done if yuo have any user connected to the
database. So easy way to restore the databaseis using
the Query Analyzer.
1. Login to Query Analyzer
2. Set the database to single user using the below command
Alter database <dbname> set single_user with rollback immediate
3. Now restore the database
Restore database <dbname> from disk='c:\backup\dbname.bak' (Use Move
command if you dont have the same directory
structure as source server, Use REPLACE option
if you need to overwrite MDF and LDF)
-- See books online for RESTORE DATABASE for more details
4. Set the database to multi user using the below command
Alter database <dbname> set multi_user
1) Is this restore process feasible?
Yes, Set it to single user using above command
2) Is it possible to set single user mode from Sql Server Enterprise Manager
Not directly in a single command, I think you have to kill the users.
Better way is use the above commands specified in Query Analyzer.
Thanks
Hari
MCDBA
"John" <John@.discussions.microsoft.com> wrote in message
news:2F1A00C1-7203-4F42-B86A-25DDEA97EA68@.microsoft.com...
> Hi,
> I am backing up one database in one server and trying to restore it in
another server. In the process of retoring, I am getting an error which
states that I should be using in single mode.
> Question 1) Is this restore process feasible?
> Question 2) Is it possible to set single user mode from Sql Server
Enterprise Manager. If not, how is this restore can be done.
> I am familiar with attach detach method. However, I am trying to see
whether this operation works. I appreciate any help in advance. Thanks.

Backing up a database in one server and restoring in another

Hi,
I am backing up one database in one server and trying to restore it in another server. In the process of retoring, I am getting an error which states that I should be using in single mode.
Question 1) Is this restore process feasible?
Question 2) Is it possible to set single user mode from Sql Server Enterprise Manager. If not, how is this restore can be done.
I am familiar with attach detach method. However, I am trying to see whether this operation works. I appreciate any help in advance. Thanks.Hi,
Restore database can not be done if yuo have any user connected to the
database. So easy way to restore the databaseis using
the Query Analyzer.
1. Login to Query Analyzer
2. Set the database to single user using the below command
Alter database <dbname> set single_user with rollback immediate
3. Now restore the database
Restore database <dbname> from disk='c:\backup\dbname.bak' (Use Move
command if you dont have the same directory
structure as source server, Use REPLACE option
if you need to overwrite MDF and LDF)
-- See books online for RESTORE DATABASE for more details
4. Set the database to multi user using the below command
Alter database <dbname> set multi_user
1) Is this restore process feasible?
Yes, Set it to single user using above command
2) Is it possible to set single user mode from Sql Server Enterprise Manager
Not directly in a single command, I think you have to kill the users.
Better way is use the above commands specified in Query Analyzer.
Thanks
Hari
MCDBA
"John" <John@.discussions.microsoft.com> wrote in message
news:2F1A00C1-7203-4F42-B86A-25DDEA97EA68@.microsoft.com...
> Hi,
> I am backing up one database in one server and trying to restore it in
another server. In the process of retoring, I am getting an error which
states that I should be using in single mode.
> Question 1) Is this restore process feasible?
> Question 2) Is it possible to set single user mode from Sql Server
Enterprise Manager. If not, how is this restore can be done.
> I am familiar with attach detach method. However, I am trying to see
whether this operation works. I appreciate any help in advance. Thanks.sql

Backing up a database in one server and restoring in another

Hi,
I am backing up one database in one server and trying to restore it in anoth
er server. In the process of retoring, I am getting an error which states th
at I should be using in single mode.
Question 1) Is this restore process feasible?
Question 2) Is it possible to set single user mode from Sql Server Enterpris
e Manager. If not, how is this restore can be done.
I am familiar with attach detach method. However, I am trying to see whether
this operation works. I appreciate any help in advance. Thanks.Hi,
Restore database can not be done if yuo have any user connected to the
database. So easy way to restore the databaseis using
the Query Analyzer.
1. Login to Query Analyzer
2. Set the database to single user using the below command
Alter database <dbname> set single_user with rollback immediate
3. Now restore the database
Restore database <dbname> from disk='c:\backup\dbname.bak' (Use Move
command if you dont have the same directory
structure as source server, Use REPLACE option
if you need to overwrite MDF and LDF)
-- See books online for RESTORE DATABASE for more details
4. Set the database to multi user using the below command
Alter database <dbname> set multi_user
1) Is this restore process feasible?
Yes, Set it to single user using above command
2) Is it possible to set single user mode from Sql Server Enterprise Manager
Not directly in a single command, I think you have to kill the users.
Better way is use the above commands specified in Query Analyzer.
Thanks
Hari
MCDBA
"John" <John@.discussions.microsoft.com> wrote in message
news:2F1A00C1-7203-4F42-B86A-25DDEA97EA68@.microsoft.com...
> Hi,
> I am backing up one database in one server and trying to restore it in
another server. In the process of retoring, I am getting an error which
states that I should be using in single mode.
> Question 1) Is this restore process feasible?
> Question 2) Is it possible to set single user mode from Sql Server
Enterprise Manager. If not, how is this restore can be done.
> I am familiar with attach detach method. However, I am trying to see
whether this operation works. I appreciate any help in advance. Thanks.

Tuesday, March 20, 2012

backing up 2005 to something I can restore to 2000

I have an exiting database which I'd rather not manually recreate that I'd
like get a backup file from that I can restore to a 2000 database.
Is this in principle possible?
PaulYou cannot restore a SQL Server 2005 backup to SQL Server 2000. You have to
transfer objects instead using SSIS.
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"PJ6" <noone@.nowhere.net> wrote in message
news:eGgw0I%23iGHA.4284@.TK2MSFTNGP05.phx.gbl...
> I have an exiting database which I'd rather not manually recreate that I'd
> like get a backup file from that I can restore to a 2000 database.
> Is this in principle possible?
> Paul
>

Back, restore and Verification

Hi guys, i am new to Sql and seems to be having problems
verifiying my backup.Each time i backup, and want to test
my backup or view the contents,i do not see file in the
backup folder.Pls helpI do not know why this post is in the .Warehouse NG but
If you are backing up a database then you use the BACKUP DATABASE
command. For this you will specify a filename or devicename.
You can then after you know this use RESTORE VERIFYONLY on that file or
device.
How are you backing up your databases?
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org|||In article <2932901c465b7$60ec5ca0$a601280a@.phx.gbl>, Ayo wrote:
> Hi guys, i am new to Sql and seems to be having problems
> verifiying my backup.Each time i backup, and want to test
> my backup or view the contents,i do not see file in the
> backup folder.Pls help
>
The ONLY true way to test your backup is to RESTORE it.
Thanks Steve
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

Back, restore and Verification

Hi guys, i am new to Sql and seems to be having problems
verifiying my backup.Each time i backup, and want to test
my backup or view the contents,i do not see file in the
backup folder.Pls help
I do not know why this post is in the .Warehouse NG but
If you are backing up a database then you use the BACKUP DATABASE
command. For this you will specify a filename or devicename.
You can then after you know this use RESTORE VERIFYONLY on that file or
device.
How are you backing up your databases?
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
|||In article <2932901c465b7$60ec5ca0$a601280a@.phx.gbl>, Ayo wrote:
> Hi guys, i am new to Sql and seems to be having problems
> verifiying my backup.Each time i backup, and want to test
> my backup or view the contents,i do not see file in the
> backup folder.Pls help
>
The ONLY true way to test your backup is to RESTORE it.
Thanks Steve
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

Monday, March 19, 2012

Back up from tape

I want to restore my DB backups from the tape just for testing . I did this
before and now I don't remember how to do it , any one knows the syntext ,
path..
Thanks.
Catelintry this:
restore database MYDB from TAPE = '\\.\YYYY'
where YYYY = your tape device.
see 'restore database' in BOL
"Catelin wang" <cwang@.cemstone.com> wrote in message
news:u78mRX$AFHA.3120@.TK2MSFTNGP12.phx.gbl...
> I want to restore my DB backups from the tape just for testing . I did
this
> before and now I don't remember how to do it , any one knows the syntext ,
> path..
>
> Thanks.
> Catelin
>|||Thanks.
"JD" <joeydba@.yahoo.com> wrote in message news:41f81e86$1@.news.qgraph.com...
> try this:
> restore database MYDB from TAPE = '\\.\YYYY'
> where YYYY = your tape device.
> see 'restore database' in BOL
>
> "Catelin wang" <cwang@.cemstone.com> wrote in message
> news:u78mRX$AFHA.3120@.TK2MSFTNGP12.phx.gbl...
> > I want to restore my DB backups from the tape just for testing . I did
> this
> > before and now I don't remember how to do it , any one knows the syntext
,
> > path..
> >
> >
> > Thanks.
> >
> > Catelin
> >
> >
>

Back up from tape

I want to restore my DB backups from the tape just for testing . I did this
before and now I don't remember how to do it , any one knows the syntext ,
path..
Thanks.
Catelin
try this:
restore database MYDB from TAPE = '\\.\YYYY'
where YYYY = your tape device.
see 'restore database' in BOL
"Catelin wang" <cwang@.cemstone.com> wrote in message
news:u78mRX$AFHA.3120@.TK2MSFTNGP12.phx.gbl...
> I want to restore my DB backups from the tape just for testing . I did
this
> before and now I don't remember how to do it , any one knows the syntext ,
> path..
>
> Thanks.
> Catelin
>
|||Thanks.
"JD" <joeydba@.yahoo.com> wrote in message news:41f81e86$1@.news.qgraph.com...[vbcol=seagreen]
> try this:
> restore database MYDB from TAPE = '\\.\YYYY'
> where YYYY = your tape device.
> see 'restore database' in BOL
>
> "Catelin wang" <cwang@.cemstone.com> wrote in message
> news:u78mRX$AFHA.3120@.TK2MSFTNGP12.phx.gbl...
> this
,
>

Back up from tape

I want to restore my DB backups from the tape just for testing . I did this
before and now I don't remember how to do it , any one knows the syntext ,
path..
Thanks.
Catelintry this:
restore database MYDB from TAPE = '\\.\YYYY'
where YYYY = your tape device.
see 'restore database' in BOL
"Catelin wang" <cwang@.cemstone.com> wrote in message
news:u78mRX$AFHA.3120@.TK2MSFTNGP12.phx.gbl...
> I want to restore my DB backups from the tape just for testing . I did
this
> before and now I don't remember how to do it , any one knows the syntext ,
> path..
>
> Thanks.
> Catelin
>|||Thanks.
"JD" <joeydba@.yahoo.com> wrote in message news:41f81e86$1@.news.qgraph.com...
> try this:
> restore database MYDB from TAPE = '\\.\YYYY'
> where YYYY = your tape device.
> see 'restore database' in BOL
>
> "Catelin wang" <cwang@.cemstone.com> wrote in message
> news:u78mRX$AFHA.3120@.TK2MSFTNGP12.phx.gbl...
> this
,[vbcol=seagreen]
>

back up from .bak file

I got a .bak file from my friend
I want to restore the data base (presently I don’t have any database in my system).

But while I try to restore it
I am getting an error

“
System.Data.SqlClient.SqlError: Directory lookup for the file "D:\Microsoft SQL Server 2005\mydatabase.mdf" failed with the operating system error 2(The system cannot find the file specified.). (Microsoft.SqlServer.Smo)

”

I have installed Microsoft sql server in a different directory
Not where he is installed

I can successfully restore the back up files of data base on my own system
But not the backup files created from others systemsWhen you restore the backup, there is a place on the dialog that will list all of the assoicated files for the backup and where they should be placed (.mdf, .ldf, etc.) The paths will default to the location that they were backed up from. You need to change these paths to where you want the files placed.

Back or restore operation terminating abnormally

Hi all,
Microsoft SQL Server 7.00 - 7.00.1094 (Intel X86) May 29 2003 15:21:25
Copyright (c) 1988-2002 Microsoft Corporation Enterprise Edition on
Windows NT 5.0 (Build 2195: Service Pack 4)
using windows system login, Loged in as Administrator, have full rights.
Getting the following Error message when trying to restore a database?
Back or restore operation terminating abnormally. SQLDumpExceptionhandler:
process 9 generated Fatal excetion c0000005 Exception_Access_Violation.
SQL Server is terminating this process.
No luck searching on this error. what I did find didn't help.
thanks
gvgv
I see that you do that from .NET application.
When you run the same statement from QA do you get the same error?
Can you show us you RESTORE command?
"gv" <viatorg@.musc.edu> wrote in message
news:uXJNhiWOFHA.2680@.TK2MSFTNGP09.phx.gbl...
> Hi all,
> Microsoft SQL Server 7.00 - 7.00.1094 (Intel X86) May 29 2003 15:21:25
> Copyright (c) 1988-2002 Microsoft Corporation Enterprise Edition on
> Windows NT 5.0 (Build 2195: Service Pack 4)
> using windows system login, Loged in as Administrator, have full rights.
> Getting the following Error message when trying to restore a database?
> Back or restore operation terminating abnormally. SQLDumpExceptionhandler:
> process 9 generated Fatal excetion c0000005 Exception_Access_Violation.
> SQL Server is terminating this process.
> No luck searching on this error. what I did find didn't help.
> thanks
> gv
>

Sunday, March 11, 2012

Back & Restore of Multiple Databases

Hey all,

I was wondering if I could get some help on something thats got me really stuck!

At the moment we have in our product some SQL scripts that will backup & restore a database whenever required.

We've now added another database (an audit database) so we need to change those scripts to include this database.

The backup script seems fairly easy to change as ive added another 'BACKUP DATABASE' line that points to the same file.

The problem I am having is that when it comes to restore the 2 databases I get a whole load of errors, most of them complaining that the '.mdf' & 'log' files can't be overritten because they are already in use by the previous database (since I restore the 'data' database first and then the 'audit' database)

I've tried the 'MOVE' command but it doesn't seem to support the 'RESTORE' option?

Is there anyway I can get the backup to retain the '.mdf' & '.log' file locations so that the restore simply puts them back in the same place or is there another command that can help with my situation?

Thanks in advance!

It sounds like the 'data' database has references and links to the 'audit' database.

Try restoring the 'audit' database first, and then the 'data' database.

If I'm completely 'off base', let me know and we will try other tactics to help you.

|||I think you can use the REPLACE option of RESTORE to do this.|||

if I understand Properlly then try this

Go to Enterprise Manager,

select your server and right click your database,

then you see a option back up

just do backup

|||

Thanks everyone, but I sorted it myself.

The problem was that SQL didn't know which of the databases to restore so I had to use the 'PARTIAL, FILE = 1' extra commands in order to instruct SQL which database to restore and from what position.