Monday, December 13, 2010

SQL Server Fix : Error : 40 – could not open a connection to SQL server.

An error has occurred while establishing a connection to the server when connecting to SQL server 2005, this failure may be caused by the fact that under default settings SQL server does not allow remote connection.
(provider: Named Pipes Provider, error: 40 – could not open a connection to SQL server. )

Fix/Workaround/Solution:

Step 1) Make sure SQL SERVER is up in services and the instance you try to connect is running.
Step 2) Your system Firewall should not block SQL Server port.
Step 3) Go to administrative tools >> Computer Management >> Services and Applications >> SQL Server 2005 Network Configuration >> Enable TCP/IP protocol. Make sure that SQL SERVER port is by Default 1433.

Step4)Now follow this KB Article of MSDN depending on your server :http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

Tuesday, December 7, 2010

Oracle : Show all Tables available in Oracle Database

The Below Query can get you all the tables available in Oracle DB.
select owner, table_name from all_tables;
(OR)

select table_name from all_all_tables;

Sunday, December 5, 2010

SQL Server 2005 Mixed Authentication Enabling

At the time of MS SQL Server 2005 installation, if you forgot/not set mixed mode for the authentication. You can set it after completion of installation.
Goto MS SQL Server Management Studio ->Connect Database -> Right click on Server Name choose Properties -> In the Server Properties screen ->Under Security Tab on left side -> select Radio Button SQL Server and Windows Authentication(Mixed Mode) -> Just Say OK. Like the below Screenshot. This allows to go for any of two authentications. 1)Windows Authentication. 2)SQL Server Authentication.