Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts

Monday, March 19, 2012

Cold backup

Hello,
I'm new in SQL Server database administration, and I'm looking for creating a cold backup, bases stopped.
What is the way the do it ?look at Backup Database in bol (books on-line).
You can also do it by right clicking on the database and selecting all tasks, backup database in enterprise manager.

It doesn't matter whether or not your system is active when you take a backup.

Also make sure the recovery mode is set to simple or you take transaction log backups or the log will grow to fill the disk and then the server will crash.|||Thank U for your help|||What nigelrivett suggested actually is a "HOT" backup (meaning the database is still ACTIVE while you're doing the backup). COLD backup means the databases are down, no connection or activity occurred in order to create a consistency database backup. You should use either one of 2 methods below:

Method #1
1) Put the database in single user mode & DBO only
2) Do the full backup
Method #2
1) use SP_DETACH_DB (see BOL) to disconnect/stop the database.
2) Copy the database's files to another server
3) use SP_ATTACH_DB to re-attach and open the database for user.

Good Luck.|||Method #3

use master
go
exec sp_dboption [database_name], 'off', true
go
--see method #2 step 2
exec sp_dboption [database_name], 'off', false
go

cold backup

Hi
And lots of thanks to Vishal P for the quick answer. The
sp_attach_db system stored procedure seems to be the
fastest way to go I suppose, but which is the best way to
get a cold backup?
Subject: Re: Disaster recovery
From: "Vishal Parkar" <a@.hotmail.com> Sent: 9/29/2003
6:58:43 AM
>do it. Is a new installation of SQL2000 Server needed on
>the test server, or can we do it by only restoring from
>the backup tapes of the existing SQL2000 Server
>environment?
If you want to restore the existing copy of database on
another server then you have to have SQL Server instance
installed. If one already exists no need to do
reinstallation of SQL instance.
If you possess copies of the data and log files. (ie cold
backup) you can copy these files to the destination server
and simply run sp_attach_db system stored procedure to
recreate the database.
See more help on sp_attach_db in BOL(it contains examples
as well.)
If you have taken backup of the database using "backup
database" command then you will have to restore it
using "restore database" command.
See more help on this in BOL.
- Vishal
>--Original Message--
>Hi
>We are about to install a test invironment identical to
>the existing SQL2000 Server environmnet, running on
>Win2000. The question is however, which is the best way
to
>do it. Is a new installation of SQL2000 Server needed on
>the test server, or can we do it by only restoring from
>the backup tapes of the existing SQL2000 Server
>environment? We backup everything on the existing server
+
>the database files and transaction logs.
>Your prompt answer will be highly appreciated!
>With many thanks,
>Suzy
>
>.
>
.You can detach a database using sp_detach_db. The detached
files remain and can be moved to another server or copied
to another backup device using os command.
If you are using sp_detach_db then other databases will
remain untouched which is not the case when you shutdown
the server completely just for the sake of taking backup
of single database.
- Vishal.

Sunday, March 11, 2012

Cognos IWR Server

Our disk drive died, and we were able to backup most of the files (all
the reports, the shuttled, pending, etc)

But when we open the administrator, we get a blank. none of our
catalogues are listed in there.

I don't want to recreate all the catalogues and reports- does anyone
know how we can "import" them in there? The database that contains all
the "data" was not backed up, sicne it was in use during backup (bad
Network admin)

If anyone can help, PLEASE email. trying to get an answer from cognos,
but who knows?!!!Bliss <eternalbliss@.techie.com> wrote in message news:<400f1786$1@.obsidian.gov.bc.ca>...
> Our disk drive died, and we were able to backup most of the files (all
> the reports, the shuttled, pending, etc)
> But when we open the administrator, we get a blank. none of our
> catalogues are listed in there.
> I don't want to recreate all the catalogues and reports- does anyone
> know how we can "import" them in there? The database that contains all
> the "data" was not backed up, sicne it was in use during backup (bad
> Network admin)
> If anyone can help, PLEASE email. trying to get an answer from cognos,
> but who knows?!!!

I have no idea about the Cognos side of things, but if still have the
..mdf and .ldf files for your MSSQL databases, you can try using
sp_attach_db or sp_attach_single_file_db to attach them again. If this
doesn't work, and you have no backups, then all you can really do is
contact Microsoft PSS. They may be able to help recover data from the
files.

By the way, MSSQL databases can be backed up while in use - this is
usually how backups are done.

Simon|||Thanks! But Cognos, apparently (to the dismay of the network admin) was
skipping open files.

And we have all the reports/databases. We were more interested in the
cogno's side of things. We can't import into the admin program.

But thanks for the info!

Simon Hayes wrote:
> Bliss <eternalbliss@.techie.com> wrote in message news:<400f1786$1@.obsidian.gov.bc.ca>...
>>Our disk drive died, and we were able to backup most of the files (all
>>the reports, the shuttled, pending, etc)
>>
>>But when we open the administrator, we get a blank. none of our
>>catalogues are listed in there.
>>
>>I don't want to recreate all the catalogues and reports- does anyone
>>know how we can "import" them in there? The database that contains all
>>the "data" was not backed up, sicne it was in use during backup (bad
>>Network admin)
>>
>>If anyone can help, PLEASE email. trying to get an answer from cognos,
>>but who knows?!!!
>
> I have no idea about the Cognos side of things, but if still have the
> .mdf and .ldf files for your MSSQL databases, you can try using
> sp_attach_db or sp_attach_single_file_db to attach them again. If this
> doesn't work, and you have no backups, then all you can really do is
> contact Microsoft PSS. They may be able to help recover data from the
> files.
> By the way, MSSQL databases can be backed up while in use - this is
> usually how backups are done.
> Simon

Code to populate a table

Can someone help me with a code to read my database backup
time and populate it to a table for querying and
reporting.Hi,
The backup informations are already stored in MSDB database. The table name
is backupset.
select database_name,type,backup_start_date,backup_finish_date from
msdb..backupset
regarding backups you could alsee the below tables in msdb database.
backupfile
backupmediafamily
backupmediaset
Thanks
Hari
MCDBA
"Aboki" <hcokoli@.yahoo.com> wrote in message
news:0a4d01c46e75$185d8e70$a601280a@.phx.gbl...
> Can someone help me with a code to read my database backup
> time and populate it to a table for querying and
> reporting.

Saturday, February 25, 2012

Cmdexec on SQL 2000

On a SQL 2000 I am running a Job with the following single step:
xcopy \\nas01\backup\*.* \\nas02\backup /s /e /i /c /d /y
xcopy \\nas01\kunder\*.* \\nas02\Kunder /s /e /i /c /d /y
xcopy \\nas01\projekter\*.* \\nas02\projekter /s /e /i /c /d /y
xcopy \\nas01\konvertering\*.* \\nas02\konvertering /s /e /i /c /d /y
The job executes and report success, however only the first line has
been carried out. Is it not possible to run several lines in a single
step?Hello,
Put all this commands in a single batch (.BAT) file and use the BAT file
name inside Agent Job and try?
Thanks
Hari
"refdk" <fuhlendorf@.gmail.com> wrote in message
news:1175843398.821347.252100@.n76g2000hsh.googlegroups.com...
> On a SQL 2000 I am running a Job with the following single step:
> xcopy \\nas01\backup\*.* \\nas02\backup /s /e /i /c /d /y
> xcopy \\nas01\kunder\*.* \\nas02\Kunder /s /e /i /c /d /y
> xcopy \\nas01\projekter\*.* \\nas02\projekter /s /e /i /c /d /y
> xcopy \\nas01\konvertering\*.* \\nas02\konvertering /s /e /i /c /d /y
> The job executes and report success, however only the first line has
> been carried out. Is it not possible to run several lines in a single
> step?
>

Cmdexec on SQL 2000

On a SQL 2000 I am running a Job with the following single step:
xcopy \\nas01\backup\*.* \\nas02\backup /s /e /i /c /d /y
xcopy \\nas01\kunder\*.* \\nas02\Kunder /s /e /i /c /d /y
xcopy \\nas01\projekter\*.* \\nas02\projekter /s /e /i /c /d /y
xcopy \\nas01\konvertering\*.* \\nas02\konvertering /s /e /i /c /d /y
The job executes and report success, however only the first line has
been carried out. Is it not possible to run several lines in a single
step?Hello,
Put all this commands in a single batch (.BAT) file and use the BAT file
name inside Agent Job and try?
Thanks
Hari
"refdk" <fuhlendorf@.gmail.com> wrote in message
news:1175843398.821347.252100@.n76g2000hsh.googlegroups.com...
> On a SQL 2000 I am running a Job with the following single step:
> xcopy \\nas01\backup\*.* \\nas02\backup /s /e /i /c /d /y
> xcopy \\nas01\kunder\*.* \\nas02\Kunder /s /e /i /c /d /y
> xcopy \\nas01\projekter\*.* \\nas02\projekter /s /e /i /c /d /y
> xcopy \\nas01\konvertering\*.* \\nas02\konvertering /s /e /i /c /d /y
> The job executes and report success, however only the first line has
> been carried out. Is it not possible to run several lines in a single
> step?
>

Thursday, February 16, 2012

Clustered Sql Server(Again)

I should take offline backup at midnight after stopping our sql server 2000.
But it's prohibited to stop by writing a task like "net stop MSSQLSERVER"
(written in MSDN site), also the passive server brings sql server online and
cancels offline backup.
How can I stop my clustered Sql Server and take backup at midnights? How can
I schedule such a job?
(Before clustering we used to write a batch file ("net stop sqlserver") and
in the sceduled tasks we run them whenever needed)
What should I do from now on?
Thanks,
Abdulkadir
First off, offline backups are unnecessary for a SQL Server. You never have
to take a SQL Server offline to back it up. You use the built in backup
features within the product.
As far as interacting with the cluster, you can't do it directly against the
service since that is seen as a failure. You have to stop the SQL Server
through the cluster. I don't know the command, but you issue the equivalent
thing to the cluster and I'm fairly certain the command string can be found
in online help.
But, again, you don't need to shut down a SQL Server to backup the data.
Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com
|||Every night we're taking an online backup, somedays incremental - others
full.
We have another system that backups our SqlServer (Hp Omniback) and this
tool restores DB only to servers which have same collation, same drive name,
same directory,bla bla bla...
We can't restore online backup to any other server we have. We may just want
to restore the files and attach it to any server. At the same time we're
trying that.
Thanks for your answer, I will try to find the command string.
I just wanted to learn how this process is done in other firms...
Thanks again,
"Michael Hotek" <mhotek@.nomail.com>, iletide unu yazd
news:eTD4FLfLEHA.1312@.TK2MSFTNGP12.phx.gbl...
> First off, offline backups are unnecessary for a SQL Server. You never
have
> to take a SQL Server offline to back it up. You use the built in backup
> features within the product.
> As far as interacting with the cluster, you can't do it directly against
the
> service since that is seen as a failure. You have to stop the SQL Server
> through the cluster. I don't know the command, but you issue the
equivalent
> thing to the cluster and I'm fairly certain the command string can be
found
> in online help.
> But, again, you don't need to shut down a SQL Server to backup the data.
> --
> Mike
> Principal Mentor
> Solid Quality Learning
> "More than just Training"
> SQL Server MVP
> http://www.solidqualitylearning.com
> http://www.mssqlserver.com
>
|||You can use the built-in tools to back up to a local or remote file share.
Then your backup tool can archive those files for disaster recovery. That
way, you get the best of both worlds.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"aculfa" <aaa@.aa.com> wrote in message
news:uVccjcfLEHA.2624@.TK2MSFTNGP09.phx.gbl...
> Every night we're taking an online backup, somedays incremental - others
> full.
> We have another system that backups our SqlServer (Hp Omniback) and this
> tool restores DB only to servers which have same collation, same drive
name,
> same directory,bla bla bla...
> We can't restore online backup to any other server we have. We may just
want[vbcol=seagreen]
> to restore the files and attach it to any server. At the same time we're
> trying that.
> Thanks for your answer, I will try to find the command string.
> I just wanted to learn how this process is done in other firms...
> Thanks again,
> "Michael Hotek" <mhotek@.nomail.com>, iletide unu yazd
> news:eTD4FLfLEHA.1312@.TK2MSFTNGP12.phx.gbl...
> have
> the
Server
> equivalent
> found
>
|||Here is the order in which you would perform your tasks(, from cluster
prespective):
1. Run command "Cluster group <Group Hosting SQL> /offline".
2. Then you are free to perform your SQL related tasks. After you are done
with your tasks make sure that SQL is in the same state as it was after
doing Step1, above.
3. RunCommand "Cluster group <Group Hosting SQL> /online".
Hope this helps.
Sandeep Sutari
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Michael Hotek" <mhotek@.nomail.com> wrote in message
news:eTD4FLfLEHA.1312@.TK2MSFTNGP12.phx.gbl...
> First off, offline backups are unnecessary for a SQL Server. You never
have
> to take a SQL Server offline to back it up. You use the built in backup
> features within the product.
> As far as interacting with the cluster, you can't do it directly against
the
> service since that is seen as a failure. You have to stop the SQL Server
> through the cluster. I don't know the command, but you issue the
equivalent
> thing to the cluster and I'm fairly certain the command string can be
found
> in online help.
> But, again, you don't need to shut down a SQL Server to backup the data.
> --
> Mike
> Principal Mentor
> Solid Quality Learning
> "More than just Training"
> SQL Server MVP
> http://www.solidqualitylearning.com
> http://www.mssqlserver.com
>

Friday, February 10, 2012

ClusterBack and Restore

What's the best way to backup cluster and restore it incase of outage?
TIA
Env: MSCS 2000
OS: Win2000 Adv Srv
SQL2k
System State backups of the nodes, $ backup of the shared disks, SQL file
backup to a shared disk. Test, test, test. To know if you have everything
for a restore, perform one on your test cluster.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering Website
http://msmvps.com/clustering - Blog
http://www.clusterhelp.com - Cluster Training
"Vai2000" <nospam@.microsoft.com> wrote in message
news:%23tS7tk1IGHA.3752@.TK2MSFTNGP11.phx.gbl...
> What's the best way to backup cluster and restore it incase of outage?
> TIA
> Env: MSCS 2000
> OS: Win2000 Adv Srv
> SQL2k
>
|||Shouldn't we use the Cluster SDK API for backup?
BackupClusterDatabase
RestoreClusterDatabase
TIA
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:uA0rX44IGHA.3452@.TK2MSFTNGP12.phx.gbl...
> System State backups of the nodes, $ backup of the shared disks, SQL file
> backup to a shared disk. Test, test, test. To know if you have everything
> for a restore, perform one on your test cluster.
> Cheers,
> Rod
> MVP - Windows Server - Clustering
> http://www.nw-america.com - Clustering Website
> http://msmvps.com/clustering - Blog
> http://www.clusterhelp.com - Cluster Training
> "Vai2000" <nospam@.microsoft.com> wrote in message
> news:%23tS7tk1IGHA.3752@.TK2MSFTNGP11.phx.gbl...
>
|||Cluster Aware backup software, no clue on API's - I am not a programmer!
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering Website
http://msmvps.com/clustering - Blog
http://www.clusterhelp.com - Cluster Training
"Vai2000" <nospam@.microsoft.com> wrote in message
news:eX7Bzf6IGHA.3100@.tk2msftngp13.phx.gbl...
> Shouldn't we use the Cluster SDK API for backup?
> BackupClusterDatabase
> RestoreClusterDatabase
> TIA
> "Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
> message news:uA0rX44IGHA.3452@.TK2MSFTNGP12.phx.gbl...
>