Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Wednesday, February 02, 2011

Visual Studio 2008 MVC SQL Error

I have been trying to follow some MVC tutorials online and got to the step about ading the sql database.
Visual Studio popped up to tell me to install SQL 2005 Express, well I have SQL 2008 Express installed. Indeed the error link redirects to 2008.

I finally found out its because I installed SQL server as the default rather than the expected SQLEXPRESS instance.

To fix this I went into tools->options selected Database tools, data connections and removed the instance name from SQL Server instance name.

If you have no idea what the instance is called you can use the SQL server installation centre, choose tools then Installed SQL Server features discovery report. This will list all the instances of SQL and features installed on your computer.

Tuesday, November 09, 2010

Cannot log into SQL Server following SSL certificate installation

I managed to lock myself out of sql server on one of our servers. I got the following error on login with the following error "A connection was successfully established with the server, but then an error occurred during the pre-login handshake"

After a lot of googling I finally found that the issue was that I had installed a self signed certificate using the Windows 2003 resource kit. Due to the fact SQL server uses ssl certificates to secure the login my certificate had broken my ability to log in.

Following the steps listed in this Microsoft Knowledge base article fixed the problem. Essentially stop sql server, removed the certificates regenerate (ensuring to use the identifier as listed in IIS manger on the S parameter of selfssl e.g. C:\Program Files\IIS Resources\SelfSSL>selfssl.exe /N:CN=YOURSEVER /K:1024 /V:7
/S:1899305700 /P:443) then restart sqlserver.

Monday, October 05, 2009

Adaptive Predictive Dialler

For anyone who has spent time trying to get their stored procedure working with an Adaptive Predictive dialler and seen the error "IDispatch error #3105 80040e21 ODBC driver does not support the requested protocol", check the execute permissions on the stored procedure. By default database users on SQL 2005 do not have execute permissions.


Execute permissions are added either using GRANT or via the management console, drill into the database, expand programability, then expand stored procedures, right click your procedure select properties. Choose permissions, add type the name of hte database user then check the grant column for permission execute.