Results 1 to 12 of 12
  1. #1
    Join Date
    Dec 2007
    Posts
    9

    Unanswered: Set Identity_insert

    hi

    i need to set the identity_insert on and off to a remote table in order to insert rows into it

    can anyone help me please

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    how remote is it?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Dec 2007
    Posts
    9
    r937 are u tring to help or u just want to make fun of this post? ... cause if u want fun I can recommend u some good joke sites

    the client table is on another server 500 miles away from the server ... and I want to insert some new rows into it but one column from client table has identity set to yes

    I'm asking because it should be trivial to do this ...

    set identity_insert server.database.table ON | OFF

    but for whatever reason it gives a error message about permission or something like that

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    eye've never yoused a remote database, but eye would try something like this:
    Code:
    use server.database
    
    set identity_insert table on
    ewe may still get a permission error

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Can you perform any other operations on the remote server?
    George
    Home | Blog

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by makko
    ...but for whatever reason it gives a error message about permission or something like that
    Based on the information that you've given us, I'd guess that the problem has to do with permission, or something like that. If you can give a more exact error message, I'd be glad to try and give you a more exact analysis and suggest a corrective action, but I need more information to be more help to you.

    -PatP

  7. #7
    Join Date
    Feb 2004
    Location
    Burbank & Santa Cruz de la Sierra
    Posts
    3,716
    Quote Originally Posted by Pat Phelan
    Based on the information that you've given us, I'd guess that the problem has to do with permission, or something like that. If you can give a more exact error message, I'd be glad to try and give you a more exact analysis and suggest a corrective action, but I need more information to be more help to you.

    -PatP
    I agree. Sometimes a server is just not aware of who you are, so it doesn't know to bypass all the security settings in effect the way it would if it was aware of your importance in the grand scheme of things.
    aka "Paul"
    Non est ei similis.

    I just read "100 Things To Do Before You Die". I was surprised that "Yell for help!!" wasn't one of them

  8. #8
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by TallCowboy0614
    ... if it was aware of your importance in the grand scheme of things.
    sounds pretty remote to me
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  9. #9
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by makko
    r937 are u tring to help or u just want to make fun of this post? ... cause if u want fun I can recommend u some good joke sites
    ...still waiting on those recommendations...
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  10. #10
    Join Date
    Dec 2002
    Posts
    1,245
    Makko,

    My .02, for what it's worth. Your initial post was incomplete and your second post indicated that you had put minimal effort into finding a solution.

    Try here first; you can also try SQL Books on Line (it's always a good resource).

    Try treating your posts like professional correspondence, instead of like texting your pals by phone. If you've come here to ask a question, take the time to phrase the question completely (yes, spelling counts).

    Try not to get on r937's bad side (or anyone else's for that matter). I'm not an admin, but I think you're out of bounds.

    This is a great site; I can't count the number of times that someone on the board here has pulled my bacon out of the fire. But you get out of it what you put into it.

    Try harder next time.

    Regards,

    hmscott
    Have you hugged your backup today?

  11. #11
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    another option is to simply connect to the remote machine in QA or SSMS and run your query from there, instead of trying to do the linked server thing.

  12. #12
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    If this is a one time thing, I would simply forward the data and request to the guy who administers the remote machine. It is unlikely permissions will be altered for a one time effort. If this is something that is going to happen on a regular basis, then you really have to get in touch with the guy who administers the remote server. If it were me, a different (yet automated) process would have to be created to get the data into the table. And many questions would be raised about the design, and or requirements.

Posting Permissions

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