Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    3

    Unanswered: sp_dropsegment question.

    I have a baffling problem. If I run this procedure manually (ISQL prompt) it works:

    use mydb
    go
    sp_dropsegment "logsegment", mydb, "mydevice"
    go

    But if I run it from a script:

    isql -Uvaris6 -Pvaris6 -Suss_starship <CleanUpSegments.sql >CleanUpSegments.out

    I get this:

    Msg 17520, Level 16, State 1:
    Procedure 'sp_dropsegment', Line 131:
    There is no such segment as '“logsegment”'.
    (return status = 1)
    Msg 17280, Level 16, State 1:
    Procedure 'sp_extendsegment', Line 135:
    No such device exists -- run sp_helpdb to list the devices for the current
    database.
    (return status = 1)

    The DBO for mydb is varis6 and it has both SA SSO roles.
    "mydb" is the default database for User "varis6"

    Why is it failing inside the script? Any clues or ideas would be greatly appreciated.

    Regards, Les Guyse
    Varian Medical Systems

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Provide us your full script. It includes some other lines than the sp_dropsegment...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •