admin

  • user notice: The _custom_breadcrumbs_get_breadcrumb() function called token replacement with an array rather than a string for $text in /mnt/webc/60/17/52309417/htdocs/drupal/sites/all/modules/token/token.module on line 263.
  • user notice: The _custom_breadcrumbs_get_breadcrumb() function called token replacement with an array rather than a string for $text in /mnt/webc/60/17/52309417/htdocs/drupal/sites/all/modules/token/token.module on line 263.

localeadm

The localeadm utility queries and configures Solaris locales through a command line interface.

MySQL: Change Password

  • Replace {passwd} with the password of the user.
  • Replace {user} with the name of the user.

Change Password

GRANT USAGE ON * . * 
TO '{user}'@'%' 
IDENTIFIED BY '{passwd}' ;

Oracle: Resize Instance

In this example, the SGA will be resized to 6GB and the PGA to 2GB.

First, change the SPFile:

ALTER SYSTEM SET pga_aggregate_target = 2G SCOPE=SPFILE;
ALTER SYSTEM SET sga_target = 6G SCOPE=SPFILE;

Then, (optionally) export the SPFile to a PFile:

CREATE PFILE FROM SPFILE;

Finally, reboot the instance to activate the change:

SHUTDOWN IMMEDIATE;
STARTUP;

Tags:

Oracle: EXP

Export all Objects from an Account

Enter the account name insteand of {user}.

exp USERID=\'/ as sysdba\' FILE={user}.dmp FULL=N OWNER={user}

Oracle: List Accounts with Objects

To list all accounts (users) the objects (like tables), you can query them with:

SELECT DISTINCT OWNER FROM DBA_OBJECTS ORDER BY OWNER;

If you want to list all accounts, you can query them with:

SELECT USERNAME FROM ALL_USERS ORDER BY USERNAME;

Or, if you only want the DBAs:

SELECT USERNAME FROM DBA_USERS ORDER BY USERNAME;

MySQL: Remove User

  • Replace {db} with the name of the database.
  • Replace {user} with the name of the user.

Remove User

DROP USER '{user}'@'%';

Remove User and Database

Usually, {user} == {db}

DROP USER '{user}'@'%';
DROP DATABASE '{db}';

MySQL: Create User

  • Replace {db} with the name of the database.
  • Replace {passwd} with the password of the user.
  • Replace {user} with the name of the user.

Create User

CREATE USER '{user}'@'%' IDENTIFIED BY '{passwd}';

Create User and Database

Usually, {user} == {db}

CREATE USER '{user}'@'%' IDENTIFIED BY '{passwd}';
 
GRANT USAGE ON * . * 
TO '{user}'@'%' 
IDENTIFIED BY '{passwd}' 
WITH 
  MAX_QUERIES_PER_HOUR 0 

MySQL: Remove Database

  • Replace {db} with the name of the database.

Remove Database

DROP DATABASE IF EXISTS `{db}`;

MySQL: Create Database

  • Replace {db} with the name of the database.
  • Replace {user} with the name of the user.

Create Database

CREATE DATABASE IF NOT EXISTS `{db}`;

Create Database and Grant Rights to a User

CREATE DATABASE IF NOT EXISTS `{db}`;
GRANT ALL PRIVILEGES ON `{db}` . * TO '{user}'@'%';

Syndicate content