|
To capture what are the Stored procedures are being hit in Production environment the profiler would be used. Whether it would be slowdown the environment? Whether it will affect the performance? If so, what are the alternative to trace the SP hits without affecting the performance?
|
|
|
|
|
Member 3137078 wrote: Whether it would be slowdown the environment?
AFAIK, it will not affect performance. Profiler is a tool just to track the transactions happening at defined server and not modify any call.
|
|
|
|
|
I agree with Sandeep, while it may impact your SSMS app it is only listening to traffic on the server and showing you the content, somewhat like a network sniffer!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I get SqlTransaction.Zombie exception in production(In .NET Windows application not ASP.NET application). I got answer in below article how and when the exception is thrown. In production one server application available which perform DB operation and there could be more than one client applications to interact with server.
http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/08/24/zombie-check-on-transaction-error-this-sqltransaction-has-completed-it-is-no-longer-usable.aspx
In the article, it is given that connection is explicitly closed. My question is in real world application what are the possibilities to close the connection (in few cases only it occurs in production)? I would like to hear the possible scenarios to reproduce it.
One of the servers is getting stopped due to the Exception. Please do help.
Is there possibility for SPs to close the connection unexpectedly? If so, please do describe. Thanks in advance.
|
|
|
|
|
Hi,
If you had an option to choose a database for a website portal.. which one you'll use form the following:
Cassandra
or
MySQL
Technology News @ www.JassimRahma.com
|
|
|
|
|
Neither - I'd use SQL server because that is the database I am most familiar with. If you have no skills in either then look at the support resources for the database. The opinion of a random bunch of geeks is not a good basis for making a decision.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Never heard of Cassandra.
|
|
|
|
|
I imported a table called sales to my Oracle database from Access. When I look in the Oracle Application Express object browser, I see the table and I can open it and see the design and the data. However, when I enter the query - select * from sales - I get the error message ORA-00942: table or view does not exist. What am I doing wrong?
|
|
|
|
|
Try granting permissions to the table following the import.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Thanks. That worked.
|
|
|
|
|
The table might have been imported to a different schema, try prefixing the table name with the schema name in the query. Or as Chris Meech suggested, check for permissions.
|
|
|
|
|
Thanks for the help. Chris' solution worked.
|
|
|
|
|
I would like to thank everyone in advance for their answers as I am extremely stuck. Also apologies if I put this question on wrong as it is my first attempt at this.
I am currently developing a C# application for a project at work, which uses a SQL 2008 server as a back end database. I know it’s an older way but I have been using windows forms and ADO.Net and have managed through this site and various books to get quit far but now have hit a problem that I cannot find answered on here. Some tables are going to be very large and hence I want to implement paging and have done this through a stored procedure. The application works out what page it requires and passes the start row index and number of rows to return to the procedure. This works perfectly (though I have read various posts to do with performance, and different ways of achieving paging in SQL).
My problem has arisen now that I won’t to introduce searching into the mix. Most posts/articles are geared towards ASP.net application which a user specifies the search criteria and the results for that search are returned in a page form. But I want to copy the functionality of a system we currently run at work called Syspro. Syspro will return you to the page relevant to the data you have just edited, added, or searched for. For example it opens the form with a data grid view on page one, I add new data which will be 100 pages in, after adding the data and closing the add form it finds the page that result is on and shoots the data grid view page to that page and high lights the new row. This works in the same way when you search and edit as you can skip through data on the add/mod form as well.
Is there a way of replicating this behavior in SQL or is this something that is handled in the C# application. I need a way of determining what page the data I require is on, but I understand that SQL only assigns row numbers after a query is run against that table. I have thought of using the primary key to save me the trouble, but some tables will allow deletes.
|
|
|
|
|
Lance Parker wrote: Is there a way of replicating this behavior in SQL o
Your question about what "behavior" you want to replicate is confusing but yes you can implement paging in SQL.
Basic steps.
1. Create your SQL with appropriate search parameters. You should still use parametrized values.
...a. If you have just a couple of items you can hard code the SQL.
...b. With more than a couple items create the SQL dynamically.
2. Apply appropriate ordering to the SQL. This can include creating it dynamically.
3. Apply paging (dynamic SQL again) See the following link
SQL Server 2005 Paging Results[^]
At the business level you might also want to consider what happens to paging if the data being paged changes underneath. Very common answers are
1. It won't, so there is no problem.
2. It won't in relation to the user because the work flow and usage insures that.
Be VERY sure that you analyze this at the business level before deciding that this could be a problem.
Also you should require sufficient search constraints to insure that no single result has lot of pages. Three pages is ok, 100 isn't. If someone claims otherwise then note that users do not randomly seek data. They know what they are looking for. So make them tell you it. Paging is a convenience so they don't have to tell you everything in detail but ignoring it can inhibit rather than help workflow.
|
|
|
|
|
Thank you jschell.
But I must apologise as after returning to work today and looking at the programme in which I am trying to copy some functionality from, I have realised I haven’t explained what I am after properly, and fear I have caused some confusion. But as for what you have told me in the above it validates most of the code I have written, thank you for that.
With that I’ll try again to explain myself, I caused confusion by saying there was a search involved "Apologies". In a nut shell what I am after is basically "Selecting and displaying a page based on a records location". Now I know that until a query is run against the table there is no theoretical position of a record. But what the programme does is open the pageForm on page one of the data in that table. Although there is a ID column on the table (as I have poked around in the programme files) the page is organised by the first column which is stock-Code. Hence you can page through all the results from a stock code beginning with "A" right through to "Z" which I think is around probably 1000 pages at the minute, not that we go through them all. Then a user opens a new form to edit or add a new record, when the form is closed and the data returned to the database the pageform will display the page relevant to the stock code added, and you can page backwards and forwards from this page. The same applies to the search, which is conducted in a separate searchForm, which displays the possible results for that criteria, which the user selects one, and returns to the pageForm which now displays the page with that record on.
Do you jschell or any one have any idea of how this is accomplished?
|
|
|
|
|
It is ordered by the stock code.
Everything I said at the SQL level applies.
You would write code in a db layer to do that.
Then the GUI level would use the db layer.
|
|
|
|
|
how we find next week day's
date of next day using current calender .
suppose we put sunday in variable then show date 6 jan 2013.we want find next week all days date one by one.
|
|
|
|
|
Do some reading around the datetime data type, there are various attributes that will help you. DayOfWeek (I think) returns 1-7 which can be used to get the info you need.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
dear all
i try to learn ado.net so i start with an article how to build database using ado+access and vb.net and think this article is compatible with visual studio 2005 not 2010 which i have so some error i face like
Me.BindingContext(DataSet1, "table1").Position = 0
i tray to read the first record from access data base
any one can guide me to learn new version of ado.net with ms access
best regards
|
|
|
|
|
I will make 2 recommendations
1. Change to SQL Server database it will be much more useful to train on.
2. Learn to do some research this is an excellent tool[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hello all, i want to ask how syntax cast real to numeric using scale in sql server 2005, i am already try but still error in datagrid, i am using jeasyui framework, can you help me.please...?!
|
|
|
|
|
What error? What did it say? Can you post you Sql-statement?
|
|
|
|
|
insert into rk_process (code,name,label) values ('01','lee001','aa' )
insert into rk_process (code,name,label) values ('01','lee002','aa' )
insert into rk_process (code,name,label) values ('01','lee003','aa' )
insert into rk_process (code,name,label) values ('01','leek001','aa' )
insert into rk_process (code,name,label) values ('01','leek001','aa' )
want to filter only (lee) but it showing (leek) also
select name from rk_process where name like '%lee%')
thanks in advance.
Result
lee001
lee002
lee003
leek001
leek001
but i need only
lee001
lee002
lee003
|
|
|
|
|
You specified in your like clause that you want any words with "lee" so that is what you get. Try "lee0" so it will not get those containing the 'k'.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Not tested, but off-hand...
'%lee[0-9]%'
or
'%lee[^k]%'
P.S. You didn't specify which database system you are using. And you probably don't need the leading percent sign (% )
modified 28-Dec-12 12:55pm.
|
|
|
|