Wednesday, November 21, 2012

0 Database Default Port/log file location

 

Default Port number

  • MSSQL: 1433
  • Oracle: 1521
  • DB2: 50001
  • Sybase: 5000

How to find the current port number

MSSQL

The listen port can be found in the error log and sql server configuration manage

image

image

You can also get it by running the below query

select local_tcp_port from sys.dm_exec_connections where local_tcp_port is not null

image

Oracle

The port number is defined in the local listener.

lsnrctl status

image

DB2
db2 get dbm cfg |grep SVCE
grep db2c_db2inst1 /etc/services

image

Sybase

I don’t have Sybase ASE install in my lab yet. As far as I know, you can check the SQL.ini/Interface.ini to find the current Port number. The ini file is locate in the $SYBASE\ini directory.

How to find the error log

MSSQL
SELECT SERVERPROPERTY(‘ErrorLogFileName’);

image

We can also find it in the SQL Server configuration manager or register key

image

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MSSQLSERVER"
image
Oracle
select value from v$parameter where name = 'background_dump_dest';

image

DB2
db2 get dbm cfg | grep DIAGPATH

image

Sybase

$SYBASE/$SYBASE_ASE/install/servername.log

Reference:

0 comments:

Post a Comment

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates