Re: osql
From: Simon Weaver (anonymous_at_discussions.microsoft.com)
Date: 02/20/04
- Next message: Simon Weaver: "osql"
- Previous message: Dejan Sarka: "Re: Copy Database Wizard works - then fails."
- In reply to: Jasper Smith: "Re: osql"
- Messages sorted by: [ date ] [ thread ]
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
>>
>>
>
>
>.
>
- Next message: Simon Weaver: "osql"
- Previous message: Dejan Sarka: "Re: Copy Database Wizard works - then fails."
- In reply to: Jasper Smith: "Re: osql"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|