Home News Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | MS SQL Logging Util


You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion

MS SQL Logging Util
Reply
 
Thread Tools
Old 19-07-2005, 18:38   #1
Prevoiusly Terabyte !!
 
Mauldor's Avatar
 
Join Date: Jan 2004
Location: Scunthorpe
Age: 41
Services: 10mbit SB4100, Sky and BT Line.
Posts: 407
Mauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of light
Send a message via Skype™ to Mauldor
MS SQL Logging Util

I have a problem with a program which uses MSSQL as the database. Now in order to work out why it is crashing, I need to somehow see what it is trying to do in SQL and any errors - for example trying to write to a database with the wrong usename or fields misisng etc..

Anybody know of a program or way to achive this?
Mauldor is offline   Reply With Quote
Old 19-07-2005, 18:44   #2
JohnHorb
Guest
 
Location: Sale, Cheshire
Services: 10MB Broadband, DTV, Telephone
Posts: n/a
Re: MS SQL Logging Util

Quote:
Originally Posted by Mauldor
I have a problem with a program which uses MSSQL as the database. Now in order to work out why it is crashing, I need to somehow see what it is trying to do in SQL and any errors - for example trying to write to a database with the wrong usename or fields misisng etc..

Anybody know of a program or way to achive this?
MSSQL Trace? (Haven't got it on this PC, but I think it's called SQL Performance Analyzer, if you've got the SQL management tools installed).

...or you can get to it from Enterprise Manager/Tools
  Reply With Quote
Old 19-07-2005, 18:44   #3
NINJA
 
grandmaster's Avatar
 
Join Date: May 2005
Location: Nr Manchester
Age: 31
Posts: 892
grandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of societygrandmaster is a pillar of society
Re: MS SQL Logging Util

you can use sql enterprise manager to view the last action of the user that processed the transaction.

(as long as (s) he does'nt move on and process anything else..

I used it to track down an error in a field where a user was using an ' in an address and SQL was whinging
grandmaster is offline   Reply With Quote
Old 19-07-2005, 18:45   #4
cf.mega poster
 
Join Date: Jun 2003
Posts: 4,845
Caspar has reached the bronze age
Caspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze age
Send a message via MSN to Caspar
Re: MS SQL Logging Util

Quote:
Originally Posted by Mauldor
I have a problem with a program which uses MSSQL as the database. Now in order to work out why it is crashing, I need to somehow see what it is trying to do in SQL and any errors - for example trying to write to a database with the wrong usename or fields misisng etc..

Anybody know of a program or way to achive this?
Have you tried the MSSQL tool Query Analyser or even Enterprise Manager.
__________________
Read this for a I-Web domain hosted update.
Caspar is offline   Reply With Quote
Old 19-07-2005, 18:56   #5
Prevoiusly Terabyte !!
 
Mauldor's Avatar
 
Join Date: Jan 2004
Location: Scunthorpe
Age: 41
Services: 10mbit SB4100, Sky and BT Line.
Posts: 407
Mauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of light
Send a message via Skype™ to Mauldor
Re: MS SQL Logging Util

Quote:
Originally Posted by Caspar
Have you tried the MSSQL tool Query Analyser or even Enterprise Manager.
Indeed I have, I can see what Transactions its doing, tried the very same thing in Eneterprise Manager and they work fine, though the program is not updating this database. Maybe I never put enough Fields on Profiler (only think I have tried so far) to show Errors - I am trying to see what its doing and any errors and why sort of thing.. Oh well Ill keep looking
Mauldor is offline   Reply With Quote
Old 19-07-2005, 19:03   #6
JohnHorb
Guest
 
Location: Sale, Cheshire
Services: 10MB Broadband, DTV, Telephone
Posts: n/a
Re: MS SQL Logging Util

Profiler - that's what I was thinking of. Set up a trace, and you should see all the SQL statements submitted. You can then cut and paste iinto Query Analyser to check for errors.
  Reply With Quote
Old 20-07-2005, 06:10   #7
Prevoiusly Terabyte !!
 
Mauldor's Avatar
 
Join Date: Jan 2004
Location: Scunthorpe
Age: 41
Services: 10mbit SB4100, Sky and BT Line.
Posts: 407
Mauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of light
Send a message via Skype™ to Mauldor
Re: MS SQL Logging Util

Right he ho - finally got somewhere (though no closer to the answer like)..

I selected all the option on Profiler and ran this just before I knew where there would be a error and stopped it after the error, this gave me a better chance to see what the problem was.

Now to explain (as this might help) what it is I am doing, the program (a game server written in Chinese) Is running on a XP Box with everything set to Chinese PRC (so i can see if nothing else the txt files in chinese to aid me translating it). The trace was rouhgly like thus:

INSERT INTO Storage (First, Late, VipEndDate) VALUES ('Peter','Pan','20/07/2005 05:27:14')

Now if I run this on Enterprise Manager on the said database, I get the Error :

The Convertion of char data type to a DateTime DataType resulted in a out-of-range datetime value

VipEndDate by the way is defined as DateTime. I will go Google this to death and see what comes from it - cos I can type the date in no problems, just on a Update that it failes
Mauldor is offline   Reply With Quote
Old 20-07-2005, 06:46   #8
JohnHorb
Guest
 
Location: Sale, Cheshire
Services: 10MB Broadband, DTV, Telephone
Posts: n/a
Re: MS SQL Logging Util

Dates in computers are the bane of my life! If you can fix the code so that the date is formatted as 20 Jul 2005, before submitting the SQL, you'll be alright! (That's the easiest - I think there are ways of getting it to accept the data in dd/mm/yyyy format, but these are more complex and involve editing the registry, etc - even more complicated if the box is set to Chinese - what is the Chinese date format in Windows?).
  Reply With Quote
Old 20-07-2005, 07:09   #9
cf.mega poster
 
Join Date: Jun 2003
Age: 29
Posts: 6,273
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: MS SQL Logging Util

Quote:
Originally Posted by Mauldor
Right he ho - finally got somewhere (though no closer to the answer like)..

I selected all the option on Profiler and ran this just before I knew where there would be a error and stopped it after the error, this gave me a better chance to see what the problem was.

Now to explain (as this might help) what it is I am doing, the program (a game server written in Chinese) Is running on a XP Box with everything set to Chinese PRC (so i can see if nothing else the txt files in chinese to aid me translating it). The trace was rouhgly like thus:

INSERT INTO Storage (First, Late, VipEndDate) VALUES ('Peter','Pan','20/07/2005 05:27:14')

Now if I run this on Enterprise Manager on the said database, I get the Error :

The Convertion of char data type to a DateTime DataType resulted in a out-of-range datetime value

VipEndDate by the way is defined as DateTime. I will go Google this to death and see what comes from it - cos I can type the date in no problems, just on a Update that it failes
Use:

INSERT INTO Storage (First, Late, VipEndDate) VALUES ('Peter','Pan','07/20/2005 05:27:14')
Richard M is offline   Reply With Quote
Old 20-07-2005, 18:37   #10
Prevoiusly Terabyte !!
 
Mauldor's Avatar
 
Join Date: Jan 2004
Location: Scunthorpe
Age: 41
Services: 10mbit SB4100, Sky and BT Line.
Posts: 407
Mauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of lightMauldor is a glorious beacon of light
Send a message via Skype™ to Mauldor
Re: MS SQL Logging Util

I changed my Regional Lang to USA and it worked, how i fathered this out was playing about with that Update Statement till I worked out what format it was hoping to get. Google showed LOTS of these Problems (for Coders) and MS-SQL - so its not Uniquie Problem. Many Thanks to everybody anyhow for the Help and it was Indeed Profiler - I must play with this Utility so more to see what the good triggers are to set !!
Mauldor is offline   Reply With Quote
Old 20-07-2005, 18:59   #11
cf.mega poster
 
Join Date: Jun 2003
Posts: 4,845
Caspar has reached the bronze age
Caspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze ageCaspar has reached the bronze age
Send a message via MSN to Caspar
Re: MS SQL Logging Util

Glad you sorted it ..and I agree with JohnHorb Dates are a real nightmare when developing
__________________
Read this for a I-Web domain hosted update.
Caspar is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 22:22.


Links
Google
 
Web www.cableforum.co.uk


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
Copyright © 2003 - 2008, Cable Forum.
(server1.cableforum.co.uk)