“The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine” Error in importing process of xlsx to a sql server

Install the following to resolve your error. 2007 Office System Driver: Data Connectivity Components AccessDatabaseEngine.exe (25.3 MB) This download will install a set of components that facilitate the transfer of data between existing Microsoft Office files such as Microsoft Office Access 2007 (*.mdb and .accdb) files and Microsoft Office Excel 2007 (.xls, *.xlsx, and *.xlsb) … Read more

optional parameters in SQL Server stored proc?

You can declare like this CREATE PROCEDURE MyProcName @Parameter1 INT = 1, @Parameter2 VARCHAR (100) = ‘StringValue’, @Parameter3 VARCHAR (100) = NULL AS /* check for the NULL / default value (indicating nothing was passed */ if (@Parameter3 IS NULL) BEGIN /* whatever code you desire for a missing parameter*/ INSERT INTO …….. END /* … Read more

How to check SQL Server version

Following are possible ways to see the version: Method 1: Connect to the instance of SQL Server, and then run the following query: Select @@version An example of the output of this query is as follows: Microsoft SQL Server 2008 (SP1) – 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Express Edition … Read more

Cannot open backup device. Operating System error 5

Yeah I just scored this one. Look in Windows Services. Start > Administration > Services Find the Service in the list called: SQL Server (MSSQLSERVER) look for the “Log On As” column (need to add it if it doesn’t exist in the list). This is the account you need to give permissions to the directory, … Read more

Why is SQL Server 2008 Management Studio Intellisense not working?

I understand this post is old but if anybody is still searching and has not found a solution to the intellisense issue even after re-installing, applying the cumulative updates, or other methods, then I hope I may be of assistance. I have Applied SQL 2008 R2 Service Pack 1 which you can download here http://www.microsoft.com/download/en/details.aspx?id=26727 … Read more

A transport-level error has occurred when receiving results from the server [closed]

The database connection is closed by the database server. The connection remains valid in the connection pool of your app; as a result, when you pickup the shared connection string and try to execute it’s not able to reach the database. If you are developing Visual Studio, simply close the temporary web server on your … Read more

Enable ‘xp_cmdshell’ SQL Server

You need to enable it. Check out the Permission section of the xp_cmdshell MSDN docs: http://msdn.microsoft.com/en-us/library/ms190693.aspx: — To allow advanced options to be changed. EXEC sp_configure ‘show advanced options’, 1 GO — To update the currently configured value for advanced options. RECONFIGURE GO — To enable the feature. EXEC sp_configure ‘xp_cmdshell’, 1 GO — To … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)