Databases :: Database Running Status Using Ping?

Feb 12, 2011

I want to test the Oracle and SQL servers running are Up or Down. Currently, I am using the following way to check the connection.. for example Oracle connection as ..

Dim cn As OracleConnection
cn = New OracleConnection(ConnStr)
cn.Open()

This is working fine. But, is there any other way to check the DB up status like Ping.

View 1 Replies


Similar Messages:

Web Forms :: Ping All The Network Machines And Get Status?

May 7, 2010

i have a forms application which pings all the network machines. this works fine and also returns the status of each machine i.e. sucess, timeout etc. however i also want to get the name of the remote machines so i use this code:

[Code]....

the above code works fine however any exception is given when the remote machine is a mac. the exception is:

[Code]....

how can i counter the exception so that it simply ignores the exception and carries on the for loop for the other machines.

View 3 Replies

Databases :: Losing Connection When Running Long Running Oracle Procedure?

Jul 1, 2010

I am executing a long-running Oracle stored procedure from .NET. The procedure takes about three hours to run. Ideally, the user should be able to kick off the procedure, close the browser, and come back later to check the results.

The problem is that the connection to the Oracle procedure is lost after exactly an hour. As you would expect, the Oracle procedre runs to completion if it is executed from SQL Plus. Strangely enough, it will also run to completion if I run in debug mode on my local machine (I start two threads, one of which executes the procedure. I set a breakpoint on the second thread).

Here is my connection string:

data source= (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=serverx)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=TestSID)))

Some relevant sections from web.config:

<sessionState mode="InProc" cookieless="false" timeout="3000" stateNetworkTimeout="72000"/>
<httpRuntime executionTimeout="18000" maxRequestLength="2097151" />

Any thoughts as to why the connection is being lost in exactly an hour, and what I can do to maintain the connection until the procedure finishes?

View 1 Replies

How To Show Status To User For Long Running Process

Jan 28, 2010

Note:- i don't want to use updateprogress etc. control of ajax

on button click, long task(e.g thread) runs in my webpage for about 4-5 minutes.I want to show status to user either by a processing image through javascript(image must be shown in a certain part of page other part of page will remain intact) or an exact status of process if possible. i have tried a lot but all in vein.

View 5 Replies

Databases :: Case Sensitive Sorting When Running A Query?

Mar 4, 2010

When doing a query e.g. "select ID from myTable order By SomeStringField" from SQL Developer my data the data are sorted correctly according to database settings:

Abc
abc
Bcd
bcd

But when using the System.Data.OracleClient namespace and a DbProviderFactory to create a DbCommand and use that to create a DbDataReader, the data is sorted case sensitive:

Abc
Bcd
abc
bcd

Is there some setting on the command which needs to be set? Can you even change the case sensitivity in the .net framwork, overriding the database settings?

View 3 Replies

Databases :: Uploading Excel Sheet When My Application Running On Local Host

Feb 8, 2011

there is broblum for uploading excel sheet when my application runing on local host but there is no problum on vs enviroment . i am using the following connection string code

strConn =
"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + path +
";Extended Properties=Excel 8.0;"
;

View 3 Replies

WCF / ASMX :: Error While Trying To Ping The Webservice?

Feb 21, 2011

<error>There was a problem retrieving the data. Please Press F5 or hit the browser refresh button to reattempt1.System.Web.Services.Protocols.SoapException:
Server was unable to process request. ---> MS.IT.OperationsServices.ROQ.Out.Utils.CustomException: An Internal Error has Occured. Please Contact ROQOut Support with Context Id Context Id: 82faeaff-7269-4d51-805e-b854491a68a9
at ReleaseService.GetMyReleaseStatus(String impersonatedUserAlias, DateTime startDate, DateTime endDate)
--- End of inner exception stack trace

----Source--System.Web.Services--Trace-- at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at ROQOutWebService.ReleaseService.GetMyReleaseStatus(String impersonatedUserAlias, DateTime startDate, DateTime endDate)
at MyReleaseDashboard.GetMyReleaseStatus(Int32 days)</error>

View 5 Replies

C# - Ping A URL Every 15 Minutes And Get A Response Back From The Server?

Nov 19, 2010

is there a way in c# to be able to ping a url every 15 minutes and get a response back from the server?

i want to try to see if .net can be used to build a simple tool to have asp.net websites invoke a re-build so that the first user doesn't incur the load penalty when the application is started.

View 7 Replies

WCF / ASMX :: Can't Read Ping Response From Webservice

Nov 19, 2010

[Code]....

IN:

<soap:Envelope>
<soap:Body>
<testPing>
<apiKey>XDYYBE6Y336S3F</apiKey>
</testPing>
</soap:Body>
</soap:Envelope>

OUT:

<soap:Envelope>
<soap:Body>
<testPingResponse>
<pong>
<message>It works!</message>
</pong>
</testPingResponse>
</soap:Body>
</soap:Envelope>

View 3 Replies

C# - Ping To Stored Procedure To Know Execution Completed In .net?

Jul 27, 2010

I have to execute a stored procedure. When I execute that, I have to keep on check (ping) whether that execution is completed or not. The I will update a label.

Do we have any way in c# to do that?

View 2 Replies

Web Forms :: Ping An Ip Address Entered In A Textbox?

Sep 1, 2010

i want to ping an ip address that the user (of my web site) enters in a text box.i have placed a link button , next to that textbox ,on whose click event i want to start the ping command...does ne1 has ne idea how this can be done??

View 3 Replies

VS 2010 - Booking Status Database - Updating Multiple Columns

Jul 13, 2012

I want to save multiple seats to status(booked) inside my database. In the table there are t1,t2,t3,etc... But i can only update one of the column. I am using label to store into string of array.

Code:

Dim forBook() As String = lblSelected.Text.Split(",")
Dim i As Integer
For i = 0 To forBook.Length - 1
cmd2.Connection = mycn
mycn.Open()
cmd2.CommandText = _

[Code] ....

View 1 Replies

Databases :: Getting Error While running Application /Could Not Find Any Resources Appropriate For The Specified Culture Or The Neutral Culture

Sep 17, 2010

I am getting below error while running my application

Exception in MS Oracle DAAB Method - GetDataSet : Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DABResource.resources" was correctly embedded or linked into assembly "DBServices" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Exception in MS Oracle DAAB Method - GetDataSet : Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DABResource.resources" was correctly embedded or linked into assembly "DBServices" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Source Error: [Code]....

I am Having DBServices .dll which is registered in my assembley

Recently i installed VS 2008 in my system.this application is working fine in VS 2005 priviously.Now i am getting above error while running this application in VS2005

View 4 Replies

Databases :: Update MySQL-database / Database Doesn't Get Updated

Mar 26, 2010

protected void Button3_Click(object sender, EventArgs e)
{
//Create a connection to the database
MySqlConnection conn = new MySqlConnection("Database=kid07025;Data Source=195.178.228.254;User Id=kid07025;Password=********");
//open the connection
conn.Open();
//MySQL Query which updates the row where Anvandarnamn = Anvandarnamn (recieved from a cookie)
MySqlCommand cmd = new MySqlCommand("UPDATE personer SET Information=?Information,Fnamn=?Fnamn,Enamn=?Enamn,Personnr=?Personnr,Adress=?Adress,Postnr=?Postnr,Ort=?Ort WHERE Anvandarnamn=?Anvandarnamn", conn);
// Update with new text
cmd.Parameters.AddWithValue("?Anvandarnamn", Request.Cookies["Anvandarnamn"].Value);
cmd.Parameters.AddWithValue("?Information", TextBox1.Text);
cmd.Parameters.AddWithValue("?Fnamn", TextBox2.Text);
cmd.Parameters.AddWithValue("?Enamn", TextBox3.Text);
cmd.Parameters.AddWithValue("?Personnr",TextBox4.Text);
cmd.Parameters.AddWithValue("?Adress", TextBox5.Text);
cmd.Parameters.AddWithValue("?Postnr", TextBox6.Text);
cmd.Parameters.AddWithValue("?Ort", TextBox7.Text);
cmd.ExecuteReader();
conn.Close();
RefreshProfile();
}

I don't know what I am doing wrong here, but the database doesn't get updated when I press the button.

I use VS 2010, ASP.NET

View 3 Replies

Databases :: SQL Server Database Dependency In Oracle Database?

Feb 27, 2010

I'm working with Oracle database and I want to improve performance of my website.I read about caching. So is it possible to implement caching (SQL Server Database Dependency) with oracle?

View 2 Replies

Setting Response / Status Generates "HTTP Status String Is Not Valid" Exception?

Jan 9, 2011

I'm writing an HTTP handler in ASP.NET 4.0 and IIS7 and I need to generate a file-not-found condition.

I copied the following code from Mathew McDonald's new book, Pro ASP.Net 4 in C# 2010. (The response variable is an instance of the current HttpResponse.)

response.Status = "File not found";
response.StatusCode = 404;

However, I found that the first line generates the run-time error HTTP status string is not valid.

If, instead of the lines above, I use the following:

response.Status = "404 Not found";

Then everything seems to work fine. In fact, I even see that response.StatusCode is set to 404 automatically.

My problem is that I don't want this to fail on the production server. So I'd feel much better if I could understand the "correct" way to accomplish this. Why did the first approach work for Mathew McDonald but not for me? And is the second approach always going to be reliable?

View 1 Replies

Database Connection Sporadically Running Very Slow?

May 25, 2010

My web app connects to my database server which is on my lan. It is usually very quick but once in a while the connection is extremely slow and has even causing errors by timing out. The server only has 1 gb of memory so I'm going to upgrade to at least 4 gb.

View 3 Replies

SQL Server :: How To Connect An Application Running In Local IIS To Database

Sep 28, 2010

how to connect an asp.net application running in local IIS to a database residing in a remote web server ?

View 2 Replies

How To Start A New Thread To Query A Database While Web Application Continues Running

Feb 11, 2011

I want to start a new thread to query a database while my web application continues running. I was under the impression that by using threads I can run the querying process independently while the normal web application page cycle carries on, but I could be wrong.

public class DbAsyncQuery
{
Dictionary<string, object> serviceResults = new Dictionary<string, object>();
public void UpdateBillingDB()
{
QueryAllServices();
foreach (KeyValuePair<string, object> p in serviceResults)
{
IEnumerable results = (IEnumerable)p.Value;
IEnumerable<object> sessions = results.Cast<object>();
DbUtil.MakeBillingDBEntry(sessions, p.Key);
}
}
public static string[] servicesToQuery = new string[] // Must go in config file ultimately
{
"xxx.x.xxx.xx"
};
public delegate void Worker();
private Thread worker;
public void InitializeThread(Worker wrk)
{
worker = new Thread(new ThreadStart(wrk));
worker.Start();
}
public void InitializeQuery()
{
Worker worker = QueryAllServices;
InitializeThread(worker);
}
private void QueryAllServices()
{
Dictionary<string, DateTime> lastEntries = DbUtil.GetLastEntries();
foreach (string ip in servicesToQuery)
{
string fullServicePath =
"http://" + ip + ":800/MyWebService.asmx";
//object[] lastEntry = new object[] { lastEntries[ip] };
object[] lastEntry = new object[] { new DateTime(2011, 1, 1, 0, 0, 0) };
object obj = WebServiceHandler.CallWebService
(fullServicePath, "MyWebService", "GetBillingDBEntries", lastEntry);
serviceResults.Add(ip, obj);
}
}
}

It seems to basically stall and wait to finish the query before loading the page (which can be thousands of rows, so it takes awhile). I put this in the following section of Global.asax:

protected void Application_Start(object sender, EventArgs e)
{
DbAsyncQuery query = new DbAsyncQuery();
query.UpdateBillingDB();
}

This is one of my first web pages, and I'm new to threading. I understand there is a difference between creating your own thread and using the ThreadPool. In this method, I am using my own thread, I think. Not sure if that's the best way. The querying process can be completely independent, and its only going to occur on scheduled intervals (every 8 hours or so). The user doesn't need to have up to the minute data, so it can take awhile. I just don't want the site to wait for it to finish, if that's possible.

View 1 Replies

Web Forms :: Cannot Connect To Visual FoxPro Database Running In Internet

May 10, 2012

I use VS2008, ASP.net. I made a server side ASP.net page. This page connect to Visual Foxpro database.

It is running fine in development environment.

However, when run through brower with [URL]

The form displayed, when connect to database, it can't connect to the database.

View 1 Replies

Databases :: How To Connect DB2 Database

Dec 6, 2010

i want to connect Db2 database with my .net application.how to fetch data from my DB2 database through my Asp.net application then how to genrate crystal report through this data.

View 2 Replies

Databases :: Use MVC 2 With MySQL Database?

Jun 15, 2010

I want to use MVC 2 with MySQL database. Is it possible?because my shared hosting limits the size of SQL Server database, but there is no limit on Size of MySQL database.MySQL seems to take less disk space than SQL Server database which is costly on the Internet.

View 1 Replies

Update User Status In Database When Ever User Logoff?

Aug 23, 2010

actually i came across this senario for new project where userstatus must change to log off when ever he do fallowing activity.I have maintain user status when he log in to web based system.Activities are if

1.user click log off

2.or user click browser close button or close brwoser tab.

3.or Fource fully shut down his Pc,I am able to get first 2 but not the last one.I googled it but not get any satified ans for that.I m looking for guidens for this.

View 6 Replies

Forms Data Controls :: Image Uploading To Database - Get Error On Running

Jun 23, 2010

I am uploading images to database....but only error that I am getting at this point when I run it is for.....

DataSource.InsertParameters.Add("MIMEType", MIMEType)

The error for the above line is Object not set to an instance of an Object look over the code an see if you can see what is wrong.

Protected Sub Button_Insert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_Insert.Click
'Make Sure a file has been successfully Uploaded
If FileUpload_Image1.PostedFile Is Nothing OrElse String.IsNullOrEmpty(FileUpload_Image1.PostedFile.FileName) OrElse FileUpload_Image1.PostedFile.InputStream Is Nothing Then
Label_ErrorMessage.Text = "Error"
Else
Label_ErrorMessage.Text = "No Error"
'Exit Sub
End If
'Make sure we are dealing with a JPG or GIF file
Dim extension As String = Path.GetExtension(FileUpload_Image1.PostedFile.FileName).ToLower()
Dim MIMEType As String = Nothing
Select Case extension
Case ".gif"
MIMEType = "Image/gif"
Case ".jpeg", ".jpe"
MIMEType = "Image/jpeg"
Case ".png"
MIMEType = "Image/png"
Case Else
Label_ErrorMessage.Text = "Invalid Type"
'Exit Sub
End Select
Dim DataSource As New SqlDataSource()
DataSource.ConnectionString = ConfigurationManager.ConnectionStrings("ConnectionString").ToString
DataSource.InsertCommandType = SqlDataSourceCommandType.Text
DataSource.InsertCommand = "Insert Into ClassifiedImages (Title, DateUploaded, MIMEType, ClassifiedId) Values (@Title, @DateUploaded, @MIMEType, @ClassifiedId)"
DataSource.InsertParameters.Add("Title", "Images For Classified Ad" & " " & Request.QueryString("ClassifiedId"))
DataSource.InsertParameters.Add("DateUploaded", DateTime.Now)
DataSource.InsertParameters.Add("MIMEType", MIMEType)
DataSource.InsertParameters.Add("ClassifiedId", Request.QueryString("ClassifiedId"))
Dim ImageBytes(FileUpload_Image1.PostedFile.InputStream.Length) As Byte
FileUpload_Image1.PostedFile.InputStream.Read(ImageBytes, 0, ImageBytes.Length)
DataSource.InsertParameters.Add("ImageData", ImageBytes.ToString)
Dim RowsAffected As Integer = 0
Try
RowsAffected = DataSource.Insert()
Catch ex As Exception
Response.Redirect("AddImagesProblem.aspx")
End Try
If RowsAffected <> 1 Then
Response.Redirect("AddImagesProblem.aspx")
Else
Response.Redirect("AddImagesSuccess.aspx")
End If
End Sub

View 4 Replies

Databases :: Connection To MySQL Database

May 15, 2010

I did all the instructions which are in the following link: [URL] in order to do a connection between MySQL database and ASP.NET but I did not successed. Sometimes, it told me that I have a mistake in the <asp: button> and sometimes it told me that I did a mistake in calling (addImage) method. And this is my whole code:-

&#65279;<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HW5._Default" %>
<script>
public class DataAccess
{
private string _strConn =
@"Driver= {MySQLODBC 3.51 Driver};SERVER=localhost;DATABASE=test1;";
private OdbcConnection _objConn;
public DataAccess()
{
this._objConn = new OdbcConnection(this._strConn);
}
// This function adds the Images to database
public string addImage(timestamp id, byte [] data,string extension)
{
string strSql = "SELECT * FROM File";
DataSet ds = new DataSet("Image");
OdbcDataAdapter tempAP = new OdbcDataAdapter(strSql,this._objConn);
OdbcCommandBuilder objCommand = new OdbcCommandBuilder(tempAP);
tempAP.Fill(ds,"Table");
try
{
this._objConn.Open();
DataRow objNewRow = ds.Tables["Table"].NewRow();
objNewRow["Extension"] = extension;
objNewRow["Data"] = buffer;
objNewRow["ID"] = id;
ds.Tables["Table"].Rows.Add(objNewRow);
// trying to update the table to add the image
tempAP.Update(ds,"Table");
}.....................................

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved