Skip to content

Instantly share code, notes, and snippets.

@steegi
Created June 16, 2012 17:53
Show Gist options
  • Select an option

  • Save steegi/2942084 to your computer and use it in GitHub Desktop.

Select an option

Save steegi/2942084 to your computer and use it in GitHub Desktop.

Revisions

  1. steegi revised this gist Jul 11, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ db2 "connect to sugarult"
    db2 "quiesce database immediate force connections"
    db2 "unquiesce database"

    db2 force application all
    db2 "force application all"

    # Note the following will impact all databases and applications connected to this instance
    # Only perform these steps if the above is not a problem.
  2. steegi revised this gist Jul 11, 2012. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,8 @@ db2 "connect to sugarult"
    db2 "quiesce database immediate force connections"
    db2 "unquiesce database"

    db2 force application all

    # Note the following will impact all databases and applications connected to this instance
    # Only perform these steps if the above is not a problem.
    # These steps take care of 'The database is currently in use' issues after doing the above
  3. steegi revised this gist Jun 16, 2012. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,13 @@
    #!/bin/sh

    db2 connect to sugarult
    db2 "connect to sugarult"

    # Not sure if the following is actually need if the database needs to be restarted
    # because of the 'currently in use' issues. However it should disconnect all application
    # connected to the database.

    db2 quiesce database immediate force connections
    db2 unquiesce database
    db2 "quiesce database immediate force connections"
    db2 "unquiesce database"

    # Note the following will impact all databases and applications connected to this instance
    # Only perform these steps if the above is not a problem.
    @@ -17,4 +17,4 @@ db2stop force
    db2start

    # Finally drop the database
    db2 drop database sugarult
    db2 "drop database sugarult"
  4. steegi renamed this gist Jun 16, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. steegi created this gist Jun 16, 2012.
    20 changes: 20 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #!/bin/sh

    db2 connect to sugarult

    # Not sure if the following is actually need if the database needs to be restarted
    # because of the 'currently in use' issues. However it should disconnect all application
    # connected to the database.

    db2 quiesce database immediate force connections
    db2 unquiesce database

    # Note the following will impact all databases and applications connected to this instance
    # Only perform these steps if the above is not a problem.
    # These steps take care of 'The database is currently in use' issues after doing the above

    db2stop force
    db2start

    # Finally drop the database
    db2 drop database sugarult