Professional Web Applications Themes

Setting up environment variables - Microsoft SQL / MS SQL Server

Hi, I need to setup some database environment variables apply to all the connections/users/etc. The variables i need to set are: SET DATEFORMAT 'dmy' SET LOCK_TIMEOUT 1000 How can I create a stored procedure that runs automatically everytime a user logs in? Thanks Ioannis Demetriades...

  1. #1

    Default Setting up environment variables

    Hi,

    I need to setup some database environment variables apply to all the
    connections/users/etc.
    The variables i need to set are:

    SET DATEFORMAT 'dmy'
    SET LOCK_TIMEOUT 1000


    How can I create a stored procedure that runs automatically everytime a user
    logs in?

    Thanks
    Ioannis Demetriades




    Ioannis Guest

  2. #2

    Default Re: Setting up environment variables

    The problem is that the SET statements when called from within a stored
    procedure are valid only within that procedure.

    "Tomislav Kralj" <tel.hr> wrote in message
    news:uSjOJ%phx.gbl... 
    stored 
    > user 
    >
    >[/ref]


    Ioannis Guest

  3. #3

    Default Re: Setting up environment variables

    If you have the freedom to change the application, you can prefix each of
    the command that you send to the database with these commands. For example:
    SET DATEFORMAT 'dmy' SET LOCK_TIMEOUT 1000 EXEC ...
    (or)
    SET DATEFORMAT 'dmy' SET LOCK_TIMEOUT 1000 SELECT ...
    --
    HTH,
    SriSamp
    Please reply to the whole group only!
    http://www32.brinkster.com/srisamp

    "Ioannis Demetriades" <co.uk> wrote in message
    news:%phx.gbl... 
    > stored [/ref][/ref]

    > >
    > >[/ref]
    >
    >[/ref]


    SriSamp Guest

  4. #4

    Default Re: Setting up environment variables

    Yes this will definitely address the issue....
    There has to be a better way though


    "SriSamp" <co.in> wrote in message
    news:phx.gbl... 
    example: 
    > > stored [/ref][/ref]
    other [/ref][/ref]
    everytime 
    > >
    > >[/ref]
    >
    >[/ref]


    Ioannis Guest

Similar Threads

  1. Setting Environment Variables
    By nicholas.nicholaides in forum Coldfusion Server Administration
    Replies: 6
    Last Post: May 18th, 07:29 PM
  2. setting up a new environment
    By zubair in forum Coldfusion Server Administration
    Replies: 3
    Last Post: March 30th, 05:50 PM
  3. setting environment variables in IIS
    By Pradeep Sethi in forum PERL Beginners
    Replies: 1
    Last Post: August 11th, 11:43 AM
  4. Setting up a Development Environment
    By Jack in forum ASP.NET Security
    Replies: 0
    Last Post: August 5th, 05:42 PM
  5. ask for help for setting up the asp.net dev environment
    By Tong Chen in forum ASP.NET General
    Replies: 2
    Last Post: July 18th, 08:29 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139