Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
htplootsnot
Starting Member
2 Posts |
Posted - 2006-04-22 : 06:59:51
|
| Hi nice forum you have here.Please point me to a link on this forum if I’ve missed something but I could not find an answer to this question yet. I am new to sql and am looking at running random backups of an sql database. Regular backups are running nightly using maintenance jobs in enterprise manager. These random backups would be started at a point in time just before a specific procedure was run. There will be a user assigned the task of running these backups who has no privilege to log onto the sql server machine (nor will he ever get this privilege). I would be interested to know if there is a way to script this so that this user could simply start a backup from his workstation. The backup could be a repeat of the scheduled nightly backup storing to the same place or a new backup. The db in question is only 150 +/- MB so time involved in completing this job is minimal (the scheduled backup of this db completes in under a minute).System is SQL 2000 sp4 on a Win 2003 server with XPpro sp2 clients.Thanks for any tips, hints or detailed descriptions.Regards HT |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-04-22 : 08:53:02
|
| No permissions to log in?You could put a .bat file on his m/c which ran the backup via osql.Or maybe started a job on the server which did the backup so you have a record.Depends on what permissions you are willing to give. At some point there has to be a connection to the server to do the backup. This could be via another server or a remote workstation but it's easiest to give a sql server login and hard code the user/password in the osql call.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
htplootsnot
Starting Member
2 Posts |
Posted - 2006-04-22 : 16:49:44
|
| Hi nr,Thanks i googled a bit more and came across osql and isql. Like i mentionioned im very wet behind the ears on sql. Looks like there should be a possibility of hardcoding a u/p into a script. the said user would probrably never open the batch to see that it contains a password anyway. What about client server tools for sql? Setting up a virtual machine now to give it a go. Thanks HT |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-04-22 : 16:58:22
|
| All you need is to copy osql.exe.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-04-22 : 23:01:21
|
| If you need backups to be able to do a point in time recovery, a better solution would be to set the database to full recovery, and then setup a scheduled job to do transaction log backups every 5 to 15 minutes. It only takes a few minutes to set this up with the Database Maintenance Wizard.If you need to recover to right before something was done, you could just have that process record it's start time in a table. With that time, you can recover to just before it started.CODO ERGO SUM |
 |
|
|
|
|
|