Russ' Do It Yourself Home Workshop

Finding Fixes to Just About Anything and Everything

Archive for the ‘SQL Server’ Category

Getting SQL Express to Listen So You Can Connect Remotely

Posted by Russell Wright on April 22, 2014

Dang!  We had a situation where a new tool we were implementing in our back office, BillQuick Web Services 2014, would not use SQL Server since we purchased the "Pro" version and not the "Enterprise" version.  Unfortunately, it appears the trial version we installed has all the enterprise version capabilities and, after entering our license information, we were locked down to the pro version and it wouldn’t connect to the SQL Server anymore.

So, that meant I needed to install SQL Express to support the tool.  Okay, no biggie…except for the fact that SQL Express does not enabled Named Pipes or TCP/IP protocols, by default.  This took me a bit to figure out.

This is not a new problem, as posted by Peter van Ooijen in 2006.  Some things never change…

The easy way to fix this is to use SQL Server Configuration Manager.

image

Navigate to the Protocols section for your SQL Express instance and switch it on! 

image

And if that’s not enough, you need to change the TCP/IP properties to listen on the correct port.  I set the port to 1077 (one the SQL Server is NOT listening on).  It appears if you set it in the the IPAll section, the same port will be used for each IP address and you only have to enter it one time.

image

Oh, and then recycle your SQL server instance!

The connection string to use looks like this.

SQLServer\Instance,Port

image

 

Advertisements

Posted in Computer Software, SQL Server | Leave a Comment »

Argument "SMTP" for option "connection" is not valid. The command line parameters are invalid.

Posted by Russell Wright on November 18, 2013

When scheduling an SSIS package deployed to SQL Server the job failed.  The job history indicates my SMTP connection is invalid for some reason.  So, I checked the command line created by the job scheduler.

Argument “SMTP” for option “connection” is not valid.  The command line parameters are invalid.  The step failed.

What you will see is the /CONNECTION parameter for the SMTP connection manager is enclosed in “\ and \” characters.  Not sure why, but you can see this is also the case for the SQL Server connection manager, but it doesn’t suffer from the same problem.

Before:

/CONNECTION “SMTP Connection Manager”; “\”SmtpServer=smtp.mail.mycompany.com;UseWindowsAuthentication=False;EnableSsl=False;\””

image

After:

/CONNECTION “SMTP Connection Manager”; “SmtpServer=smtp.mail.mycompany.com;UseWindowsAuthentication=False;EnableSsl=False;”

image

Making this simple change seems to have corrected the issue.

Posted in SQL Server | Leave a Comment »

How to Get a CSV File Generated from a SQL Server Query (SQL 2008)

Posted by Russell Wright on August 21, 2012

In SSMS (SQL Server Management Studio) you are running a query and want to get a CSV file as the results.  This is accomplished by setting the Output format in the Query Options to Comma delimited.  You can also determine whether to include the column headers in the results.

image

By right-clicking on the query design surface you can choose to send the results to a file.

image

You should be prompted to specify a file to save to when the query is executed.

Posted in SQL Server | Leave a Comment »

Oracle OLE DB Error 0x80040E07 in SSIS

Posted by Russell Wright on August 17, 2012

If you find yourself dealing with running an OLE DB query against an Oracle database in SSIS and you get an error similar to this, make sure you are comparing dates using the Oracle TO_DATE function.

e.g.  DOC_DATE  >= TO_DATE( ’01-01-2012′, ‘MM-DD-YYYY’)

or

TO_DATE(TO_CHAR(SYSDATE – 7,’MM-DD-YYYY’),’MM-DD-YYYY’)

Code: 0xC0202009
   Source: Import Level tables Level1 Source [1261]
   Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E07.
An OLE DB record is available.  Source: "Microsoft OLE DB Provider for Oracle"  Hresult: 0x80040E07  Description: "ORA-01861: literal does not match format string".

 

Search strings:

ORA-01861: Literal does not match format string

Microsoft OLE DB Provider for Oracle 0x80040E07

Posted in SQL Server | Leave a Comment »