Re: osql

From: Simon Weaver (anonymous_at_discussions.microsoft.com)
Date: 02/20/04


Date: Fri, 20 Feb 2004 02:25:54 -0800

Not sure if that's the solution. After ironing our
some ',' syntax errors I'm left with

*************************************

1> 2> 3> 4> 5> 6> 7> Msg 2812, Level 16, State 62, Server
NXP353467\ORDERS, Line 4
Could not find stored procedure 'sp_add_job'.
1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> Msg 2812, Level 16,
State 62, Server NXP353467\ORDERS, Line 4
Could not find stored procedure 'sp_add_jobstep'.
1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> Msg 2812, Level 16,
State 62, Server NXP353467\ORDERS, Line 4
Could not find stored procedure 'sp_add_jobstep'.
1> 2> 3> 4> 5> 6> 7> 8> 9> 10> Msg 2812, Level 16, State
62, Server NXP353467\ORDERS, Line 4
Could not find stored procedure 'sp_add_jobserver'.
Msg 2812, Level 16, State 62, Server NXP353467\ORDERS,
Line 8
Could not find stored procedure 'sp_start_job'.
****************************************

For some reason none of the stored procs are running!

Is there a reason for this...

TIA, Simon

>-----Original Message-----
>Sounds like you have a named instance. Have you tried
>
>OSQL -SNXP353467\ORDERS -Usa -i msde.sql -o log.txt
>
>For the backup error, you can't do a log backup if a
database is in SIMPLE
>recovery mode. If you need the recoverability of FULL
then you can run
>
>ALTER DATABASE ORDERS SET RECOVERY FULL
>
>--
>HTH
>
>Jasper Smith (SQL Server MVP)
>
>I support PASS - the definitive, global
>community for SQL Server professionals -
>http://www.sqlpass.org
>
>
>"SIMON WEAVER" <anonymous@discussions.microsoft.com>
wrote in message
>news:1308801c3f6fa$e406be90$a401280a@phx.gbl...
>> Hi, I am calling an osql script named msde_bak.sql with
>> the following command line...
>>
>> =================================
>> OSQL -Usa -i msde.sql -o log.txt
>> =================================
>>
>> The password is prompted and entered correctly.
>> The script is modified from kb article Q241397 but
regret
>> I cannot get it to work.
>> The output file -o log.txt reads...
>>
>> =================================
>>
>> [Shared Memory]SQL Server does not exist or access
denied.
>> [Shared Memory]ConnectionOpen (Connect()).
>> =================================
>>
>> I may have entered the servername and instance
>> incorrectly, I've tried numerous ways without success -
>> but have found no documentation on this part of the
>> syntax. Can anyone please help.
>>
>>
>> =================================
>> -- osql script named msde_bak.sql
>>
>> USE master
>> EXEC sp_add_job @job_name = 'ordersbak',
>> @enabled = 1,
>> @description = 'ordersbak',
>> go
>>
>> -- Add job step (backup data).
>> USE master
>> EXEC sp_add_jobstep @job_name = 'ordersbak',
>> @step_name = 'Backup Orders Data',
>> @subsystem = 'TSQL',
>> @command = 'BACKUP DATABASE orders TO DISK
>> = ''C:\sqlbak\msde.bak''',
>> @on_success_action = 3,
>> @retry_attempts = 5,
>> @retry_interval = 5
>> go
>>
>> -- Add job step (backup log).
>> USE master
>> EXEC sp_add_jobstep @job_name = 'ordersbak',
>> @step_name = 'Backup Orders Log',
>> @subsystem = 'TSQL',
>> @command = 'BACKUP LOG orders TO DISK
>> = ''C:\sqlbak\msde.log''',
>> @on_success_action = 1,
>> @retry_attempts = 5,
>> @retry_interval = 5
>> go
>>
>> -- Add the target servers.
>> USE master
>> EXEC sp_add_jobserver @job_name = 'ordersbak',
>> @server_name = 'NXP353467\ORDERS'
>>
>> -- Run job. Starts the job immediately.
>> USE master
>> EXEC sp_start_job @job_name = 'ordersbak'
>> =================================
>>
>> Please note: I can perform a backup successfully by
>> calling the following script...
>>
>> USE master
>> GO
>> BACKUP DATABASE ORDERS
>> TO DISK = 'C:\sqlbak\msde.bak'
>> WITH FORMAT,
>> INIT,
>> NAME = 'Full Backup of ORDERS';
>> GO
>>
>> But receive the following error when running...
>>
>> USE master
>> GO
>> BACKUP LOG ORDERS
>> TO DISK = 'C:\sqlbak\msde.log'
>> WITH FORMAT,
>> INIT,
>> NAME = 'Full Backup of ORDERS LOG';
>> GO
>>
>> Msg 4208, Level 16, State 1, Server NXP353467\ORDERS,
>> Line 1
>> The statement BACKUP LOG is not allowed while the
>> recovery model is
>> SIMPLE. Use BACKUP DATABASE or change the recovery
model
>> using ALTER
>> DATABASE.
>> Msg 3013, Level 16, State 1, Server NXP353467\ORDERS,
>> Line 1
>> BACKUP LOG is terminating abnormally.
>>
>> TIA, Simon
>>
>>
>
>
>.
>



Relevant Pages

  • RE: Replace Windows 2000 DC
    ... all ping the server fine. ... > backup set to the NewSrv1, please make sure you backup the Server1 AFTER ... > transfer FSMO to NewSrv2 and restore the backup set to NewSrv1, ... >>2)Domain Naming Master ...
    (microsoft.public.win2000.setup_deployment)
  • Re: Raising errors from SQL Server
    ... Server. ... but I had access to the master table ... I would like my stored procedure to return an error when more than a ... -- First argument supplies the string. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Disaster Recovery question
    ... > You can restore master to another box. ... > 1) Drop the suspect DB's and simply restore from backup. ... > folders as on your original server. ...
    (microsoft.public.sqlserver.server)
  • CARP: trouble or feature
    ... I have a problem with CARP on FreeBSD 6.2 in the following scheme: ... But if to send icmp request from server A -> to server C on ip 10.10.9.4, server B replay from BACKUP iface carp11!?!? ... MASTER vhid 100 advbase 1 advskew 0 ...
    (freebsd-questions)
  • Carp, vlan, routing...
    ... I have a problem with CARP on FreeBSD 6.2 in the following scheme: ... But if to send icmp request from server A -> to server C on ip 10.10.9.4, server B replay from BACKUP iface carp11!?!? ... MASTER vhid 100 advbase 1 advskew 0 ...
    (freebsd-net)