Author |
Topic |
gsgill76
Posting Yak Master
137 Posts |
Posted - 2006-10-10 : 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/TNow 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
30421 Posts |
Posted - 2006-10-10 : 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 /TPeter LarssonHelsingborg, Sweden |
|
|
gsgill76
Posting Yak Master
137 Posts |
Posted - 2006-10-10 : 08:12:01
|
Peso--that doesnt help me |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
gsgill76
Posting Yak Master
137 Posts |
Posted - 2006-10-10 : 08:24:41
|
Sorry Peter Larssonthat againt dont help me, it just explain the parameters (attributes or switches)Regards,Thanks.Gurpreet S. Gill |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-10 : 08:52:36
|
As far as I can read, the option /r (the options are case sensitive) creates the DROP statements too...Peter LarssonHelsingborg, Sweden |
|
|
gsgill76
Posting Yak Master
137 Posts |
Posted - 2006-10-10 : 12:37:15
|
Peter LarssonBut this option is not working for me, could do a favour,please do yourself & test.Regards,Thanks.Gurpreet S. Gill |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-10-10 : 22:24:33
|
quote: Originally posted by gsgill76 Peter LarssonBut 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 AthalyeIndia."Nothing is Impossible" |
|
|
gsgill76
Posting Yak Master
137 Posts |
Posted - 2006-10-11 : 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 /Tit workedAnd when i try with one space as SCPTXFR.EXE /s abc /d aaa /P abc12345 /f D:\HSE0607\SCHEMA.sql /q /r /Tit again workedI 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 meThanks.Gurpreet S. Gill |
|
|
|