Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2007
    Posts
    5

    Unanswered: Using bcp to copy in syslogins in ASE 12.5.2 from ASE 12.0

    Hi,

    I tried the following to get user logins from syslogins.bcp of 12.0
    bcp master.dbo.syslogins in syslogins.bcp -c -b1 -U "$USRNAME" -P "$PASSWORD" -S "$SRVNAME"
    Above command told me that there is a syntax error, so I compared both tables and found out there is an additional column in 12.5 so, I added additional value at the end <TAB>0 but I didn't remove sa entry from the syslogins.bcp.
    I ran the the above command I get the following error:
    CT-LIBRARY error:
    ct_connect(): network packet layer: internal net library error: Net-Libr
    ary operation terminated due to disconnect

    -- Now I can't login to the server. please advise what should I do?

    Thanks...http://www.dbforums.com/db_images_v3...milies/eek.gif

  2. #2
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Quote Originally Posted by shaikh.iftikhar
    Hi,

    I tried the following to get user logins from syslogins.bcp of 12.0
    bcp master.dbo.syslogins in syslogins.bcp -c -b1 -U "$USRNAME" -P "$PASSWORD" -S "$SRVNAME"
    Above command told me that there is a syntax error, so I compared both tables and found out there is an additional column in 12.5 so, I added additional value at the end <TAB>0 but I didn't remove sa entry from the syslogins.bcp.
    I ran the the above command I get the following error:
    CT-LIBRARY error:
    ct_connect(): network packet layer: internal net library error: Net-Libr
    ary operation terminated due to disconnect

    -- Now I can't login to the server. please advise what should I do?

    Thanks...http://www.dbforums.com/db_images_v3...milies/eek.gif
    Im not sure why you cant login after the bcp failed because of column differences. syslogins should have a unique index, so it will reject duplicate rows even if you had the sa row in it. Did you try the old password?

    For your original question, yeah, a normal bcp out/in is not possible because of the column changes. However, you can use a format file with bcp to workaround this, I think.

  3. #3
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Sorry, just re-read your post. So, it looks like it did successfully went thro after you padded values?

  4. #4
    Join Date
    Jun 2007
    Posts
    5
    Thank you very much for the help, it did work.

  5. #5
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    So, alls resolved or do you still have problems? If you have issues, can you please re-state it.

Posting Permissions

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