| Author |
Topic  |
|
|
gsgill76
Posting Yak Master
India
137 Posts |
Posted - 10/10/2006 : 07:53:58
|
hi there I am using SCPTXFR.EXE to generate script of the database(for backup),using following command.
SCPTXFR.EXE /s abc /d aaa /P abc12345 /f D:\HSE0607\SCHEMA.sql /q/r/T
Now the script is generating fine, but what i find that there is no statment like "if not exists(...) " for the Stored Procedure( i had applied the /r parameter), for the Create Tables it is there.
Why there is no statment IF NOT EXISTS(...) for Stored Procedure? need the this, how can i do this?? Regards, Thanks. Gurpreet S. Gill
|
|
|
SwePeso
Patron Saint of Lost Yaks
Sweden
29156 Posts |
Posted - 10/10/2006 : 08:03:04
|
Try to add spaces between the last three options. SCPTXFR.EXE /s abc /d aaa /P abc12345 /f D:\HSE0607\SCHEMA.sql /q /r /T
Peter Larsson Helsingborg, Sweden |
Edited by - SwePeso on 10/10/2006 08:03:27 |
 |
|
|
gsgill76
Posting Yak Master
India
137 Posts |
Posted - 10/10/2006 : 08:12:01
|
Peso-- that doesnt help me
|
 |
|
|
SwePeso
Patron Saint of Lost Yaks
Sweden
29156 Posts |
|
|
gsgill76
Posting Yak Master
India
137 Posts |
Posted - 10/10/2006 : 08:24:41
|
Sorry Peter Larsson that againt dont help me, it just explain the parameters (attributes or switches) Regards, Thanks. Gurpreet S. Gill |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
Sweden
29156 Posts |
Posted - 10/10/2006 : 08:52:36
|
As far as I can read, the option /r (the options are case sensitive) creates the DROP statements too...
Peter Larsson Helsingborg, Sweden |
 |
|
|
gsgill76
Posting Yak Master
India
137 Posts |
Posted - 10/10/2006 : 12:37:15
|
Peter Larsson But this option is not working for me, could do a favour,please do yourself & test. Regards, Thanks. Gurpreet S. Gill |
 |
|
|
harsh_athalye
Flowing Fount of Yak Knowledge
India
5509 Posts |
Posted - 10/10/2006 : 22:24:33
|
quote: Originally posted by gsgill76
Peter Larsson But this option is not working for me, could do a favour,please do yourself & test. Regards, Thanks. Gurpreet S. Gill
I don't understand why its not working for you...I tried it and working fine. Have you tried adding spaces between the options as Peter suggested?
I tried following command:
scptxfr /s server /d pubs /I /f c:\xxx\abc.sql /q /r /T
NOTE: DROP PROCEDURE statements are generated at the top of the script, not before each procedure !!
Harsh Athalye India. "Nothing is Impossible" |
Edited by - harsh_athalye on 10/10/2006 22:25:33 |
 |
|
|
gsgill76
Posting Yak Master
India
137 Posts |
Posted - 10/11/2006 : 01:33:52
|
Hi finally i am able to solve my problem, but i still dont how & why. What i did i just give more than one space between each switch as
SCPTXFR.EXE /s abc /d aaa /P abc12345 /f D:\HSE0607\SCHEMA.sql /q /r /T
it worked And when i try with one space as
SCPTXFR.EXE /s abc /d aaa /P abc12345 /f D:\HSE0607\SCHEMA.sql /q /r /T
it again worked I dont know why it was not working first time for me. ok, what so ever the way is, i am able to solve the problem, Regards to all who help me Thanks. Gurpreet S. Gill
|
 |
|
| |
Topic  |
|