Testing A Query?
Aug 1, 2007
i've been informed that one way to test a query is to execute and roll-back it back as a transaction. my question is the following: using the aforementioned mechanism, how can i examine the database state before the query is rolled-back?
View 2 Replies
ADVERTISEMENT
Dec 6, 2005
hello everyone i was hoping to get some help.
i have sql server2000 and iis5.1 running and im using vbscript through asp.
i have a table that has two keys so that together they make a unique key.
so i am trying to test my table in asp so that if there is a duplicate unique key inserted then show an
error...
Can anyone help me?
View 5 Replies
View Related
May 9, 2007
I am obviously a newbie to SQL Server but have been using Access for years and I have come up against what appears to be an age old issue concerning nulls and specifically the functions to test for them etc.
Below is the Access Query I am having difficulty with...
----------------------------------------------------------
SELECT DISTINCT Max(tbl_ScheduleDate.SchDate) AS CurrentDate, ([SchDate],"mmmm yyyy") AS MonthYear, tbl_Schedule.Area, tbl_Schedule.CP, IIf(IsNull(tbl_tmp_CP.CPID),"Not Uploaded","Uploaded") AS Loaded
FROM (tbl_Schedule INNER JOIN tbl_ScheduleDate ON tbl_Schedule.MaxMinID = tbl_ScheduleDate.MaxMinID) LEFT JOIN tbl_tmp_CP ON tbl_Schedule.CP = tbl_tmp_CP.CP
GROUP BY Format([SchDate],"mmmm yyyy"), tbl_Schedule.Area, tbl_Schedule.CP, IIf(IsNull(tbl_tmp_CP.CPID),"Not Uploaded","Uploaded"), tbl_ScheduleDate.SchDate, tbl_tmp_CP.CPID;
-------------------------------------------------------------
Ignore the Format() function as I know this is a problem and have a fix.
The problem is this field...
IIf(IsNull(tbl_tmp_CP.CPID),"Not Uploaded","Uploaded") AS Loaded
I am testing to see if data is loaded into table 'tbl_tmp_CP' that is related to 'tbl_Schedule' by checking if there is a null value or not and then adding the right response string value to a column called Loaded.
Can anyone suggest a way for me to do the above?
View 2 Replies
View Related
Apr 3, 2006
I am trying to improve the performance of a query. No matter how badit runs the first time, it runs really fast the second time.So how can I tell if I've done anything to improve the query if italways comes back quickly after the first run? I assume thequery/data/plan is in cache - how can I clean it out for my session?Thanks in advance for any help you can provide -
View 4 Replies
View Related
Feb 23, 2008
I have an application that is using ADO connection strings from multiple clients. One site with about 20 users was recently upgraded to a newer version of my application, and the number of connections to the SQL Server I'm told went from about 20 to spiking over 100 from time to time. There were myriad changes to my app over the course of the last year since their prior version of my app. I need to nail down which version introduced a change in connection pooling (?) and I was wondering what tools I should use to monitor that.
Any ideas?
View 1 Replies
View Related
Jul 20, 2007
I have a website and database in Access, how do i set it up so i can test it in IIS using SQL server?
View 5 Replies
View Related
May 21, 2008
I am using SqlServer 2005 Express Edition. I have written a stored procedure that has a transaction to make sure that it rolls back in case of failure. Is there a way to test that the transaction works. I don't now how to cause an error that would cause the transaction to roll back and raise the error with the details of the exception.
Thanks,
laura
View 2 Replies
View Related
Apr 13, 2001
I want to run remote procs from a local - central proc, but don't want to crash my proc if the remote NT Server or SQL Server is not available.
So, I want to test for NT and SQL availability first.
Here's my code.
====================
DECLARE
@DBName varchar(22),
@QueryString NVARCHAR(130),
@Resultsint,
@ResultsTxtvarchar(31)
/* I find the server-dbasename name in a lookup table, and then build dynamic script */
SELECT @DBName = "<SRVRNAME~DBASENAME>"
SELECT @QueryString = N'master..xp_cmdshell "ECHO >'
+ SUBSTRING(@DBName, 1,6)
+ 'pipesqlquery", no_output'
EXEC @Results = sp_executesql @QueryString
SELECT @Results /* <-- testing here.... */
=====================
If the NT / SQL is running, "@Results" should = 0 (success on the ECHO to the PIPE)
If the NT / SQL is NOT running, "@Results" should = 1 (error on the ECHO to the PIPE)
If I test in QA, I get the expected "@Results" values.
If I run the proc, I get "@Results" = 0 for both events, and them my proc fails on the remote proc call if the NT / SQL is NOT running.
I don't know how to write DMO in TSQL to try that.
I have also tried using 'odbcping' too.
HINTS? Better way to test remote NT / SQL is NOT running?
Thanks in advance.
View 1 Replies
View Related
May 1, 2001
Hi,
Is there anyway to test the loadtesting/Stress testing on SQLSERVER. I wanted to executes a Store procedure with concurrent users.
Thanks
JK
View 1 Replies
View Related
Dec 24, 2002
Anyone have a tool or script to run to test a SQL server under heavy stress?
View 1 Replies
View Related
Mar 31, 2004
Hi,
I need help to test person's skills for
knowledge of SQL stored procedures
and DTS
Could someone point on good resources.
Thank you
Alex
View 4 Replies
View Related
May 7, 1999
i have performed all the steps for the replication there are two problems i encounytring
(i) how to check whether the replication is working or not
(ii) can replication on the subscribing server automatically create the table which publishing server is publshing
(iii)please tell me someother forums for sql server
what my knowledge says that in replication if i modify the data at one place it should automatically be modified in the subscribing server but this thing is also not happening (its not flashing any error message as such)
please tell me what all things i need to do to make sure that everything starts working
waiting for reply
ashish bhatnagar
View 1 Replies
View Related
Jan 15, 2007
Hi Guyz ,
I'm new to this forum and as well as new to OLAP testing . I would like to know OLAP testing and guidance for SQL server anlaysis services .
I have been trying install SQL server 2000 in my system but it not going through, Can anybody send information how to install SQL server and how to play with sample database.
View 2 Replies
View Related
May 22, 2007
Has anyone ever heard of using Response.Write to test sql queries in the query designer? Here is the actual suggestion I was given recently:
Response.write your sql query. Copy the query to your db query tool and run the query. Adjust the query as necessary to return the recordset you desire. When you have the proper query, adjust your asp code.
The query editor/designer doesn't like certain symbols and extraneous code. So how exactly can you use Response.Write with a sql query without getting errors in designer?
View 4 Replies
View Related
Jul 23, 2005
I've begun some testing with the June beta of SQL 2005. One problemI've hit is with scalar-valued functions. The error I often get whenexecuting functions is "Select statements included within a functioncannot return data to a client.". These same functions are workingfine under SQL 2000.Has anybody seen this behavior or know what the deal is?
View 7 Replies
View Related
Oct 1, 2005
I've started researching on Unit Testing and I must admitI had never heard of Unit Testing until a couple of monthsago. Obviously I am interested in Unit Testing StoredProcedures.I read the TSQLUnit documentation (not all of it) and i also raninto a newsgroup post saying TSQLUnit is very small comparedto NUnit. The conclusion I am making out of this post is thatI should rather spend time resarching/reading about NUnit thanTSQLUnit. Is that a good assessment?I would like to you what you use and if you use actuallyUnit Testing or some other method? I ran into White Box/Black BoxQA testing. All these are new to me. Any good place to read about"Extreme Programming"? I ran into one link that I saved it at work.That's one place i will read more.Any links, documentation or books you would suggest?I searched Amazon and I didn't find anything interestingregarding SQL Server and Stored Procedures.Thank you
View 1 Replies
View Related
May 25, 2006
I am running windows xp pro on my home computer and would like to test andatabase driven ASP .NET web application. I need to be able to create an SQLdatabase which will be assessed by the web application. I already have alocal IIS Server up and running.At work, I use SQL Enterprise Manager. I wanted to download it on my homecomputer but cannot find it anywhere on the net.How can I test my web applications at home on a person computer?Thanks.Jess
View 1 Replies
View Related
Mar 31, 2008
Hi,How do I write a query where if a column, "value," is NULL I returnthe phrase "No value entered" but otherwise return the column's value,even if it is the empty string? I'm tried to modify this simple querySELECT value FROM meta_dataThanks, - Dave
View 2 Replies
View Related
Feb 20, 2008
can any one guide me how should i do performance testing on database size for sql server.
I dont know how to read the execution plan, though i have read many document but still i am not clear.
For are the reports which shows the performance has been down and its all accurate.
View 26 Replies
View Related
Jun 20, 2005
Well was wondering this weekend. How do you do unit testing with SSIS? Is anyone trying it?
View 9 Replies
View Related
Feb 6, 2006
Is it possible to get a list of all the fixes and enhancements that are going into SP1 for SSIS? This will make it alot easier to test seeing as we will know what we are looking for.
Regards
-Jamie
View 1 Replies
View Related
Aug 31, 2007
Hello Everyone
I am new to replication but i am into a project to test Transactional replication process , do anyone have any experience in this
If possible plz let me know what section i need to test .
Thanks in advance
Karthik
View 2 Replies
View Related
Sep 13, 2006
How do I test failover to point to the mirrored database instead of the principal without having to stop the primary instance? I would like to just bring the mirrored database on the primary instance to an offline status and see that the same database on the mirrored instance getting activated as the primary. This does not happen if I try to put the database on the primary server "offline" as it complains that any database that is being mirrored cannot be taken offline.
View 1 Replies
View Related
Nov 23, 2007
At the moment, the only way (that I know of) to test a subscription seems to be to schedule it a few minutes ahead in time and wait for it to happen. Dies nayone know if there are plans for and "Execute" or "tTst" button? It would be nice to have one.
View 1 Replies
View Related
Jan 15, 2007
How does one determine in a VS load test the exact limit of the number of users the report server can handle without failing?
If 200 users proces request reports simultaneously, what is the best configuration for a single box deployment. The reports are parametrized reports and do not run from cache.
Thanks
Inder
View 4 Replies
View Related
Jan 16, 2008
hi every one
can any one please explain me how to test manually SSIS packages
thanks in advance
View 3 Replies
View Related
Jul 10, 2007
Hi
I’ve got a simple SQLdataSource which is wired up to a gridView. When the page loads, it’s sometimes likely the data source would contain no data – how can I test for that in the code behind (no data)? I’d like to only show a button if there is data?
I’m using ASP.NET 2.0 with C#
Many thanksRichard
View 2 Replies
View Related
Aug 10, 2007
Hi
I really need your help. I’ve got a table with 4 columns – username (a string of text), dateTime (a date and time), duration (time in minutes), roomID (URL). I really need some help with writing up some code behind to check if a user has permission to continue. I’ve got the first bit, but I need help with collecting the data and testing it:
SqlConnection conn = new SqlConnection(Global.ConnectionString); SqlCommand cmd = new SqlCommand("select * from tblActiveSession where Username=@Username", conn);
SqlParameter paraUsername = cmd.Parameters.Add("@Username", SqlDbType.NVarChar); paraUsername.Value = this.txtUsername.Text;
try { conn.Open()
This is where I need the help. What I need is to test each row against the following:
If now() is within the allowed time frame – greater than dateTime, but less than dateTime + duration, then break the loop and redirect to roomID.
I really hope this makes sence, and I’m greatful for any help.
Many thanksRichard
View 13 Replies
View Related
Jul 6, 2004
Pop quiz hotshots:
I am creating a View in SQL2000 where i concatenate values from multiple tables. My problem is that if one of the values is null then the whole string is null, so I would like to know how to test for nulls within the Select part if the View.
Select
Titles.Title + ' ' + User.Forename + ' ' + User.Surname AS FullName,
For example;
If User.Forename is null, I still want to return Titles.Title and User.Surname as a concatenated string.
I’ve tried I few things like places if statements within the Select part but I can’t get it to work.
Many thanks
View 3 Replies
View Related
Jun 26, 2000
Can someone advise me as to the best way to loop through a collection of columns for each row in a table testing the value of each column for nulls etc and then entering the column name into another column where the condition is true..
View 1 Replies
View Related
Feb 29, 2000
We need to start testing our Microsoft cluster servers.
Has anyone heard of any plan or products one can use to test
the failovers?
Please advise
Thanks
Susan
View 1 Replies
View Related
Jan 5, 2001
We are looking for a software program that will allow us to test our SQL server. We are looking for the most thorough tool that is available. I was asked to post a message, so I do not have too many details.
Thanks!
Jeff
View 1 Replies
View Related
Mar 31, 2003
My previous experience is with php and MySQL.
I currently have Apache, MySQL and php running on my local machine to enable me to test php code on localhost
I've been asked by a colleague if I'll work on an SQL 2000 database they're having trouble with. They said they will provide Visual.net, SQL 2000 and any other software I need.
I'm completely in the dark on this, but have some starting questions:
To test my code, will I need to set up a sever on localhost?
Will I need other software than Visual.net and SQL 2000? I'm using DW MX for my web stuff.
Whre can I find a basic introduction to ASP / SQL 2000 in the form of a tutorial?
How fast does this combination run? The database has 25,000 rows and 6 columns. What would be a reasonal expect time for a result?
Any help appreciated
H
View 3 Replies
View Related