SQL Server Performance

String Global Variable - Storing Text

Discussion in 'SQL Server DTS-Related Questions' started by Dave Wells, Oct 20, 2003.

  1. Dave Wells New Member

    Does anyone know of any issues in storing a text column as a global variable? Is there a size limit to the string?
  2. satya Moderator

    I think it may impact on the memory while calling by any API.
    Why not create a global temp. table with this text datatype alone and call the reference.

    HTH

    _________
    Satya SKJ
    Moderator
    SQL-Server-Performance.Com
  3. Dave Wells New Member

    The problem I've got that I have a number of T-SQL scripts stored in a table which need to be executed on a remote server not on the LAN. I can't use a linked server due to the configuration (remote server isn't part of a domain let alone a trusted domain)

    As part of a DTS package running on the remote server it needs to read in a script from the local server and execute on the remote server.

    I was thinking that I might be able to do with with global variables.

    I'm not sure how to do what you're suggesting. I can create a temporary table on the remote server but I thought there was something preventing a data pump being able to access it withing DTS?

  4. Dave Wells New Member

    Apologies for my brain not being turned on today. I can simply transfer the table from the local server to the remote server then read it from there. [:I]
  5. Dave Wells New Member

    I really must learn to think before typing.

    Is there a way to execute a sql script that is larger than 8000 characters? I can't use a local variable of type Text, Image or NText in order to store the script within and then run it with sp_executesql.
  6. satya Moderator

    Store the script in stored procedure and call it when its required.

    _________
    Satya SKJ
    Moderator
    SQL-Server-Performance.Com

Share This Page