Friday, March 30, 2012
Query a Sql Server LOG (LDF) File
Actually i was thinking is there any way to query the LDF ( sqlserver transaction log file) to get the operations performed during that time span?
Hope we can do it!
Regards
Salim
**********************************************************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...Get LogExplorer from www.lumigent.com , it's the only way AFAIK.
--
Jacco Schalkwijk
SQL Server MVP
"Salim" <salim_belim@.hargreaveslansdown.co.uk> wrote in message
news:%23repm8$kDHA.1096@.TK2MSFTNGP11.phx.gbl...
> Hello guys,
> Actually i was thinking is there any way to query the LDF ( sqlserver
transaction log file) to get the operations performed during that time span?
> Hope we can do it!
> Regards
> Salim
>
> **********************************************************************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...|||Hi,
You can use this undocumented command:
DBCC log ( {dbid|dbname } [, { -1 | 0 | 1 | 2 | 3 | 4}] )
For example:
DBCC log ('pubs', 2)
I'm sure that you can find more information about this if you search on
google, i don't have the information about what each number means right now.
--
Regards,
Kristofer Gafvert - IIS MVP
http://www.ilopia.com - FAQ & Tutorials for Windows Server 2003, and SQL
Server 2000
Reply to newsgroup only. Remove NEWS if you must reply by email, but please
do not.
Problems with spam and viruses? See
http://www.ilopia.com/security/newsposting.aspx
"Salim" <salim_belim@.hargreaveslansdown.co.uk> wrote in message
news:%23repm8$kDHA.1096@.TK2MSFTNGP11.phx.gbl...
> Hello guys,
> Actually i was thinking is there any way to query the LDF ( sqlserver
transaction log file) to get the operations performed during that time span?
> Hope we can do it!
> Regards
> Salim
>
> **********************************************************************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...
Wednesday, March 28, 2012
query "For XML" problem?...or not!
hi guys
i'm developing a multi-tier web application which at a given point calls a stored procedure that returns data formated as XML ( 'select .... for xml auto' basically).
That SP returns a list of tasks allocated to 1 or more resources.
The problem is that from time to time (and that is totally random, anything from 30seconds to 10mins) whenever the code calls that SP, the XML structure isn't there, so no data is listed.
Question is: is this a problem within SQL Server XML support or anything related to .NET?
I'm using .NET 2.0.50727 with VS2005 8.0.50727.42, and SQL Server 2005 and IE 6.0.2900
Also, if i refresh the browser and go to the Task listing page, the list comes back again!
Note that i'm NOT using SESSIONs in ANY point, so this has nothing to do with sessions.
TIA
Sérgio Charrua
www.pdmfc.com
Portugal
Hi Sergio,
SQL Server XML support is very useful for some issues. But It isn't scalable solution.
Good Coding!
Javier Luna
http://guydotnetxmlwebservices.blogspot.com/
|||It's diffcult to figure out what's causing the problem. From SQL side, if a SP returns XML data, it just returns a binary stream to the client as other returned data. I suggest you open SQL Profiler to trace the SQL Server when the prolbem repros, so that you can clarify whehter SQL returns expected result set or empty (none) result, or maybe some network issue.sql
Monday, March 26, 2012
Query
New to SQL programming and would like to know can we use the result of
2 queries in one?
Eg,
Parts as a query
Spares as a query
Can I use the results of these 2 queries
SELECT parts.*, spares.*
FROM Parts, Spares
can you pls help?
Thanks in advance
rgds
tdYour question is rather vague so only a general answer is possible. I think
you will want to use either a UNION or a JOIN. The example query you posted
is actually a CROSS JOIN, which probably isn't what you intended but that
depends what you mean by "use the result of 2 queries".
If you need more help then please read the following article, which explains
how you can best describe your problem for the group:
http://www.aspfaq.com/etiquette.asp?id=5006
David Portas
SQL Server MVP
--
Friday, March 9, 2012
QA returning negative #s as positive
I have a very peculiar issue going on. I have a table that contains a decimal(18,2) column called "Amount". Looking at this table through Enterprise Mgr, I can see that there are values in there that are negative. However, when I run a query in Query Analyzer, it displays all the negative values as positives.
The only workaround I've found right now is to change the column type to "real" and then change it back to decimal(18,2), and it starts showing the negatives as negative. However, without performing this absurd workaround, it doesn't work.
Is there a known bug in QA that would manifest itself as this? What is the cause for this?
Thanks in advance.I haven't had a problem with this. What does your query look like? Are the correct results being retuned to your ASP.NET application?
Terri|||Terri,
The query is a straight forward select, nothing tricky at all. Basically, if I look at the Amount values through the analyzer, it displays them as positive. However, one interesting to note is that it recognizes the number as being negative because if i add another column to the return so that it's "Amount * 1", it will return the correct (negative) value.
It basically seems to be a displaying issue. I google'd this issue, and came across a few posts from other forums where people were having the same issue, but none of the threads had an explanation.
Also, this is a problem only with this table. There are other tables in the warehouse that have decimal(18,2) columns with negative values, and they get displayed correctly. At the same time, though, there's nothing special about the table in question. The amount column is sourced from a different table with a column of number(21,6) type, which is really a glorified decimal, so that doesn't seem to be the problem.
I'm pretty much puzzled as to why this column would be displayed incorrectly like this. I welcome any suggestions/ideas.
Thanks|||Have you been able to resolve this issue? I have been out of town this past week and will jump back into this if you are still stuck.
Terri|||Hey Terri,
Actually, it's been sitting on the back burner, and I've been busy with other things. I would, ultimately, like to figure out what is happening, so if you have any ideas, I am all ears.
I did a search on Google groups, this forum, and a few others, and was unable to find an answer. I did find a few threads on various sources concerning this problem, but there was no resolution from anyone.
Thanks for the help.