Disable the entry to a database for update

Hi,
I have database uses by business program.
When I want to upgrade the database, no one else can log in. But for upgrade the software use multithread.
For prepare upgrade, first I write message for users, who uses the database, for logout. But someone come back before i can start upgrade. Ex. not used it when i send mail.
So I thought for deny login for users to successfully upgrade. But deny only for this database! The other database must be accessible! And the database must be accessible for me, and for program I'm started from my local computer!
How can i solve this problem?
Gyula

But the program use same SQL login for user and for update too. Therefore, if I run the program for update, it use owner SQL login. If the user want to use the software, it use owner SQL login too.
The different only the IP_Address, or Host Name (System_User is the softwer used user).
You could mess with a login trigger, but I don't like that since the login trigger is on server level.
Rather I think that you should have different logins. The login for the application should have plain rights, like db_datareader/writer and EXECUTE on stored procedures. The login for the upgrade should be db_owner.
An alternative is to have a table that application looks at when the user logs in which says "Upgrade in progress, please try later". To kick out the users you would flip to SINGLE_USER WITH ROLLBACK IMMEDIATE, set this flag, and then switch back
to MULTI_USER.
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • How to use the mirrored and log shipped secondary database for update or insert operations

    Hi,
    I am doing a DR Test where I need to test the mirrored and log shipped secondary database but without stopping the mirroring or log shipping procedures. Is there a way to get the data out of mirrored and log shipped database to another database for update
    or insert operations?
    Database snapshot can be used only for mirrored database but updates cannot be done. Also the secondary database of log shipping cannot used for database snapshot. Any ideas of how this can be implemented?
    Thanks,
    Preetha

    Hmm in this case I think you need Merge Replication otherwise it breaks down the purpose of DR...again in that case.. 
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • HT4623 I have plugged in my ipad to my computer and Itunes is up on my computer but where do I find these things in Itunes, # In iTunes, select your device.  # In the Summary pane, click Check for Update, to update my ipad?

    I have plugged in my ipad to my computer and Itunes is up on my computer but where do I find these things in Itunes, # In iTunes, select your device.  # In the Summary pane, click Check for Update, to update my ipad?

    Tap to enlarge.

  • HT4623 hi..i just bought an iphone 5 yesterday 32GB..and now when i am trying to update the software..it says the following: unable to check for update/an error occurred while cheking for a software update...please help me..is it a problem in my new iphon

    hi..i just bought an iphone 5 yesterday 32GB..and now when i am trying to update the software..it says the following: unable to check for update/an error occurred while cheking for a software update...please help me..is it a problem in my new iphone??or it's just an temporary error in the apple software center???

    Lyndsay237 wrote:
    This device does not have a sim card in it. Could this be the reason or am I missing something when I am trying to update.
    Yes. You can't update or restore any GSM iPhone without a valid sim card installed in the phone. The sim card need not be activated, but it must be valid & present. If you want to update, you need to get a sim card.

  • My table of contents does not use the entry style I select for words in the paragraph that have character styles applied to them in the chapter, so some of the letters are showing up as green, which is fine in the chapter but not in the TOC.

    My table of contents does not use the entry style I select for words in the paragraph that have character styles applied to them in the chapter, so some of the letters, specifically parameters, are showing up green, which is fine in the chapter but not in the TOC. I can manually fix this in the TOC by changing the character style to none after the toc  has been generated, but I don't want to do this.

    What application are you running? Please ask this in the forum of the product you're using.

  • HT4623 When I go to Software Update, I keep getting the message, "Unable to Check for Update."

    When I try to access "Software Update", I keep getting the message, "Unable to Check for Update."  I am also unable to connect to the App Store.  Anyone have a solution, please?

    The Original iPad can only be updated to IOS 5.1.1

  • HT4623 What to do if the message "unable to check for update" appear? iPad is connected to the Internet.

    What to do if the message "unable to check for update" appear? iPad is connected to the Internet.

    Unable to update or restore
    http://support.apple.com/kb/ht1808

  • I can't connect to iTune Store nor to radios, with the aid of iTune,check for updates, these last two from aid, but if you communicate with support.Please the answers in spanish.

    I can't connect to iTune Store nor to radios, with the aid of iTune,check for updates, these last two from aid, but if you communicate with support.Please the answers in spanish.

    Back up all data.
    Unlock the Network preference pane, if necessary, by clicking the lock icon in the lower left corner and entering your password. Cllck Advanced, open the DNS tab, and change the server addresses to the following:
              8.8.8.8
              8.8.4.4
    That's Google DNS. Click OK, then Apply.
    In Safari, select
              Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data
    and confirm. If you’re using another browser, empty the cache. Test. Any difference?
    Notes:
    1. If you lose Internet access after making the above change to your network settings, delete the Google servers in the  Network preference pane, then select the TCP/IP tab and click Renew DHCP Lease. That should restore the original DNS settings; otherwise restore them yourself. Remember that you must click Apply in order for any changes to take effect.
    2. I don't use Google DNS myself, though I have tested it, and I'm not recommending it or any other DNS provider; the server addresses are offered merely for testing purposes. There may be privacy and technical issues involved in using that service, which you should investigate personally before you decide whether to keep the settings. Other public DNS services exist.

  • "Store Unavailable. The store is currently down for updates. We'll be back shortly." Error when trying to Buy Book.

    I've made a photo book project in the new Photos app and when I click Buy Book this is the error I receive, "Store Unavailable. The store is currently down for updates. We'll be back shortly." This has happened for the last 24 hours or so.

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Select "/var/log/install.log" from the file list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar. Then select the messages from the last installation or update attempt, starting from the time when you initiated it. If you're not sure when that was, start over and note the time. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.

  • Macbook pro wont shut down without holding the power button nor cycle for updates to restart.

    macbook pro wont shut down without holding the power button nor cycle for updates to restart

    Sorry I said sorta wrong. I can shut down and I can update to the point of restart but it just sat for 45 minutes after an update. It goes through the update and to restart then the bars chase each other in a circle and it never restarts. So I hit the power button and go through normal reboot but loosing the update in the process. It does not matter how long I wait for a natural reboot after an update or click to restart it will chase the little bar in circles all day literally and never reboot.

  • Is the iTune app store down for updates?

    Is the iTunes app store down for updating apps at the present moment? Can not get app's to update in new version of 10.4 (80) that came out today!

    Clicking update on each app individually works.
    This also just started with the latest iTunes update. Itunes version 10.40 (80)
    I hade the same problem on both iMac and MacBook Pro.

  • How to restrict the entries of a database table based on the user name

    Hi All,
    I have created a Database Table. Table maintenance generator is generated for the table.
    UNAME(user name) is one of the fields in the table. whenever the user creates a new entry, the field UNAME will be populated automatically with SY-UNAME value. I have used Table event '05' to do this.
    My requirement is...
    When a user tries to maintain the entries of the table using SM30, when 'DISPLAY' is chosen, all the records of the table should be displayed.
    When 'MAINTAIN' is chosen, only those records which have UNAME = SY-UNAME(User Logged in) should be in EDIT mode. and rest all the records should be in DISPLAY mode(greyed out). It should allow to edit only those records which are created by the user logged in.
    Could you please tell me how to do this..? Thanks in advance.
    Thanks & Regards,
    Paddu.

    HI,
    In table main. gen there are number of events , try to select one event like 05 for the Sy-uname.
    For the  requirement:
    In that event write the code like
    this is basic idea not the code:
    Case ' Sy-ucomm'.
    when 'display'.  " button
       Nomally for the display button it will show all the records, but we need to write a code like this.
    select all records frm the table.
    ( Need to write the code in case if the user first maintained the data then again press the display , list has to be refreshed.)
    when ' Maintain'. " button.
    Fetch the records that are with SY-UNAME and find out the edit function and implement it on each and every record.
    endcase.
    Thanks and Regards,
    Bharani.

  • Disabling the default search when searching for master Agreements

    Hello Experts
    I am relatively new to SAP e sourcing ,we are working on 5.1 system.
    We have a query , Contract management->Agreements->Search master agreements and Sub agreements.
    This query takes a lot of time for execution.
    When user selects this option , it runs this query and then displays a screen with all the filters and search results at the bottom.
    I want to ensure that this query is not run by default, so that when user selects this option , the page only displays the selection criteria , users can specify the filter values and hit on search.
    Can anyone please help me on how can we disable the default execution of query everytime "Search master agreements and Sub agreements " is selected from the dropdown.
    is there any option within the query itself or do we need any script for doing this.
    Regards
    Vikas

    Hello Vikas,
    This should be the general approach.
    1) Write a new query that has the functionality you desire. In your case you can duplicate the existing query and make one of the filters mandatory. This will ensure that the query does not get executed by default. Save this new query in the system.
    2) Identify the corresponding query group. In your case it is FCI-ContractBuyList.
    3) In this query group, find the entry for 'Search Master Agreements and Agreements' query and check 'Remove Query from Selection List'.
    4)Add your new query in this query group and check the 'Include in SRM Navigation' checkbox. Click Save.
    Let us know if this works.
    Thanks
    Devesh

  • How to alter the materialized view defintion with -- For update clause

    My db version is 9.2.0.3
    My orginal materialized view difination does not have "for update " clause.
    how can i alter the mview defination to inclused and exclude the "for update" clause.
    I dont want to drop and recreate the mview with for update clause. But I what to change the existing definition.
    Please suggest.
    Thanks
    Naveen.

    I already have the view definition in place. I want to change the exising defination, by adding the "for update " clause. Is it possible with any " alter mview ... " syntax.
    Below is my existing syntax. I don't what to drop and recreate. Just want to alter the existing definition , with for update clause.
    create materialized view test
    pctfree 0
    tablespace DATA storage (pctincrease 0)
    build immediate refresh start with sysdate next (trunc(sysdate+1) +1/24)
    with primary key
    disable query rewrite
    as select * from test@isource;
    Please suggest!
    Thanks
    Naveen
    Edited by: user12096071 on Apr 8, 2010 2:56 PM

  • How to Disable the Adobe Flash Player and Reader Updates

    Ok, For the last two months or so, I have been plagued by the Adobe Flash Player and Reader updater that will not go away. That's not the worst thing though: Somehow, someway, the Adobe updater subverts my entire windows 7 machine and makes itself the most important program on my system, stopping all other necessary functions. After I just turn it on, the updater will suspend all Windows operations in favor of the updater getting its message out the Adobe "needs" updating. I have tried updating the stupid thing, only to find that after the update goes in, my whole computer locks up and I have to load a system restore point. This thing acts like a virus, and until someone comes up with a way to make it work properly, that's what I'm calling: Adobe creates and sells a computer killing virus. I want a sure fire way to disable the updater that will work, and that will never bug me again about updating the virus. After going through three different computer repair companies, many online forums and chat rooms and my own knowledge of how to disable programs, I have instructed my firewall to block all attempts by Adobe to update. This has to stop.

    Flash Player:
    Adobe Reader:

Maybe you are looking for

  • Can I use a wireless drive to store videos as I record them?

    My wife is thinking of buying an ipad Air with 128gb storage. However she needs to interview some people and record the interviews on video. I'm not sure whether 128gb is enough and wondered whether it was possible to have the video file automaticall

  • Difference between Free goods and BOM (ERLA)

    Hi, Could any body throw some light on the Difference between Free goods and BOM(ERLA) to clarify my weired thought. AS of what i know is Free goods is 1:1 ratio. The main item will be prices and sub item will be free . Than same thing is also With B

  • Calling WebServices using Flex Builder

    Hello, I want to use a WebService in the Flex Builder. I first defined the WebService: <mx:WebService id="test" wsdl="http://ld9030.wdf.sap.corp:50050/sap/bc/srt/rfc/sap/ZTP_TEST4?wsdl" result="log(event)" showBusyCursor="true"> I have 2 importing pa

  • Open Link in new window on Flash Chart

    Is there a way to make the link in a flash chart open in a new window? Thanks! John Apex 3.1 Anychart 3.3 Oracle 10g.

  • Tab problem in println

    Hello, I have probs in use th tab: for example in this below the first print, print out a larger tab than the others      public static void main(String[] args) {           String n = "hello" + "\t" + "culo";           Vector<String> name = new Vecto