I'm programming in delphi and new to querieng MS SQL Server. Is there a way
to monitor the queries sent to the server and something of the returns. At
least execution time would be interesting ...
We are in plan to build a Monitoring tool using PowerShell and Performance Monitor which could monitor 10 to 20 servers. Do you have any reference of any existing tool using Performance Monitor to monitor the SQL Server and available for free? I didn't want to put some effort, if something is available already.
I am querying my dBase "Reservations" to obtain a range of dates for rooms in our hotel that are available for a vacationer to reserve...
this is the my present SQL structure (two tables(roomReserve & roomDescribe inner joined) ********************** SELECT roomReserve.availibility, roomDescribe.numRooms
FROM roomDescribe INNER JOIN roomReserve ON roomDescribe.code = roomReserve.code
WHERE (((roomReserve.availibility) Between 8/20/99 And 8/23/99) AND ((roomDescribe.numRooms)>0));
**************************** The problem is that I do not want any room open dates (roomReserve.Availibility) to come up if any of the days in between the date range have 0 rooms available (in other words no room available on that date) (roomReserve.numRooms)>0
But they do because the query is not correctly written to be an all or none recordset for the date range time peroid…
For example, if I query for the date range of 8/20/99 to 8/23/99 using a criteria that the room must be available (>0), and let's say the date 8/21/99 has 0 rooms available for the King Fireplace room, then the query's results set gives me a list of the other 3 dates (8/20, 8/22, 8/23) for when the King Fireplace room is available...
I don't want anything thing for that date range to come out if any of the dates (within that range 8/20-8/23) have a room status = 0 during that time period...
I need a way to receive an all or none recordset result... with only one query statement…
I do not want to have to query a query… if that's at all possible…
I just started working with MS SQL. I'm attempting to find the equivalent of the MySQL commands STATUS and SHOW STATUS.
Essentially, I want to connect to the database from a .net app, check the status, such as how many connections, table locks, errors, etc... and display that information on my application.
Ok in Replication for sql 2000,' what happens when a query such as 'update tableA set a=1 where id=5' affects 1 row. What will happen when it does not affect any row.
Somebody can give some tips or hints for speed up my querys and procedures from sql and get more performance, what is best to use, joins o cursors, using cursors can give me more performance?
I've got a trouble with my query and left outer joins. I've got 2 tables, table A and B, both have the same record called ID. I used this query: SELECT * FROM A LEFT OUTER JOIN B ON A.ID = B.ID
This is OK and works fine, my trouble comes when i have a duplicated ID on both A and B. Instead of return 2 fields, it returns me 4.
Is there some way to force SQl server to return only the first founded on B, but the 2 duplicated IDs on the A table?
I have two databases with table structures exactly the same. The query in one database works and returns correctly. The same query (copied and pasted) in another database returns the correct records but completely ignores the order by. Even stranger, when you are creating the query under modify and run it, it is fine. But when I right-click on the query and go to 'Open View' then the query does not return correctly. Below is the query:
SELECT TOP (100) PERCENT pf.description AS incentive, CAST(i.targetc AS FLOAT) AS targetc, i.targetp, b.basis, d.description, i.iSelect, i.direction, pf.pValue, pf.pFigure FROM dbo.PerfFactorWeights AS pfw INNER JOIN dbo.PerfFactors AS pf ON pfw.incentiveID = pf.incentiveID INNER JOIN dbo.Incentive AS i ON pfw.incentiveID = i.incentiveID AND pfw.basis = i.basisID INNER JOIN dbo.Basis AS b ON i.basisID = b.basisID INNER JOIN dbo.Division AS d ON pfw.division = d.uniqueID ORDER BY incentive, d.uniqueID, b.basis
Someone asked me a curious question.Can I execute a query to sql server from a bat file? how?If not is there a simple scripting laguage that this person might use todrive his process that is similar to a dos bat file?
Hello,Could some clarify for me? I’ve been told that I should add lock statements to my database write querys (update, delete, insert). I’m not sure If it’s necessary though. The only documentation I’ve found so far is how to implement a lock statement with threading but I’m not using the threading namespace. What best practice and how would I implement this without threading or should I be using threading?Thanks in advance!
I'm looking for a solution to run querys (create databases ed) after a silent installation of SQL 2005 Express edition (example with a .sql file). So users can run a installation unattended with all databases installed and so on.
What I got is a document about how to run a silent installation (document " Using Command Prompt Options to install SQL Server Express") but this docs there's no solution how to run querys after the installation.
This is driving me a little nuts, I have been testing locally with SQL Server Express 2005 and this has not been a problem, however now that I have restored the databases to SQL Server 2005 (not express) When I go into SQL Server Management Studio open a table the option for changing a query type is greyed out has anyone seen this or have any ideas how I can get this working. Thanks, Terry
I have a column colC in a table myTable that has a value (e.g. '0X'). The position of a non-zero character in column colC refers to the ordinal position of another column in the table myTable (in the aforementioned example, colB).To get a column name (i.e., colA or colB) from table myTable, I can join ("ON cte.pos = cn.ORDINAL_POSITION") to INFORMATION_SCHEMA.COLUMNS for that table catalog, schema and name. But I want to show the value of what is in that column (e.g., 'ABC'), not just the name. Hoping for:
COLUMN_NAME Value ----------- ----- colB 123 colA XYZ
I've tried dynamic SQL to no success, probably not executing the concept correctly..Below is what I have:
I am using ASP.NET 2.0 login control. this control connect to ASPNET.MDF database. I built another application using windows service, and this application also connects to ASPNET.MDF database. problem is that the first application that connects to the database, locks the database, and so the other application cannot use the database untill the other application is closed. I am going on circles about this, and just don't know what to do. Please please please. love me do.
I have a SQLexpress db that i would like to be able to access from both a windows app and web app (both running on the same machine) at the same time. Is this possible. I've been able to connect either one or the other, but not both at the same time. Thanks
If there are 2 different web application connecting to a sql server database through ODBC connection, both of them have full privilege to update , create , add column etc. Would there any issues of SQL server impacts when actually on live.
Hi to all.. Does anyone know about some useful resources of programming Accounting and General Ledger applications..SQL scripts,books..etc. Thanks to all..
I am running SQL Server 2005 Dev x86 with SSRS SP1 on Windows2003 Svr SP1.
My SQL Server is running and SSRS is working. When I come to run certain installs though, my Server name is not present in the dropdowns or in the browse for installed server lists.
I entered the name of my SQL server manually, but when I ran the application, it gave me an error: 00250 unable to run dtabase locator service.
i am a computer sciences engineering student and and we have an assignment to create a web project with a database.
Our lecturers will store our submissions on a db server but they want our projects enable the restoring our own databases..
that is, they wanna be able to have a copy of our databases to a new db that they have just created.. and they want us to enable this feature in an install.aspx page in our project.. the new db is guaranteed that will have the same name as ours..
so now what i am supposed to include in install.aspx?
Hi All.. I have an 3 tier web applications and I want to use sql transactions but not in each class. Example : I have 3 clases who need to update each table in one transaction how I do use sql transactions. I try to do in this way but not work: sub cmdupdate_click dim a as new class1 dim b as new class2 dim c as new class3 dim cn as new sqlconnection...... cn.open .....transactions.... scripts a.cn =cn ...I pass the same connection via property to each class a.update b.cn=cn.... b.update c.cn=cn..... c.update Transaction...scripts to commit cn.closeend sub maybe that logic is incorrect. I dont now is my explain is clear.
There is a possibility of a unique database for various applications. Example users of a table that has the name, email, registro.Uma application included in a user table and other application also included in this table.
Our company wants to run web based application in folowing way.
Browser --> WebServer -->Sql Server
Sql server is part part of corporation domain and has about 25 more databases
Should we dedicate extra SQL server to run Web apps , or it would be safe to run web apps on corporation Sql Server? or If any one can point on links on this subject?. Thank you
What is the correct way to move applications from one server (2000) to another server(SQL 2005). I have to move all the databases as well as applications from one server to another.Here is my procedure: 1) Backup all 65 databases in first server(600GB total) 2)copy all the backup files from one server to another(destination) 3)Make all database(single user)and take transaction Log backup 4) Restore all database to destination server in norecovery mode and restore all transaction log in Recovery mode) 5)stop server 1 and point the application to another server
So how much downtime i have to face since it is 24/7 production server. and Can you please give the correct details so i can apply.
Hi All,During the past couple of years I have been maintaining the company'sAccess databases, in the coming weeks I will be migrating data to SQLserver, I will be using the Access forms as a frontend to access datawhile we developed a new front end through VB.Net.I was wondering if anyone will recommend an application that makes anexact replica or backup of the SQL server in the case the SQL serverfails. With MS Access, if a record is corrupted we needed to go backto the previous day backup of the database, we cant afford to havethis issue any longer.Regards,John
I am looking for the right tools to do application monitoring.I'm hoping to find one single tool that can do the entire job but ifit does not exist then a few monitoring apps would do as well.I need the ability to do the standard things like testing for ping,checking for windows services running and restarting them after somethreshold is met, and wmi.Some of the more tricky things I need it to do are:* Parse log files looking for specific error codes, and the ability toset an alert only if it sees that error X times over some period oftime.* Run custom slq queries like row counts and max values returned froma query and if that condition is met X times over some period oftime.* Run an external app that does its own custom testing and act on itsresults, which could be to parse the result file from the app.Keep in mind cost is not the isssue right now - so this can befreeware to some type of enterprise solution that our company can use.Does anyone know of any tools that you can point me towards?Thanks...
I'm new to VB and SQL server. I have a windows forms application and a Web application that need to connect to the same database (Named WebCenter). But when I try to connect to it from the Web app while running the windows forms app this error message apears:
Unable to open the physical file "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataWebCenter_Data.MDF". Operating system error 32: "32(The process has no access to the file because is being used by another process). Unable to open the physical file "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataWebCenter_Log.LDF". Operating system error 32: "32(The process has no access to the file because is being used by another process.)". Cannot open database "WebCenter" requested by the login. The login failed. Login failed for user 'CARLOS-PCASPNET'. File activation failure. The physical file name "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataWebCenter_Log.LDF" may be incorrect.
Can anyone give me hand or point me in the right direction.
I am presently tasked with improving the performance of a chatty application. What I mean by a chatty application is that the application makes multiple calls to the database server for each user request. In many cases it appears that many of the windows are making multiple calls to the database for the population of dialog boxes. In a couple of cases there are more than 10 dialog boxes that are populated similar to this.
To me this is kind of an "old issue", but my response is (1) cache the dialog information as much as possible and (2) make one call to the database to return all of this data for the dialog boxes if it is not cached. For update calls again make a single call to the database rather than making a call for each individual row of a table that is updated.
I admit that some of this will complicate the code of the application; however, my perspective is that I am supposed to look at this from the database perspective and not from the perspective of "programmer convenience." There will be times in which something that would otherwise get to hairy for a programmer will dictate an additional trip to the server, but this should not normally be the case.