Log Parser SQL Connection String - logparser

Im am currently attempting to use log parser to import some data from windows event logs. I've run the command through on my local machine and sql instance but when I attempt to run on the live server it errors.
The issue seems to be related to the server name as i get a connection string error. My machine is named FF-IT05, but the live server is Omega/Reports. I've tried wrapping the server string in {} and [] (and nothing at all) but it still erros.
Does anyone know the syntax for the above server string??

Related

SSIS package failing in SSMS

Thank you in advance for your help on this issue.
Here is the situation:
I have a SSIS package that essentially take data from a excel file ( using a Excel Connection) and upload it to a SQL table through a OLE DB Connection. This package runs completely fine in Visual Studio but I keep having this error once it is deployed on SSMS:
Failed to configure a connection property that has the following path: \Package.Connections[Excel Connection Manager].Properties[ConnectByProxy]. Element "ConnectByProxy" does not exist in collection "Properties".
; at Microsoft.SqlServer.IntegrationServices.Server.ISServerExec.ConnectionParametersManager.ConfigureProperty(String parameterName, Object parameterValue)
at Microsoft.SqlServer.IntegrationServices.Server.ISServerExec.ConnectionParametersManager.ConfigureProperties()
at Microsoft.SqlServer.IntegrationServices.Server.ISServerExec.ProjectOperator.ValidatePackageWithReference(Int64 validationId, Int64 infoId, Int64 projectId, String packageName, Int64 versionId, Nullable`1 referenceId, Project isserverProject, Boolean offlineMode)>
And I have the same error when it comes to the OLE DB ( SQL Server Native Client 11.0) connection.
Both Connections are at the project level and I deploy the hole project in SSMS. I also have the Microsoft.ACE.OLEDB.16.0 provider installed in SSMS.
To fix that error I have made some changes in the project configuration in SSMS like setting the ConnectByPoxy value to TRUE or adding my UserName but still failed. The package is pretty simple, has no parameters, no variables.
Also tried checking the 32 bit runtime..
Sometimes SSIS can throw strange errors when working with deployments to remote servers that you never encounter when executing the package locally. This implies there is likely something wrong with the compatibility of the server's version of SQL Server and your local copy (of SQL Server or Visual Studio). Perhaps verifying the deployed version of SQL Server your remote server uses and comparing it to your local copy would be worthwhile.
If they do match, next I would check the project's target SQL Server version by following the instructions at this site, and ensure it is correct. I would also confirm that the server has access to the directory in which the Excel files are being received, just to be safe.
This article specifically addresses the "ConnectByProxy" element issue you are encountering, and may prove helpful in resolving the issue or at least in giving more insight into possible issues.

Connection String to SQL Server 2012

Currently I have a connection to server 2000 in a VB6 script using this...
Provider=sqloledb;Server=servername;Database=mydatabase;User Id=myid;Password=mypassword;OLE DB Services=-2;
And everything works fine with this as it always has. This has been running good for years.
I am now trying to connect to Sql Server 2012 from the same VB6 script using this:
Provider=sqloledb;Server=servername;Database=mydatabase;User Id=myid;Password=mypassword;
Everything works good here and I am able to write to the database just fine except while some of the scripts are running I get errors intermittently while the script is writing to the database. This is the error:
dbnetlib.connectionopen (connect()).]Sql server does not exist or
access denied.
I have to hit ok and then it keeps running. Can I avoid this or fix my connection string?
I also tried to fix this using a new connection string of:
Provider=SQLNCLI11;Server=servername;Database=mydatabase;User Id=myid;Password=mypassword;
But this gives me an error of:
run time error 3706 provider can not be found it may not be properly
installed.
Can anyone please help me improve either one of the connection strings that I am trying to use above to connect to sql server 2012.

SQL Server Error 26 When Using TableAdapter.FIll

When I am in the Dataset Designer and I ask to Preview Data on a Fill query all is well and data is displayed. When I try to use the TableAdapter.Fill method inside a program I get an exception for Error 26. This code was copied down from Team Foundation Server and the Connection Strings were changed to reflect the new server. All works fine on the old server.
I wrote another short program on the new server, added the same SQL Server Datasource and all is well, I can fill a Table Adapter.
Visual Studio Professional 2013, Sql Server Express 2008 R2, Sql Authentication in both programs.
I should also add that the code works fine in the original environment. The TableAdapter in the Designer displays the data from the database without a problem. It's only when I use an instance of that TableAdapter in my code that the Fill method throws an exception. I also get the same Exception when I use the GetData Method.
Any ideas?
SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified
This error is related to Sql Server Connection string, check your connection string specified in web.config
1) Make sure your server name is correct, e.g., no typo on the name.
2) Make sure your instance name is correct and there is actually such an instance on your target machine. [Update: Some application converts \ to . If you are not sure about your application, please try both Server\Instance and Server\Instance in your connection string]
3) Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).
4) Make sure SQL Browser service is running on the server.
5) If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.

Unable to connect to SQL LocalDB

I have a native C++ app within which I am trying to connect to a localdb instance using ADO. Having manually started my instance I can run sqllocaldb info v11.0 and see the database instance is running.
My code is as follows.
ADO::_ConnectionPtr spConnection (__uuidof (ADO::Connection));
spConnection->Open (L"Provider=SQLNCLI11;Server=(localdb)\\v11.0;Integrated Security=true", L"", L"", 0);
The error code is DB_E_ERRORSOCCURRED (0x80040e21) and the error message is Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
I am able to successfully connect to the database using SQL Server Management Studio and I've tried it both with and without the provider in the connection string as well as specifying an initial catalog.
I found my issue. The security must be set to sspi as shown below.
ADO::_ConnectionPtr spConnection (__uuidof (ADO::Connection));
spConnection->Open (L"Provider=SQLNCLI11;Server=(localdb)\\v11.0;Integrated Security=SSPI", L"", L"", 0);
ADO connection object has an Error collection that holds the list oft error that has occured so far. You can take a look at these error to see what's wrong.
Usually two things can go wrong while connecting to SQL Server.
1.Login Failed.
2.SQL Server is not configured so that you can connect to it remotely.
Since you are trying to connect to a local server it can hardly be the second reason.
As you might now there are two different type of authentication when it comes to SQL Server:Windows and SQL Server.You can use one of therm if each of them is set in your SQL Server options or both of them if the mixed mode is selected.
According to your connection string you are using windows mode authentication therefor you should be logged in using a windows user that can login to SQL Server.If that's not the case with your SQL Server then you should provide a SQL user credentials in your connection string.
Anyway check the Error collection of connection object as see if there's anything else is wrong with your local db.

Can't access SQL Server file in the server machine

I setup the my WCF service on server machine.
The server OS is Windows 2008 with SQL Server 2008 Express.
I am trying to access to my SQL Server (mdf) file to read data using LINQ to SQL.
I see that the DataContext is OK - but when I try to get information that in one of the table I get an exception
Failed to generate a user instance of
SQL Server due to failure in
retrieving the user's local
application data path. Please make
sure the user has a local user profile
on the computer. The connection will
be closed.
I don't know what i need to define or change in the IIS 7.5 that I'm using in the server side.
Thanks for any help.
Update: the connection to the database file is fine - but getting information from table is thru an exception. The connection string is:
Data Source=.;AttachDbFilename=|DataDirectory|\ServiceData.mdf;
Integrated Security=SSPI;User Instance=True
If you already have a server, why don't you just attach the MDF to the SQL Server (Express) running, and then use it like a normal database on your server?
After you do this, use a connection string like:
server=Server\SQLExpress;Database=YourDatabaseName;Integrated Security=SSPI
I never quite liked the AttachDbFileName= and User Instance approach - seems like a (unreliable) hack to me, which really doesn't make sense if you're running on a server machine.
The reason that you are getting this error message is because your code is in the security context of a user that has never logged on to the server. The user therefore does not have a profile and you therefore get an error when the code attempts to write to a non-existant profile.
You could use marc_s's approach or you could run as a user that has a profile.

Resources