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

Tuesday, March 20, 2012

Cluster Environment SQL Server setup and configure

What is the best way to setup and configure a clusterd
environment of SQL Server in terms of RAID, data file
location, log file location, backup etc. I guess in
separate drives for data and logfile.Great question. The bad answer is always "it depends."
You must be doing something like a SAN or DAS right? In very general terms,
split the data, logs, and temp db all out on different raid configs, i.e.,
LUNs. I like RAID 1+0 (or said RAID 10) because of the speed and high
tolerance of multiple disk failures at once, not to mention when you need
more disk space, adding new spindles is easy. If performance is more
important than money, then spread out over as many spindles as feasable.
You achieve more I/Os this way. This means, go for more disks of lower size
than few disks of higher size.
I believe on the SQL disk there is a VB6 application called database hammer
which you can use to test your config.
hth, Eric
"Aboki" <waco361@.hotmail.com> wrote in message
news:0afe01c36b38$2ab80730$a001280a@.phx.gbl...
> What is the best way to setup and configure a clusterd
> environment of SQL Server in terms of RAID, data file
> location, log file location, backup etc. I guess in
> separate drives for data and logfile.sqlsql

Cluster backup

Quick question...
2 node active/passive (excuse the terminology...) cluster.
My network admin wants to have my SQL backups (performed via. maint. plan
nightly) stored on the quorum drive.
We are also performing log shipping at 15 minute intervals to an offsite
server.
I think storing the backups on the quorum drive is a bad idea as if the disk
array dies completely, we have no backup.
Also, would that scheme not necessitate adding the quorum drive as a
resource to the SQL Server?
Comments and thoughts please.
Thanks in advance.
B.
You are correct, its a bad idea The Quorum drive would have to be a
dependency for SQL. Which would mean one group for basically everything. If
the backups filled the disk, the cluster would not be happy.
A good idea is use the MP to a disk, and then backup to some kind of tape.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Tam O'Shanter" <Tam@.Oshanter.com> wrote in message
news:b6prd.6024491$6p.961500@.news.easynews.com...
> Quick question...
> 2 node active/passive (excuse the terminology...) cluster.
> My network admin wants to have my SQL backups (performed via. maint. plan
> nightly) stored on the quorum drive.
> We are also performing log shipping at 15 minute intervals to an offsite
> server.
> I think storing the backups on the quorum drive is a bad idea as if the
> disk
> array dies completely, we have no backup.
> Also, would that scheme not necessitate adding the quorum drive as a
> resource to the SQL Server?
> Comments and thoughts please.
> Thanks in advance.
> B.
>
>
|||Thanks Rodney,
Validation of what I thought.
Would you suggest backing up to a local disk on one of the nodes? Or rather,
having the MP write to a UNC on another machine in the environment
(management server etc..).
I think the UNC is the way to go, but I'd be interested in your thoughts.
Every morning the bak's would be moved from the backup location to an
external firewire drive and physically removed from the facility. This
setup, in conjunction with a logshp (15 min. intervals) to an offsite box
seems like my best option.
Comments?
Thanks again.
B.
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:ORI$OI%231EHA.1192@.tk2msftngp13.phx.gbl...
> You are correct, its a bad idea The Quorum drive would have to be a
> dependency for SQL. Which would mean one group for basically everything.
If[vbcol=seagreen]
> the backups filled the disk, the cluster would not be happy.
> A good idea is use the MP to a disk, and then backup to some kind of tape.
> Cheers,
> Rod
> MVP - Windows Server - Clustering
> http://www.nw-america.com - Clustering
> http://msmvps.com/clustering - Blog
> "Tam O'Shanter" <Tam@.Oshanter.com> wrote in message
> news:b6prd.6024491$6p.961500@.news.easynews.com...
plan
>
|||Tam, you have a problem. You can't backup SQL using the MP to a UNC, though
the last time I tried was years ago. I also don't like the idea of local
node backups. Can you add a disk to the array? Or does the current array
have space already? Remember with the MP you can delete old backups to keep
the space minimal.
Rod
"Tam O'Shanter" <Tam@.Oshanter.com> wrote in message
news:kXprd.3931798$yk.598061@.news.easynews.com...
> Thanks Rodney,
> Validation of what I thought.
> Would you suggest backing up to a local disk on one of the nodes? Or
> rather,
> having the MP write to a UNC on another machine in the environment
> (management server etc..).
> I think the UNC is the way to go, but I'd be interested in your thoughts.
> Every morning the bak's would be moved from the backup location to an
> external firewire drive and physically removed from the facility. This
> setup, in conjunction with a logshp (15 min. intervals) to an offsite box
> seems like my best option.
> Comments?
> Thanks again.
> B.
> "Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
> message news:ORI$OI%231EHA.1192@.tk2msftngp13.phx.gbl...
> If
> plan
>
|||Yes, you can backup to a UNC. I do it all the time. There is even a
community KB article on how to do backup to a UNC share. Personally, I
think it is one of the best ways to back up a system.
HowTo: Backup to UNC name using Database Maintenance Wizard
http://support.microsoft.com/?kbid=555128
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:u9yvudB2EHA.2568@.TK2MSFTNGP10.phx.gbl...
> Tam, you have a problem. You can't backup SQL using the MP to a UNC,
though
> the last time I tried was years ago. I also don't like the idea of local
> node backups. Can you add a disk to the array? Or does the current array
> have space already? Remember with the MP you can delete old backups to
keep[vbcol=seagreen]
> the space minimal.
> Rod
> "Tam O'Shanter" <Tam@.Oshanter.com> wrote in message
> news:kXprd.3931798$yk.598061@.news.easynews.com...
thoughts.[vbcol=seagreen]
box[vbcol=seagreen]
everything.[vbcol=seagreen]
the
>
|||Excellent. I will file that away for future use Maybe it was 7.0 or 6.5
or 4.21 or 4.2, I have been using SQL for a long time. What I don't like
about UNC is that any network glitch or outage can potentially kill the
backup.
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
http://msmvps.com/clustering - Blog
"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
news:O845A2H2EHA.2568@.TK2MSFTNGP11.phx.gbl...
> Yes, you can backup to a UNC. I do it all the time. There is even a
> community KB article on how to do backup to a UNC share. Personally, I
> think it is one of the best ways to back up a system.
> HowTo: Backup to UNC name using Database Maintenance Wizard
> http://support.microsoft.com/?kbid=555128
>
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
> message news:u9yvudB2EHA.2568@.TK2MSFTNGP10.phx.gbl...
> though
> keep
> thoughts.
> box
> everything.
> the
>
|||Yep. You can also easily overwhelm a network. I use a dedicated link with
a connection-specific domain suffix to segment the backup traffic from the
normal SQL traffic. I also tune the file share to maximize write
capability. I just upgraded the backup host server (which is also my tape
host server) to handle the load.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:%23kJFlsI2EHA.2572@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> Excellent. I will file that away for future use Maybe it was 7.0 or 6.5
> or 4.21 or 4.2, I have been using SQL for a long time. What I don't like
> about UNC is that any network glitch or outage can potentially kill the
> backup.
> Cheers,
> Rod
> MVP - Windows Server - Clustering
> http://www.nw-america.com - Clustering
> http://msmvps.com/clustering - Blog
> "Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
> news:O845A2H2EHA.2568@.TK2MSFTNGP11.phx.gbl...
local[vbcol=seagreen]
array[vbcol=seagreen]
This[vbcol=seagreen]
a[vbcol=seagreen]
maint.[vbcol=seagreen]
if[vbcol=seagreen]
a
>
|||We use the Tivoli suite of products...Tivoli storage manager for the OS, and
Tivoli data protection for SQL. We cart all back ups off the servers in case
there is a drive failure. As long as your cluster is active / passive, it's
not too intense to set up and use, but active / active gets a bit trickier.
both nodes need to be able to authenticate to the back up server as each othr
on active / active....we have 2 such clusters running this way, and 5 more
active/ passives.
"Geoff N. Hiten" wrote:

> Yep. You can also easily overwhelm a network. I use a dedicated link with
> a connection-specific domain suffix to segment the backup traffic from the
> normal SQL traffic. I also tune the file share to maximize write
> capability. I just upgraded the backup host server (which is also my tape
> host server) to handle the load.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
> message news:%23kJFlsI2EHA.2572@.tk2msftngp13.phx.gbl...
> local
> array
> This
> a
> maint.
> if
> a
>
>
sqlsql

Cluster Backup

Does anyone has a VBS to backup Cluster?
Thanks much!
VBS = VERITAS Backup System? If so we use Backup Exec and Net Backup - both
work nicely when configured properly
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:Oz31IyoIGHA.3984@.TK2MSFTNGP14.phx.gbl...
> Does anyone has a VBS to backup Cluster?
> Thanks much!
>
|||VB Script API
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:eohFqSpIGHA.2900@.TK2MSFTNGP14.phx.gbl...
> VBS = VERITAS Backup System? If so we use Backup Exec and Net Backup -
both
> work nicely when configured properly
> 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:Oz31IyoIGHA.3984@.TK2MSFTNGP14.phx.gbl...
>
|||ON your earlier note with Veritas Back up, do you back up the Quorum Disk
and the ClusterLog and ClusterDb?
Thanks
"Vai2000" <nospam@.microsoft.com> wrote in message
news:Oz31IyoIGHA.3984@.TK2MSFTNGP14.phx.gbl...
> Does anyone has a VBS to backup Cluster?
> Thanks much!
>
|||You backup the system state and they are included
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:uRySY1pIGHA.2628@.TK2MSFTNGP15.phx.gbl...
> ON your earlier note with Veritas Back up, do you back up the Quorum Disk
> and the ClusterLog and ClusterDb?
> Thanks
> "Vai2000" <nospam@.microsoft.com> wrote in message
> news:Oz31IyoIGHA.3984@.TK2MSFTNGP14.phx.gbl...
>

Saturday, February 25, 2012

Clone DB

Helloo

Can I backup DB programatically, and then restore it with different name also programatically?

meaning:
I have db2006, can I backup this db then restore it as db2007 programatically?using a stored procedure for example?

So by doing this the user will be using db2007 @. the begininng of the year and so on each year

I'm using sql2000

Please I need your help
Thank you

hi,

you can use sp_attach and sp_detach.

notice you can attach it with different db_name

Examples

EXEC sp_detach_db 'pubs', 'true'

copy the files and attach it with different dbname

EXEC sp_attach_db @.dbname = N'pubs1', 

@.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',

@.filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log.ldf'

|||

Thank you for your reply

but I had explained in a wrong way

I need to create a dublicate for this database programatically
meaning if i have db2004, I need to create db2005 programatically same as db2004(tables and procedures, only structure)

Is that possible?

thank you

|||

you can right click the database in the Enterprise manager or management studio

and clcik on task>generate scripts

|||

Look into the smo objects in books online. You could probably build a program to do this pretty easily to script out the database, create a clone database, and apply the script.

If this is a production database, if you have maintain scripts of the database, that is probably the best way to go, just by applying the scripts (but that takes a good amount of discipline on all developers, which can be hard to maintain depending on corporate culture)

Friday, February 24, 2012

Client Tools for Backup

Hi all,
I hope this hasn't been answered already...
I have developed a .NET WinForms app which runs on client PCs which talk to
SQL Server2000 on a server. I have coded a backup screen which uses
SQLDMO. This runs fine when I run the app on the server, but it crashes
when I try it on the client PCs. Looks like something to do with an
unregistered
SQLDMO dll.
There's only one client PC which actually requires this functionality. I'm
thinking that installing Client Tools on this PC should take care of things.
I'm wondering if there are any licensing issues.
The company in question is running Small Business Server 2000 and has
the relevant licenses for SQL Server 2000.
Thanks!
John
See if this helps:
http://support.microsoft.com/default...b;EN-US;248241
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"jonsie" <jonsie@.discussions.microsoft.com> wrote in message
news:0F7A3DB9-C07E-4595-9D1A-B19300024332@.microsoft.com...
Hi all,
I hope this hasn't been answered already...
I have developed a .NET WinForms app which runs on client PCs which talk to
SQL Server2000 on a server. I have coded a backup screen which uses
SQLDMO. This runs fine when I run the app on the server, but it crashes
when I try it on the client PCs. Looks like something to do with an
unregistered
SQLDMO dll.
There's only one client PC which actually requires this functionality. I'm
thinking that installing Client Tools on this PC should take care of things.
I'm wondering if there are any licensing issues.
The company in question is running Small Business Server 2000 and has
the relevant licenses for SQL Server 2000.
Thanks!
John
|||hi John,
"jonsie" <jonsie@.discussions.microsoft.com> ha scritto nel messaggio
news:0F7A3DB9-C07E-4595-9D1A-B19300024332@.microsoft.com...
> Hi all,
> I hope this hasn't been answered already...
> I have developed a .NET WinForms app which runs on client PCs which talk
to
> SQL Server2000 on a server. I have coded a backup screen which uses
> SQLDMO. This runs fine when I run the app on the server, but it crashes
> when I try it on the client PCs. Looks like something to do with an
> unregistered
> SQLDMO dll.
> There's only one client PC which actually requires this functionality. I'm
> thinking that installing Client Tools on this PC should take care of
things.
> I'm wondering if there are any licensing issues.
> The company in question is running Small Business Server 2000 and has
> the relevant licenses for SQL Server 2000.
the SQL Server Client Tools are limited and related to SQL Server license...
regarding SQL-DMO component, you can distribute it as it is freely
redistributable..
the related dependencies are:
; not licensed by redist.txt but available after installation of MDAC2.6
...\WINDOWS\SYSTEM\odbcbcp.dll; DestDir: WinSys ; sharedfile
; not licensed by redist.txt but available after installation of MDAC2.6
...\WINDOWS\SYSTEM\sqlwoa.dll ; DestDir: WinSys
; not licensed by redist.txt but available after installation of MDAC2.6
...\WINDOWS\SYSTEM\sqlwid.dll ; DestDir: WinSys
...\Programmi\Microsoft SQL Server\80\Tools\Binn\w95scm.dll; DestDir:
DestinationFolder\Binn
...\WINDOWS\SYSTEM\sqlunirl.dll ; DestDir: WinSys
...\Programmi\Microsoft SQL Server\80\Tools\Binn\sqlresld.dll; DestDir:
DestinationFolder\Binn
...\Programmi\Microsoft SQL Server\80\Tools\Binn\sqlsvc.dll; DestDir:
DestinationFolder\Binn
; not licensed by redist.txt but available after installation of MDAC2.6
...\Programmi\Microsoft SQL Server\80\Tools\Binn\Resources\1033\sqlsvc.RLL;
DestDir: DestinationFolder\Binn\Resources\1033
; not licensed by redist.txt but available after installation of MDAC2.6
...\Programmi\Microsoft SQL Server\80\Tools\Binn\Resources\1033\Sqldmo.rll;
DestDir: DestinationFolder\Binn\Resources\1033
...\Programmi\Microsoft SQL Server\80\Tools\Binn\sqldmo.dll; DestDir:
DestinationFolder\Binn ; file to be registered via regserver
DestinationFolder can either be the installation directory of one instance
of Microsoft SqlServer 2000, like ..\Program Files\Microsoft SQL
Server\80\Tools, even if no istance of SQL Server has been installed, or the
installation directory of your application, but the first one is preferred.
Please do respect the hierarchy \Binn\Resources\1033 (where 1033 specifies
the language), where needed, in order to grant correct functionality of
Ole-Automation objects.
In order to install SQL-DMO components for MSDE 2000, Microsoft Internet
Explorer 5.5 or higher is required.
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply