Wednesday, March 21, 2012
Out of disk space
there are 270 gigs free on the server and it continues to fail saying out of
disk space. Makes no sense.
Any ideas?
Thanks
Richard
What is the exact message? Are you sure the backup device is pointing to
the correct drive?
Andrew J. Kelly SQL MVP
"Richard Douglass" <RDouglass@.arisinc.com> wrote in message
news:eROSq$ANGHA.3908@.TK2MSFTNGP10.phx.gbl...
> We are having a ton of problems with a full backup. The db is 120 gigs,
> there are 270 gigs free on the server and it continues to fail saying out
> of disk space. Makes no sense.
> Any ideas?
> Thanks
> Richard
>
|||What is the size of the log file?
"Richard Douglass" wrote:
> We are having a ton of problems with a full backup. The db is 120 gigs,
> there are 270 gigs free on the server and it continues to fail saying out of
> disk space. Makes no sense.
> Any ideas?
> Thanks
> Richard
>
>
Out of disk space
there are 270 gigs free on the server and it continues to fail saying out of
disk space. Makes no sense.
Any ideas'
Thanks
RichardWhat is the exact message? Are you sure the backup device is pointing to
the correct drive?
--
Andrew J. Kelly SQL MVP
"Richard Douglass" <RDouglass@.arisinc.com> wrote in message
news:eROSq$ANGHA.3908@.TK2MSFTNGP10.phx.gbl...
> We are having a ton of problems with a full backup. The db is 120 gigs,
> there are 270 gigs free on the server and it continues to fail saying out
> of disk space. Makes no sense.
> Any ideas'
> Thanks
> Richard
>|||What is the size of the log file?
"Richard Douglass" wrote:
> We are having a ton of problems with a full backup. The db is 120 gigs,
> there are 270 gigs free on the server and it continues to fail saying out of
> disk space. Makes no sense.
> Any ideas'
> Thanks
> Richard
>
>
Out of disk space
there are 270 gigs free on the server and it continues to fail saying out of
disk space. Makes no sense.
Any ideas'
Thanks
RichardWhat is the exact message? Are you sure the backup device is pointing to
the correct drive?
Andrew J. Kelly SQL MVP
"Richard Douglass" <RDouglass@.arisinc.com> wrote in message
news:eROSq$ANGHA.3908@.TK2MSFTNGP10.phx.gbl...
> We are having a ton of problems with a full backup. The db is 120 gigs,
> there are 270 gigs free on the server and it continues to fail saying out
> of disk space. Makes no sense.
> Any ideas'
> Thanks
> Richard
>|||What is the size of the log file?
"Richard Douglass" wrote:
> We are having a ton of problems with a full backup. The db is 120 gigs,
> there are 270 gigs free on the server and it continues to fail saying out
of
> disk space. Makes no sense.
> Any ideas'
> Thanks
> Richard
>
>
Friday, March 9, 2012
osql return to check backup success/failure
there a way I could get a return of 1 or 0, 0 being success and 1 being
error. I tried using -b option but it returns the entire details of failure
followed by the return number and if i use -o paramater I dont see any
result at all. Can anyone please suggest some solution to this. any help
will be greatly appreciated. Thanks
Message posted via http://www.webservertalk.comTry catching the error in the batch being executed with OSQL and use
RAISERROR to set the DOS variable ERRORLEVEL.
Example:
Create a batch file with the following instructions:
osql -S my_server -E -d master -Q "backup database northwind to blahblah if
@.@.error != 0 raiserror ('Error during backup.', 16, 127)"
echo %ERRORLEVEL%
Execute the batch file and you will see 50000 as the echo of the variable
ERRORLEVEL, because I am specifying a msg_str in RAISERROR. You can create
your own error msg using sp_addmessage.
AMB
"ishaan99 via webservertalk.com" wrote:
> I am running an osql using input script which runs a database backup. Is
> there a way I could get a return of 1 or 0, 0 being success and 1 being
> error. I tried using -b option but it returns the entire details of failur
e
> followed by the return number and if i use -o paramater I dont see any
> result at all. Can anyone please suggest some solution to this. any help
> will be greatly appreciated. Thanks
> --
> Message posted via http://www.webservertalk.com
>|||I forgot to mention that in order to set DOS variable ERRORLEVEL, using
RAISERROR, you have to specify state 127.
Error Handling in SQL Server – a Background
http://www.sommarskog.se/error-handling-I.html
Implementing Error Handling with Stored Procedures
http://www.sommarskog.se/error-handling-II.html
AMB
"Alejandro Mesa" wrote:
> Try catching the error in the batch being executed with OSQL and use
> RAISERROR to set the DOS variable ERRORLEVEL.
> Example:
> Create a batch file with the following instructions:
> osql -S my_server -E -d master -Q "backup database northwind to blahblah i
f
> @.@.error != 0 raiserror ('Error during backup.', 16, 127)"
> echo %ERRORLEVEL%
> Execute the batch file and you will see 50000 as the echo of the variable
> ERRORLEVEL, because I am specifying a msg_str in RAISERROR. You can create
> your own error msg using sp_addmessage.
>
> AMB
>
> "ishaan99 via webservertalk.com" wrote:
>|||Thanks so much. That helped and worked fine.
Message posted via http://www.webservertalk.com
Saturday, February 25, 2012
osql - restore database
Using OSQL
How can I restore into a database called ‘mydb1’ from a backup of database
‘mydb2’
Tanks
hi Carlos,
Carlos AZ wrote:
> Please help,
> Using OSQL
> How can I restore into a database called 'mydb1' from a backup of
> database 'mydb2'
>
you have to modify the database name to the new name..
and of course specify a different file system location for the physical
files or you will overwrite the original mydb1 files..
following you can see a statement that restores to pubs2 the pubs database
backup, moving the datafile and the transaction log file to new physical
files..
RESTORE DATABASE [pubs2] FROM DISK = N'C:\Programmi\Microsoft SQL
Server\MSSQL\BACKUP\pubs.bak'
WITH FILE = 1,
NOUNLOAD ,
STATS = 10,
RECOVERY ,
MOVE N'pubs' TO N'C:\Programmi\Microsoft SQL
Server\MSSQL\data\pubs_2.mdf',
MOVE N'pubs_log' TO N'C:\Programmi\Microsoft SQL
Server\MSSQL\data\pubs_log_2.ldf'
please have a look at
http://msdn.microsoft.com/library/de...ra-rz_25rm.asp
for RESTORE statement synopsis
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Monday, February 20, 2012
OS backup
New MSSQL guy coming from Oracle. I've read and understand that you can create backup files for a database using the server management studio.
However, I'm wondering if that is really necessary. Suppose I do not care about the loss of transaction logs, is copying the .mdf database files via OS command a viable backup strategy? If so do I need to bring down the database engine before starting the file copy?
Thanks a lot
You can get a valid backup of a SQL Server database by shutting down the instance and then taking a full OS backup, but you do lose significant functionality by doing so:
Obviously, you're giving up the ability to take your backups with the database online. Native SQL database backups are all online.|||Thank you Kevin.
Our production operations run on Oracle systems. We have to run 1 small MSSQL instance since some MSFT application only use that. So, I'm not really concerned about that DB's size, around-the-clock availibility, or point-in-time recovery.
Given the above requirements and the fact that I have no experience in MSSQL, backing up via the OS route seems to be the path of least resistence :)
Thanks again!