Monitor Data Per Session - Available?
Jul 20, 2005
Hiya!
I've combed the SQL Server 2000 online help but I don't see anything
akin to Sybase ASE's 'montor' views - equivalent to Oracle's V$
views. The views are performance views which contain per session
information such as:
- SPID
- number of logical read/write and physical read I/Os accumulated
thus far
- CPU accumulated
- Memory
etc.
Does anyone know if I can snarf that data from SQL Server 2000?
Thx!
--
Pablo Sanchez, Blueoak Database Engineering
http://www.blueoakdb.com
View 3 Replies
ADVERTISEMENT
Aug 19, 2015
If I'm on a remote machine, meaning a computer not in the WSFC cluster, and I open SSMS 2014, point it to a SQL Instance, and open activity monitor:
1. I get all the panes and charts except % Processor Time.
2. Then, if I authenticate to the cluster's domain by mapping a drive with valid domain credentials, I'm free to put performance counters in the Perfmon - - - but SQL Activity Monitor shuts down with“The Activity Monitor is unable to execute queries against server SQL-V01INSTANCE1..Activity monitor for this instance will be placed into a paused state.Use the context menu in the overview pane to resume the activity monitor.
Additional information: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))(Mscorlib)”
3. Of course, the Activity monitor can't be resumed via the context menu. Removing counters and closing the perfmon do not work. I dropped the mapped drive and rebooted the machine. That brought back 95% of the information in the Activity monitor.
4. Further experimentation showed that any mapping of drive shares present on the SQL Server to the computer running SSMS cut off functionality of the 'overview' pane in the remote machine's SQL Activity monitor -- the monitor that had been trying to watch the server offering the shares.
View 4 Replies
View Related
Jan 13, 2006
I'm new on ASP.NET 2.0Can anyone tell me how to get data from SQL to Session properties?
In Classic ASP, it looks very simple as below.dim connset conn = server.createobject("adodb.recordset")rssql = "select myid, mypw from mydb where myid = '"& request("myid") &"' and mypw = '"& request("mypw") &"'"set rs = conn.execute(rssql)if rs.eof = true thensession("myid") = rs("myid")session("mypw") = rs("mypw")end if
How to do the same things on ASP.NET?Many thanks!
View 6 Replies
View Related
Oct 8, 2005
I'm trying to write data from a session into database but it won't work.
Could someone help me what is wrong with this.
cobjDT = Session("cart")
For each cobjDR in cobjDT.rows
Dim cmdInsert2 as New SQLCommand("order_details", loConn)
cmdInsert2.CommandType = CommandType.StoredProcedure
cmdInsert2.Parameters.Add(New SqlParameter("@Orders", SqlDbType.int, 4,
"OrderID"))
cmdInsert2.Parameters("@Orders").Value = Request("OrderIDtext")
cmdInsert2.Parameters.Add(New SqlParameter("@PID", SqlDbType.int, 4,
"PID"))
cmdInsert2.Parameters("@PID").Value = Request(cobjDR("PID"))
cmdInsert2.Parameters.Add(New SqlParameter("@PakID", SqlDbType.int, 4,
"PakID"))
cmdInsert2.Parameters("@PakID").Value = Request(cobjDR("PAKID"))
cmdInsert2.Parameters.Add(New SqlParameter("@StyckPris",
SqlDbType.decimal, 9, "StyckPris"))
cmdInsert2.Parameters("@StyckPris").Value = Request(cobjDR("StyckPris"))
cmdInsert2.Parameters.Add(New SqlParameter("@Mangd", SqlDbType.int, 4,
"Mangd"))
cmdInsert2.Parameters("@Mangd").Value = Request(cobjDR("Quantity"))
loConn.Open()
cmdInsert2.ExecuteNonQuery()
loConn.Close()
next
When I execute this an error message comes
Server Error in '/examen' Application.
Input string was not in a correct format.
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.FormatException: Input string was not in a correct format.
Source Error:
Line 78: cmdInsert2.Parameters("@Mangd").Value = Request(cobjDR("Quantity"))Line 79: loConn.Open()Line 80: cmdInsert2.ExecuteNonQuery()Line 81: loConn.Close()Line 82: next
Source File: D:lofa.mine.nuexamenmembersTMP3thkwo1d0w.aspx Line: 80
Stack Trace:
[FormatException: Input string was not in a correct format.] System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +194 ASP.TMP3thkwo1d0w_aspx.Page_Load(Object Sender, EventArgs E) in D:lofa.mine.nuexamenmembersTMP3thkwo1d0w.aspx:80 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +731
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
I use same character types in storedProcedure what they are in the
database and when I call the SP on my page the char types are same as
they are in the SP
I don't see what the problem is. Please Help
View 1 Replies
View Related
Jan 12, 2007
I'm having trouble using session data in my select parameters. If I manually plug a value into the selectcommand or create a hard coded value using a parameter it works, but if I try to use the session data the query pulls no results. I know the session data is set because I print the value at the top of the page, but for some reason it's not getting passed to the sessionparameter???
This is the datasource code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:flautoconnstr %>"
SelectCommand="SELECT * FROM [tblVehicles] WHERE ([profileid] = @profileid)">
<SelectParameters>
<asp:SessionParameter Name="profileid" SessionField="profileid" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
This is the line I use to set the session data.
Session["profileid"] = myQuote.Profileid;
View 1 Replies
View Related
Oct 19, 2000
Hi:
I like to know how I may store some user-specific data at the beginning of a session and retrieve the same data later during the session in a SQL command. For those of you familiar with ORACLE, I am trying to mimic the SET_CLIENT_INFO and GET_CLIENT_INFO functions of ORACLE's DBMS_APPLICATION_INFO package on SQL Server.
Any suggestions?
thanks,
Peter
View 1 Replies
View Related
Dec 25, 2006
I downloaded a copy of sql server and when I run the following query in the sql management studio after choosing new query , DMX I get the above error
CREATE MINING MODEL [NBSample]
(
CustomerKey LONG KEY,
Gender TEXT DISCRETE,
[Number Cars Owned] LONG DISCRETE,
[Bike Buyer] LONG DISCRETE PREDICT
)
Using Microsoft_Naive_Bayes
Also in the pane Mining Model I get the message No mining models found. The only error I get when I installed SQL server was a COM plus registration error. I am running Windows XP SP2. Can someone please help.
Vijay Mukhi
HOD Helios
View 1 Replies
View Related
Apr 6, 2001
we need to report on what changes were made to one particular column of a table. We need to report the old value, the new value and the date and userid (these are also fields in the table).
I assume we use an update trigger with a query to capture the old and new values in a temp table?
Does anyone have any sample syntax for such a situation?
View 2 Replies
View Related
Aug 3, 2006
The 2.0 version of ASPSTATE is slightly different than the 1.1 version in that one table has one additional column and another table uses a different data type and size for the key. The 2.0 version also has a couple additional stored procedures.
We'd like to manage just one session state database if possible so we're trying to figure out if Microsoft supports using the new schema for 1.1 session state access (it seems to work, but our testing has been very light).
Is there any official support line on this? If not, can anyone comment on whether or not you'd expect it to work and why?
Thanks.
View 1 Replies
View Related
Jan 4, 2005
We have a database on the live server which powers a website. Then our client has a copy of the database at their office. Their is Merge replication set up between the two running every half a hour.
Now they want to be able to look at the merge replication history.
With my little knowledge, I believe that the place to get this data from is the distribution database on the publishing machine which is the live server. Now for obvious reasons we cannot replicate the
distrubution database to their side so we need to come up with some way of giving them the data. They also want a history of replication.
So the way I was thinking of fixing it was to have a job that copies some of the last days data from the distrubution database onto the main database and add that table to the replication so they got it every day. Also writing a ASP page so they can look at the last days
data straight from the distrubution database.
Here are my questions:
Question 1:
How long does the replication store history for?
Question 2:
Is thier any simpler way of allowing them to see the replication history?
Question 3:
Are their any other things I should be worried about?
Thanks for any feedback, Nixies
View 1 Replies
View Related
Sep 19, 2007
Hi everyone,
Once our company encoutered database disk full issue, so we cannot insert any more data. So is there way I can monitor the data file size? or is there a monitor tool to sending out alert?
for example,
It can show me how many percentage of data file has been used e.g. 90%. so I know it's critical and I need to increase more space for database or disk drive.
thank you in advance
View 1 Replies
View Related
Dec 14, 2006
Hi,
Not sure if this question makes sense, but is it necessary to purge old data in msdb tables used by the db mirroring monitor job?
I'm just wondering if an insert into the data table every minute of the day would still be needed a month from now. I'm thinking this data would be useful for the purpose of "alerts" and to have access to its recent history, but other than that, is it recommended (or necessary)? Would these records keep accumulating until manually purged?
TIA.
View 7 Replies
View Related
Nov 10, 2015
I have created a session in extended events and want to frequently monitor the events that i have filtered .The problem i am facing is i am not able to clear the previous data as we do it in SQL trace. i am able to see all the data that is occupied till now.whenever i start the test i want the current data only to be displayed.The work around is either delete the session and create a new one every-time which i do not want to do .I am able to see the CLEAR DATA FROM TABLE button but it is in Disabled state all the time.
View 2 Replies
View Related
Dec 1, 2006
I have a SqlDataSource that has a parameter that I am trying
to set.
The item is stored in a session field called “GameObject?
Game Object is a simple class that has a several variables.
I am trying to access the .name data member of the class.
<asp:SessionParameter Name="GameCode" SessionField="((GamingSystem)Session[‘GameObject’]).Name" />
This does not work. Is there a way to declarative bind to
the item that I am for.
View 3 Replies
View Related
Sep 26, 2015
I am currently working on SQL Server 2014 and I want to know how can i monitor my Windows Event Log from SQL Server?
View 3 Replies
View Related
Jan 30, 2007
I have setup transactional replication everything on one box. later(two or three weeks later), Replication monitor is show red X Under my publishers (publications is disconnected). this is SQL2005.
Everyone known how to fix this problem?
Thanks,
Frank
View 1 Replies
View Related
Mar 31, 2015
I set up the collector, and specify the Run As as my AD account in the Collector Set - Properties - General screen. My AD account is the local admin of the remote server.
However, the collector does not seem to work. Although the collecting set is shown as running, the The blg file stays at 64K. If I open it, there is nothing inside (no counter at the bottom). What did I miss?
View 1 Replies
View Related
Sep 20, 2001
Hi all,
I need some solution..
When i execute a program it first deletes all datas from a
'X' table .Then fetches data from various other tables and
inserts into this 'X' table.I finally generate a report from
this 'X' table.
Now the problem is,
USER 1 : Executes the program - Datas in 'X' table got deleted and
filled up with new data.Report is getting processed.....
USER 2 : Executes the same program - Datas in the same 'X' table
getting deleted ..
So the report process of USER 1 got affected.
Solution 1 : Using IP address of local machine i solved the problem.But
i need a concrete solution for this ..something related to sessions..
CAN ANYONE HELP ??
Thanx and Regards
Prabhu
View 2 Replies
View Related
Feb 1, 2006
Does Session term exist in SQL Server?If yes, when it creates, how can monitor it. And where does itsinformation store?Thanks alot
View 1 Replies
View Related
Jun 5, 2008
How do you return the ID of an item to a Session in a ASP forum?
I have a MS-SQL Server 2005 database.
My table looks like this QuoteID, QuoteNumber, Date.
In SQL:
INSERT INTO table (QuoteNumber, Date) values ('123490WC1", '06/2/2008')DECLARE @ItemID INTSET @ItemID=IDENT_CURRENT('table')
What I would like to do is return @ItemID to the ASP forum; I assume Session would be the best.
After I get the @ItemID I have a Grid which I will to insert the Quote Items into.
Thanks,
marly
View 1 Replies
View Related
Jun 16, 2008
Hi, Can somebody tell me what's wrong with this statement or why the Session parameter is not working.
<asp:SqlDataSource ID="datalist_SQL" runat="server"
ConnectionString="<%$ ConnectionStrings:DatabaseConnectionString2 %>"
SelectCommand="SELECT * FROM tbl_subProduct, tbl_material, tbl_product, tbl_subCategory, tbl_topCategory, tbl_topLevelProduct WHERE [tbl_subProduct].[numProductID] = [tbl_product].[numProductID] AND [tbl_product].[numTopLevelProductID] = [tbl_topLevelProduct].[numTopLevelProductID] AND [tbl_topLevelProduct].[numSubCategoryID] = [tbl_subCategory].[numSubCategoryID] AND [tbl_subCategory].[numTopCategoryID] = [tbl_topCategory].[numTopCategoryID] AND [tbl_material].[numMaterialID] = [tbl_product].[numMaterialID] AND @fldArray ">
<SelectParameters>
<asp:SessionParameter Name="fldArray" SessionField="ids_array" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource> Many Thanks
View 10 Replies
View Related
Oct 29, 2004
Hi...
I'm developing a web app with VS 2005 Beta and I do not know how to include a seasson variable value into my code.
This is my code:
Function GetData() As System.Data.SqlClient.SqlDataReader
Dim sqlconn As System.Data.SqlClient.SqlConnection
Dim SqlCommand1 As System.Data.SqlClient.SqlCommand
Dim sqlRdr As System.Data.SqlClient.SqlDataReader
sqlconn = New SqlConnection("SERVER=SRVR;UID=USR;Password=PWD;DATABASE=MyDatabase")
sqlconn.Open()
SqlCommand1 = New SqlCommand("MyStrProc", sqlconn)
SqlCommand1.CommandTimeout = 1800
sqlRdr = SqlCommand1.ExecuteReader(CommandBehavior.CloseConnection)
Return sqlRdr
End Function
MyStrProc is:
CREATE PROCEDURE MyStrProc
@MyVar int
AS
IF @MyVar IS NOT NULL
BEGIN
.................
......t12.acct_nbr IN (@MyVar)
.....
END
GO
The variable @MyVar get its value from user log info in login page, and create a session variable.
My Question:
How and where to call seasson variable @MyVar, because now I'm getting this error:
Procedure 'MyStrProc' expects parameter '@MyVar', which was not supplied.
Any help will be great.
Tks
View 4 Replies
View Related
Sep 1, 2006
How to find user session id in mssql
View 1 Replies
View Related
Sep 16, 2004
Hi:
I want to open a new session/connection inside the execution of a stored procedure. Is this possible ?
I ask this because I need a new sesssion with its own transaction.
Thanks,
Rui Ferreira
View 6 Replies
View Related
Jun 22, 2007
Can we use session variable in reporting services.. say go to report -> properties and create a VB function that get ans set session variable.. If yes, how. If not, any workaround?
View 2 Replies
View Related
May 9, 2006
Is there any way in stored procedure to find out a name of terminal session initiated connection to SQL Server?
Thanks for response
View 10 Replies
View Related
Oct 17, 2007
Hi guys,
I would like to manage the following:
BEGIN TRANSACTION;
SELECT * From SomeTable;
INSERT INTO SomeTable (SomeData) VALUES(12);
COMMIT TRANSACTION;
This should be easy usually. However, we need to have each row/command executed individually (using the SqlDataSource object in ASP.NET).
Is there a way how to make the transactions work over multiple executions?
Thanks,
Martin
View 4 Replies
View Related
Jul 11, 2006
Hi
I have designed reports using SQL Server Business Intelligence Development Studio tool (Sql Server reporting service). I have uploaded these reports to report manager.
I am displaying list of reports in tree view control, in my application. I am viewing report in Report Viewer control as per the report selection in tree view control, in same page. I am getting
Server Error in '/Application_name' Application or
ASP.NET session has expired error frequently while switching between various reports. Kindly provide me solution
.
Regards
Sagayaraj Rayappan
View 11 Replies
View Related
Jul 26, 2006
Ok, I am trying to teach myself asp.net and sql server. The problem I am having now is I want to update the session that already exists. I have a global session (I think) that is UserEmployeeID, it is inputed when a user selects the select link on the search page which will redirect to an info page. I want to change the employee to a different employee, well I am updating the database well, no that is a lie it doesn’t that is another error, but anyway I try to update it to the new EmployeeID and it will not update…
Partial Class Assignment
Inherits System.Web.UI.Page
Protected Sub UpdateButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles UpdateButton.Click
Dim empID As Integer
Dim nbrID As Integer
Dim equid As Integer
Dim UpdateQuery
Dim empequipid As SqlCommand
Dim mySQLConnection As String = System.Configuration.ConfigurationManager.ConnectionStrings("DBConnectionString").ToString
Dim myConnection As New SqlConnection(mySQLConnection)
myConnection.Open()
empID = CType(Session("UserEmployeeID"), Integer)
equid = CType(Session("UserEquipID"), Integer)
If CType(empID, Integer) = Nothing Then
empID = (DropDownList1.SelectedValue)
Response.Write("Insert: " & empID)
'Response.End()
Me.SqlDataSource1.InsertCommand = "INSERT INTO [EMPLOYEES_EQUIP] ([EquipID], [EmployeeID]) VALUES " & equid & " " & empID & ""
Me.SqlDataSource1.InsertCommand = SqlDataSourceCommandType.Text
Me.SqlDataSource1.Insert()
Else
empequipid = New SqlCommand("Select EmpEquipID From EMPLOYEES_EQUIP Where EmployeeID = " & empID & " AND EquipID = " & equid & " ", myConnection)
empequipid.CommandType = CommandType.Text
nbrID = empequipid.ExecuteScalar
' Response.Write("Select EmpEquipID: " & nbrID)
empID = (DropDownList1.SelectedValue)
'Response.Write("<br>Update EmployeeID: " & empID)
Me.SqlDataSource1.UpdateCommand = "UPDATE EMPLOYEES_EQUIP SET EmployeeID = " & empID & " WHERE EmpEquipID = " & nbrID & " "
Me.SqlDataSource1.UpdateCommand = SqlDataSourceCommandType.Text
Me.SqlDataSource1.Update()
UpdateQuery = "UPDATE EMPLOYEES_EQUIP SET EmployeeID = " & empID & " WHERE EmpEquipID = " & nbrID & " "
'Response.Write(UpdateQuery)
'Response.End()
End If
Session("UserEployeeID") = (DropDownList1.SelectedValue)
'Response.Write("<br>UserEmployeeID Session: " & Session("UserEmployeeID"))
'-- Turn On Results Table
resultstable.Visible = True
'-- Hide Form by hiding table.
maintable.Visible = False
'clientSearch.Visible = False
End Sub
End Class
I am also getting an error at Me.SqlDataSource1.Update() saying incorrect syntax near ‘0’ but there isn’t a 0??? I am confused…
View 1 Replies
View Related
May 13, 2007
Hi,
I try to set a Session variable with the result of a SQL Selec statement. I tried the following, but it is not working.
Session("thisone") = SqlDataSource1.SelectCommand = "SELECT myfield FROM [mytable] WHERE ([username] = @username)"
@username is a value from a textbox. What I am doing wrong?
Thanks for your help, Chris
View 2 Replies
View Related
Oct 4, 2004
I have some C# code that iterates through the session state, serializes each object and stores the binary representation in an SQL table with an 'image' column. The problem is: it doesn't work. SQL server doesn't throw an error (at least ADO.NET doesnt propagate it); the table is just left unchanged. The SP works (I tested it with a few simple values); the MemoryStream and byte array are being populated correctly and bound to the parameter correctly.
What am I doing wrong? Anyone have a better approach? I know there is a builtin way of storing state in an SQL server, but I only need to do this once--namely, when a user is redirected from non-secure to secure pages--so I don't want to take that performance hit,
string uid = _session.SessionID;
object toSerialize;
BinaryFormatter formatter = new BinaryFormatter();
MemoryStream stream;
SqlConnection dbConn = SupportClasses.SqlUtilities.DBConn();
SqlCommand cmd;
SqlTransaction storeSession = null;
SqlParameter uidParam, keyParam, objParam;
try
{
dbConn.Open();
storeSession = dbConn.BeginTransaction();
foreach (string key in _session.Keys)
{
toSerialize = _session[ key ];
stream = new MemoryStream();
formatter.Serialize(stream, toSerialize);
cmd = new SqlCommand("store_session_object", dbConn, storeSession);
cmd.CommandType = CommandType.StoredProcedure;
uidParam = new SqlParameter("@uid", SqlDbType.VarChar);
uidParam.Value = uid;
cmd.Parameters.Add(uidParam);
keyParam = new SqlParameter("@object_key", SqlDbType.VarChar);
keyParam.Value = key;
cmd.Parameters.Add(keyParam);
objParam = new SqlParameter("@data", SqlDbType.Image);
objParam.Value = stream.ToArray();
cmd.Parameters.Add(objParam);
cmd.ExecuteNonQuery();
}
}
catch (SqlException ex)
{
SupportClasses.ErrorHandler.HandleSQLError(ex);
storeSession.Rollback();
}
catch (System.Runtime.Serialization.SerializationException exs)
{
// do something
}
finally
{
dbConn.Close();
}
For those interested, here is the code for the SP:
CREATE PROCEDURE store_session_object
@uid varchar(50),
@object_key varchar(25),
@data image
AS
INSERT INTO session_hold (uid, object_key, object)
VALUES (@uid, @object_key, @data)
[Cross-posted because issue spans several topics.]
View 2 Replies
View Related
Jan 18, 2002
when i start mail session
there is a message poping up as
"Error 17952:Faild to Start SQl Mail Session"
When i test From Sql Mail Configuration
i get a message "succesfully Started(and stopped)a MAPI session with this profile"
& still i cannot start the sql mail service"
i still get a error
what could case for this error
View 1 Replies
View Related
Jun 18, 2001
Hi all,
We got this message on our production server event viewer for source MSDTC.
"String message: Session idle timeout over,tearing down the session"..
Even though it is marked as informational, just wanted to know what it is?..
thanks guys,
Marx
View 1 Replies
View Related