How to check service name of database in Oracle.

SQL> show parameter service_names;

How to change SERVICE NAME of database in Oracle.

First check service name of database in Oracle.

SQL> show parameter service_names;

By default the SERVICE_NAMES parameter is a concatenation of the DB_NAME and DB_DOMAIN parameters. if  host computer is not in domain the service name will be like this :
For example IP address of computer is 192.168.8.100 and database name is orcl then service name will be orcl.168.8.100.
However, you can change it to whatever you'd like For example:

ALTER SYSTEM SET SERVICE_NAMES='orcl_11g.host-name.xyz.com';

Using SERVICE_NAMES is a good way to isolate applications for tracing and metrics measurement.

Setting UP Gvim TO LOAD FONT AND COLOR SCHEME SETTINGS ON STARTUP IN Windows 7

If you want to change Default Setting of gVim in Windows 7. Check this one.




How to repair a Suspect Database in SQL Server?

Suspect Database:
 Suspect Database is nothing but Corrupted database .it shows suspect massage when you log in to MS-SQL server. 



SOLUTION :


  • Connect to your database server using Microsoft SQL Server Management Studio.
  • Execute the following SQL script  :
  
//sp_resetstatus turns off the "suspect" flag on a database

EXEC sp_resetstatus [DatabaseName]

/* Marking database READ_ONLY, disable logging,and limiting
access only to members of the sysadmin fixed server role */

ALTER DATABASE [DatabaseName] SET EMERGENCY
  
/* Checks the logical and physical integrity of all the objects in the specified database */

DBCC checkdb([DatabaseName])
  
/* This query will rollback any transaction which is running on
that database and bring SQL Server database in a "single user" mode */
 
ALTER DATABASE [DatabaseName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE

DBCC CheckDB ([DatabaseName], REPAIR_ALLOW_DATA_LOSS)

/* Set database accessibility to it's original state,
allowing all logins */

ALTER DATABASE [DatabaseName] SET MULTI_USER

Replace [DatabaseName] with your Database Name