Creating a trigger

  • Hi Guyes,

    I want to create a trigger on the database level, when a particular database is selected by a user, a trigger will fire on that particular event.

    Is there any event in Sql Server 2000, to trap the database change ?

    Please suggest regarding this ?

    Regards,

    AMIT GUPTA

     

     

  • You will need to accomplish this within whatever GUI you are having them use....it is not a database function.

  • Hi,

    thanks for what so ever help but i am not using any GUI. I want to do it from backend.

    Is there any idea???

    Regards,

    AMIT GUPTA

     

  • What do you mean by "the backend?" What tool is the user using to select the database? There pretty much has to be some sort of GUI, even it's only Enterprise Manager or Query Analyzer. And, what exactly do you mean by "a particular database is selected?"

    I think we need a little more information before we can provide you a real solution.

  • Hi,

    I want to a solution,

    when a user enter his login & password in the Query Analyser or Enterprise Manager to enter the Sql Sever,i want that  particular user  can't access the master & tempdb database.

    I have alloted a particular database to such user in which he has only select permission on database tables.

    I want to disable such databases ?

    Regards,

    AMIT GUPTA

     

     

     

  • Sorry to be the carrier of the bad news but ALL users in SQL Server can (Must) access master and tempdb by design. You will find that there is a guest account on both that using conventional methods you can't remove. You still could go under the covers and change that but It will leave the Server in an unsupported status! and you can get a lot of "unexpected" errors if you alter the system tables

    Cheers,

     


    * Noel

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply