SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 SCPTXFR.EXE-- Problem with Drop procedure
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gsgill76
Posting Yak Master

India
137 Posts

Posted - 10/10/2006 :  07:53:58  Show Profile  Click to see gsgill76's MSN Messenger address  Send gsgill76 a Yahoo! Message  Reply with Quote
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
30276 Posts

Posted - 10/10/2006 :  08:03:04  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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
Go to Top of Page

gsgill76
Posting Yak Master

India
137 Posts

Posted - 10/10/2006 :  08:12:01  Show Profile  Click to see gsgill76's MSN Messenger address  Send gsgill76 a Yahoo! Message  Reply with Quote
Peso--
that doesnt help me
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30276 Posts

Posted - 10/10/2006 :  08:16:21  Show Profile  Visit SwePeso's Homepage  Reply with Quote
This article might help you
http://www.dbazine.com/sql/sql-articles/larsen4


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

gsgill76
Posting Yak Master

India
137 Posts

Posted - 10/10/2006 :  08:24:41  Show Profile  Click to see gsgill76's MSN Messenger address  Send gsgill76 a Yahoo! Message  Reply with Quote
Sorry Peter Larsson
that againt dont help me, it just explain the parameters (attributes or switches)
Regards,
Thanks.
Gurpreet S. Gill
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30276 Posts

Posted - 10/10/2006 :  08:52:36  Show Profile  Visit SwePeso's Homepage  Reply with Quote
As far as I can read, the option /r (the options are case sensitive) creates the DROP statements too...


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

gsgill76
Posting Yak Master

India
137 Posts

Posted - 10/10/2006 :  12:37:15  Show Profile  Click to see gsgill76's MSN Messenger address  Send gsgill76 a Yahoo! Message  Reply with Quote
Peter Larsson
But this option is not working for me, could do a favour,please do yourself & test.
Regards,
Thanks.
Gurpreet S. Gill
Go to Top of Page

harsh_athalye
Flowing Fount of Yak Knowledge

India
5581 Posts

Posted - 10/10/2006 :  22:24:33  Show Profile  Visit harsh_athalye's Homepage  Click to see harsh_athalye's MSN Messenger address  Send harsh_athalye a Yahoo! Message  Reply with Quote
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
Go to Top of Page

gsgill76
Posting Yak Master

India
137 Posts

Posted - 10/11/2006 :  01:33:52  Show Profile  Click to see gsgill76's MSN Messenger address  Send gsgill76 a Yahoo! Message  Reply with Quote
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

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000