Packet capture data into SQL - c#

I was looking around for some tools that help injecting packet capture into a database. I was lucky bu finding one tool from COMMAND FIVE PTY LTD. the tool is called C5 SIGMA, and based on description, it makes possible to get data from capture and put it in a database.
I downloaded files and prepared the environment for run, but when executing, I get a lot of errors
[WARNING] - Unable to convert field value.
Name: frame.time_relative
Value: 6.874690000
Error: Input string was not in a correct format.
[ERROR] - Error processing packet.
Index: 5179
Error: Too many asynchronous failures.
I downlaoded source files, and debug, but i found code normal, and parsing is fine. Here is source files: http://www.commandfive.com/downloads/c5sigma.html
If any one could help, I appreciate.
Thank you

I've just downloaded the same product and I get the Error: Too many asynchronous failures error as well.
I've dropped them an email so if/when I get a response I will let you know.
Just dumped the output to a text file, before all the asynchronous failures is this error:
[ERROR] - Asynchronous write failure. Error: A network-related or instance-specific
error occurred while establishing a connection to SQL Server. The server w
as not found or was not accessible. Verify that the instance name is corre
ct and that SQL Server is configured to allow remote connections. (provide
r: Named Pipes Provider, error: 40 - Could not open a connection to SQL Se
rver)
Might be worth checking to see if your SQL server is expected connections as expected. I'm currently using SQL Express so will try it on a fully fledged SQL server.

Actually, had the same issue. I found by reducing the pcap sizes, C5 Sigma didn't error.

Related

Why do I get a SQL Server error when I did not include one

I'm currently following this tutorial for ASP.Net Core: https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/razor-pages-start?view=aspnetcore-3.1&tabs=visual-studio
I'm having an issue: when I get to the 2nd part of the tutorial where I add a model there's a step where I enter the following commands:
Add-Migration InitialCreate
Update-Database
Whenever I enter Update-Database I get the following error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 56 - Unable to load the SQLUserInstance.dll from the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.)
In the tutorial it never asks you to download or connect to a SQL Server so why do I get this error?
Error is saying that you cannot connect to sql server. Unfortunately, instructions are in Part 4 in tutorial. I suggest you to follow it.
https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/sql?view=aspnetcore-3.1&tabs=visual-studio
You have to obviously connect to the SQL server. if you don't this. how you expect will work Add-Migration InitialCreateand Update-Database.I assume that you did this connection. Now follow the steps below.
Actually, this Error basically gets when the SQL Service is stopped.
Step 1 : Type "window" button + R ,This will open Run prompt.
Step 2: Type "services.msc" in Run prompt and hit the enter.
or go to this window you have to search the Services like this-
Step 3: Then Search for SQLSERVER(MSSQLSERVER) and Restart the service.if not restart then start the service.
Follow this step,hope it's resolve your issue.

Add retry to LINQ2SQL queries

I have a C# application that needs to connect to a SQL Server DB hosted by Amazon's RDS. Fairly often it throws the error
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
When it does this, it usually works on the next try. So I would like to add a programmatic "retry" to the queries in my app. I think that this (https://stackoverflow.com/a/4822976/1011724) looks like a good pattern to follow for this. However, that answer only retries for the following errors:
private enum RetryableSqlErrors
{
Timeout = -2,
NoLock = 1204,
Deadlock = 1205,
WordbreakerTimeout = 30053,
}
So is there a way to simply add this error? If so, what is the error code? Looking here (https://msdn.microsoft.com/en-us/library/cc645611.aspx), there is no error 40 and it also is not the exact wording of error -1.
Is my error a SqlException? If so what number? If not, how can I adapted the code from the answer linked above to account for this type of exception?

IIS 8.5 Web.config for named SQL Server instance on alternate port

I recently upgraded to Windows Server 2012 from 2003. It was a big IIS jump from 6 to 8.5. I cannot seem to get a named SQL Server instance on an alternate port to work in my ASP.net 4.0 website.
The connection string I am using is:
<add name="MyConn"
connectionString="Server=192.168.12.5\stage,7839;Database=mydb;uid=myun;pwd=mypw;" />
When the website tries to load in the browser, I get the following error:
[HttpException (0x80004005): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)]
We've checked firewall settings to no avail. Is the syntax correct in the above example? I've done numerous searches and found examples of people using
192.168.12.5:7839\stage
or
192.168.12.5\stage;port=7839;
but both of those give syntax errors.
I need some confirmation on the correct syntax for the web.config file. Any help is greatly appreciated, thanks!
Can you go to SQL Server > Configuration Tools > Configuration Manager and see if that instance is really named what you think it is?
You should see something like this:
The entries SQL Server (instacename) on the right hand side show you what instances you have - they should be in state running, and the instance name is in the brackets. If it's MSSQLSERVER, then it's an unnamed default instance - otherwise it's the instance name. Is your instance name correct, as expected - and running?

Dealing with SQL Server query exceeded (number of columns/Allowable size) issue

I'm constructing a query that joined a lot of tables. When I execute the query by select all columns, SQL Server throws an error
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available
When I replace the * with a few columns, it works fine. So I assume the problem is due to the result has exceeded the allowable size per row.
Now I'm wondering will it be ok to construct such a stored procedure and implement it in my WPF application?
Seems like you are having a timeout problem.
Have you seen this post?
In the link i added someone is claiming that the solution was to increase the "connect timeout" (Probably the select statement is taking too long).
If this does not solve your problem then you can try diagnosing it by:
1) Assume you were making remote connection, ping ,
telnet , or net view \ or see
firewall setting on the remote server to check whether the network is
still good to make sure remote server is still reachable, and contact
your network administrator to fix those problems.
2) You can give a retry by running your client app see whether the
problem went away.
3) If 1) and 2) passed, you might open sql profile to nail down which
client operation to cause sql server terminate connection, and check
server errorlog or application event log find out any clue.
If you were making local connection, it is probably reason 3).
Note: this is copied from the attached link.
Regarding whether you shold use a Stored Procedure check this post.

error 26 cannot connect to database

I took an old software made by someone else, which need to connect to a database with the .mdf extension.
But when I run the software, I have an error 26. I have obviously checked Google and it seems the the main problem is the firewall. But if I disable it the problem doesn't dissapear.
Here is the code for connect the database :
DataClasses1DataContext db = new DataClasses1DataContext(Environment.CurrentDirectory + "\\bddgestionvin.mdf");
I've noticed, when I try to connect the database with the datacontext class it fail too with the same error 26. (see attached screenshot below)
The string connection used by this class is :
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\bddgestionvin.mdf;Integrated Security=True;Connect `Timeout=30;User Instance=True`
I know I'm a little vague but I never did that kind of stuff (connect to a .mdf database) And the code is not mine, feel free the ask further explanation / code. Any help is welcome !
P.S The error message is
SqlException was unhandled A network-related or instance-specific
error occurred while establishing a connection to SQL Server. The
server was not found or was not accessible. Verify that the instance
name is correct and that SQL Server is configured to allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)
(Sorry for the french software)
Hi I don't know you may see these steps. Make sure that these steps should pass.
The reason that we get this error message is the client stack could
not receive SSRP response UDP packet from SQL Browser. It's easy to
isolate the issue. Here are the steps:
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.
You can read more from here
You can also try PortQry and validate your firewall does not block SQL Browser UDP packet
A network-related or instance-specific error occurred while establishing a connection to SQL Server. Failed to establish a connection with SQL Server.
The server was not found or was not accessible.
May be server is stopped, you don't have permission to access the server, or the instance name is not correct .
Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
Please goto SSMS and try connecting the server. Verify the SQL Server is running and your account is configured to access the service.
(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Thanks

Categories

Resources