[SQL Server 2000] How To Interpret Server Trace / How To Get More Details?

Apr 4, 2007

Hello all,

An application that i wrote (that interacts with SQL Server 2000) is causing deadlocks on the server. i have no direct access to the server, but the user have sent me a server trace.

The relevant part of the trace is:




Code Snippet



2007-04-04 11:29:13.01 spid4 End deadlock search 296 ... a deadlock was found.
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Value:0x80
2007-04-04 11:29:13.01 spid4 Victim Resource Owner:
2007-04-04 11:29:13.01 spid4 ResType:LockOwner Stype:'OR' Mode: IX SPID:122 ECID:0 Ec:(0xC61DF4F8) Value:0xa
2007-04-04 11:29:13.01 spid4 Requested By:
2007-04-04 11:29:13.01 spid4 Input Buf: RPC Event: sp_execute;1
2007-04-04 11:29:13.01 spid4 SPID: 116 ECID: 0 Statement Type: UPDATE Line #: 1
2007-04-04 11:29:13.01 spid4 Owner:0x8849cba0 Mode: X Flg:0x0 Ref:2 Life:02000000 SPID:116 ECID:0
2007-04-04 11:29:13.01 spid4 Grant List 0::
2007-04-04 11:29:13.01 spid4 PAG: 12:1:42176 CleanCnt:2 Mode: X Flags: 0x2
2007-04-04 11:29:13.01 spid4 Node:2
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Value:0x80
2007-04-04 11:29:13.01 spid4 Requested By:
2007-04-04 11:29:13.01 spid4 Input Buf: RPC Event: sp_execute;1
2007-04-04 11:29:13.01 spid4 SPID: 122 ECID: 0 Statement Type: INSERT Line #: 1
2007-04-04 11:29:13.01 spid4 Owner:0x800936e0 Mode: IX Flg:0x0 Ref:0 Life:02000000 SPID:122 ECID:0
2007-04-04 11:29:13.01 spid4 Grant List 2::
2007-04-04 11:29:13.01 spid4 PAG: 12:1:42157 CleanCnt:2 Mode: IX Flags: 0x0
2007-04-04 11:29:13.01 spid4 Node:1
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 Wait-for graph
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 ...
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 Cycle: ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Va
2007-04-04 11:29:13.01 spid4 Node:2 ResType:LockOwner Stype:'OR' Mode: IX SPID:122 ECID:0 Ec:(0xC61DF4F8) V
2007-04-04 11:29:13.01 spid4 Node:1 ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Va
2007-04-04 11:29:13.01 spid4 Deadlock cycle was encountered .... verifying cycle
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4
2007-04-04 11:29:13.01 spid4 Cycle: ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Va
2007-04-04 11:29:13.01 spid4 Node:2 ResType:LockOwner Stype:'OR' Mode: IX SPID:122 ECID:0 Ec:(0xC61DF4F8) V
2007-04-04 11:29:13.01 spid4 Node:1 ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Va
2007-04-04 11:29:13.01 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:116 ECID:0 Ec:(0xC62A54F8) Value:0x80
2007-04-04 11:29:13.01 spid4 Target Resource Owner:
2007-04-04 11:29:13.01 spid4 Starting deadlock search 296



Having very little experience with SQL Server 2000, all that i learn from the trace is that, well, there is a deadlock, but i had already known that beforehand.

What other useful details can be interpreted from the trace above?
How can i obtain information like the specific statement(s) which cause the deadlock, etc?



Thanks in Advance,
Edwin

View 1 Replies


ADVERTISEMENT

SQL Server 2000-- 'Order Details' Table Exisr

Jul 26, 2007

Hi

I have came across a table in SQL server 2000 which named 'Order Details' in the sample 'Northwind' database which is available with the product. Am using the eval version . Generally no table name exist with a 'space' between the words. But the table 'Order Details' exist in the Northwind sample database.

Due to the naming convention i can't run sql queries on that. Is anyone aware of this type of issues.

Pls help

View 1 Replies View Related

Unable To Run Trace Definitions In SQL Server 2000

Jan 7, 2002

Hi All,
In SQL Server 7, we had the option of opening a previously saved trace template and running it inorder to run a previously saved trace defintion repeatedly.
File > Open > Trace Definition
and choosing the Trace Name. Clicking OK would run the trace.

How do we do the same in SQL Server 2000?
File > Open > Trace Template
opens a Trace template but has only a 'Save' button and I'm therefore unable to run it.

How is it possible to run a previously defined trace repeatedly in SQL server 2000?
Thanks in advance,
Praveena

View 1 Replies View Related

Trace Auditing For ( New Records And Updates For A Particular Date) - SQL Server 2000 Sp4

Apr 26, 2007

Hi,


I have few tables. I want to identify the RECORDS for a table which has been created/modified for a particular date and time. I don't want to write a trigger to capture the event for add/update.



Is there any system table which track for date and time using stored procedure each individual records which has been last updated or newly created records??



Note : The application already created without lastModified date and each table... so, we don't want to modify the application or db.

Database : SQL Server 2000 sp4



thanks in advance.

View 3 Replies View Related

SQL Server 2008 :: Audit Trace Enabled And Server Not Starting

Aug 12, 2014

I restarted the sql server after c2 audit was enabled and now i can not start the instance getting this error below. how do i bring the sql server up?

Cannot start C2 audit trace. SQL Server is shutting down. Error = 0x80070003(The system cannot find the path specified.)

View 2 Replies View Related

SQL Server 2008 :: Server Is Not Responding - Default Trace

May 30, 2015

We are using sql server 2008r2 standard edition.

We have replication set up. Publisher and distributor are on the same server, subscriber is in different server.

Suddenly the replication started failing and continued more than 12 hrs. When I tried to connect to the subscriber server, I am able to connect to the server but not able to run any queries or not able to open the error log from SSMS.

Is there any way to find from the default trace why the replication failed and the server is not responded?

What columns do I need to query from the trace?

View 5 Replies View Related

Can't See Job Details Unless Logged Into Server.

Jul 6, 2007

I open up the SQL Server Agent Job window, and I can't see details under the General, Steps, Schedules, or other tabs unless I am running SSMS directly on that server. So much for remote management, eh?
Anybody else experiencing this problem?
Anybody else notice that jobs may fail to complete correctly without raising any errors or logging any issues?
Anybody else remember when, a year ago, SQL Server was a good product?
Anybody think Microsoft is listening?
Anybody? Buehler? Buehler?

e4 d5 xd5 Nf6

View 9 Replies View Related

Configure Sql Server Details

Oct 19, 2007

Hi everybody,I'm installing a network monitoring tool (OpManager). Duringinstallation I reached the following step: Configure the SQL Serverdetails.Host Name: ???Port: 1433Database Name: xxxUser Name: ???Password: ???I don't know which host name I need to put in and also I don't knowwhich user name and password is required.Please can anyone help me with this.Thank you!

View 1 Replies View Related

How Can Trace SQL Server

Jun 9, 2008

How can trace SQL server without SQL profiler?

View 5 Replies View Related

How To Interpret The Value Returned By Permissions()?

Dec 30, 2003

I'm trying to check whether a user has permission to execute some master system stored procedures. For example, select permissions(OBJECT_ID('xp_loginconfig')) returns 2097215.

I have converted the decimal 2097215 to binary 00000000 00100000 00000000 00111111. I guess I suppose to look at the lower 16 bits only. Then I convert the binary 00000000 00111111 back to decimal 63. Then I find the largest decimal that is <= 63 in the table (the one in BOL) which shows the bits used for object permissions that are returned when only objectid is specified. Subtract that number from 63 and repeat this process until the difference is 0. So, in this case, 63 - 32 -16 -8 -4 -2 -1 = 0. This should the user has all the corresponding statement permissions. The upper 16 bits 00000000 00100000 are used to check what can be granted to other users. Since they are = 32 which is corresponding to execute, I believe that user can grant execute permission to other users.

For example, to check for execute procedure permission, it seems that I can use either of the following statement:

if permissions(OBJECT_ID('xp_loginconfig')) & 32 = 32

if permissions(OBJECT_ID('xp_loginconfig')) & 0x20 = 0x20


I hope someone can confirm my understanding. Is there another way to check for permission? Also, my understanding is that I must use master before executing permissions() since I'm checking permissions for master stored procedures.


Thank you for any help,

Peter

View 2 Replies View Related

How Would You Interpret This Error Message

Dec 4, 2006

I am attempting to complete a package that calls four "worker" packages in parallel.The connections are part of the worker packages.When I start the calling package, I get a message:Error at XYZ (the name of one of the packages): The connection is not specified.Which connection? Each worker package has three connections.So just to experiment, I delete that Execute Package Task and I get that same message about another package.So why does it not identify which connection is the concern and why did it stop with the first one instead of listing all the connection issues?And why is it asking for a connection at all? At present, all it does is call the other packages.

Still hanging in there...
IanO

View 5 Replies View Related

Where DeadLock Details Are Stored In SQL Server

Jan 24, 2008

Hi Guys,

I have one situation. I need to find out the processes which are all in deadlock state. I my figure out that SQL server maintains the process details in sysprocesses table.

Can any one please help me, Whether this is the table which contains deadlock details. If not where are they stored and How to kill that process ?

Thanks & Regards,
Senthil

View 38 Replies View Related

Setting Server Name In Trace

Jul 18, 2002

I am working with 3 sql 7.0 servers (Servers A, B, C) and am trying to create a trace via profiler to run against server B.

Every trace that I create keeps pointing to server A even though I have server B defined in the properties of the trace - (when I edit the trace properties it REALLY does show server B). I have server B defined in the screen where you 'Select the SQL Server to run the trace on'. I even used the wizard to run one of the canned traces and it still points to server A. Every trace I set up runs against server A. Can anyone think of what the heck I'm doin' wrong? Is is a configuration setting somewhere?

View 1 Replies View Related

Server-Side Trace

Jan 29, 2008


I have created a server-side procedure which captures evenst for audit purposes and save to a file onto the SQL Server. This procedure has been defined as an autoload so that when the server is restarted, this procedure automatically loads.

However, there is a fundemental flaw with this routine. When the procedure attempts to execute, it will abort due to the fact that the trace file already exists.

I have two choices:-

1. When the procedure restarts, append to existing file or
2. Make a folder which comprise of today's day ie 20080128 and move trace file/s to this folder.

Option 2 is preferred.

How can I make this achievable?

Please note I'm using SQL Server 2005.

Ken

Below is a sample of my Code


-- Create a Queue
-- Declare Control Variable
declare @ReturnCode int
declare @Rc int
-- Declare Option Variable
declare @TraceID int
declare @maxfilesize bigint
declare @ColumnId int
declare @LogicalOperator int
declare @ComparisonOperator int
declare @Value int
declare @Option int
declare @on bit
declare @Event int
-- Set Option Variables
set @maxfilesize = 100 -- Maximum file size in megabytes
set @Option = 6 -- TraceFileRollOver and ShutdownOnError
set @on = 1 -- True
set @ReturnCode = 0 -- No Error
exec @Rc = sp_trace_create @TraceID output, @Option, N'\Server_named$SQLTraceActivity', @maxfilesize, NULL
select @ReturnCode=@@Error
if @ReturnCode <> 0
Begin
if @ReturnCode = 1
Print 'Error 1 - Unknown error.'
if @ReturnCode = 10
Print 'Error 10 - Invalid options. Returned when options specified are incompatible.'
if @ReturnCode = 12
Print 'Error 12 - Cannot create tracefile - check if file already exists, or this trace already running'
if @ReturnCode = 13
Print 'Error 13 - Out of memory. Returned when there is not enough memory to perform the specified action.'
if @ReturnCode = 14
Print 'Error 14 - Invalid stop time. Returned when the stop time specified has already happened.'
if @ReturnCode = 15
Print 'Error 15 - Invalid parameters. Returned when the user supplied incompatible parameters.'
else
Print 'Unexpected and Unknown error In creating trace - Please review'
Goto ErrorHandler
End
-- Set Events
-- Trace NTDomainName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 7, @on
-- Trace HostName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 8, @on
-- Trace IndexID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 24, @on
-- Trace RequestID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 56, @on
-- Trace SessionLoginName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 64, @on
-- Trace ClientProccessID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 9, @on
-- Trace IntegerData for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 25, @on
-- Trace LogionSid for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 41, @on
-- Trace RequestID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 49, @on
-- Trace NTUserName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 6, @on
-- Trace ApplicationName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 10, @on
-- Trace StartTime for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 14, @on
-- Trace ObjectID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 22, @on
-- Trace ServerName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 26, @on
-- Trace ObjectName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 34, @on
-- Trace XactSequence for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 50, @on
-- Trace DatabaseID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 3, @on
-- Trace LoginName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 11, @on
-- Trace NTDomainName for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 35, @on
-- Trace EventSequence for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 51, @on
-- Trace TransactionID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 4, @on
-- Trace SPID for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 12, @on
-- Trace ObjectType for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 28, @on
-- Trace IsSystem for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 60, @on
-- Trace EventSubClass for Object:Altered event
exec sp_trace_setevent @TraceID, 164, 21, @on

View 16 Replies View Related

Server-Side Trace

Jan 28, 2008



I have created a server-side procedure which captures evenst for audit purposes and save to a file onto the SQL Server. This procedure has been defined as an autoload so that when the server is restarted, this procedure automatically loads.



However, there is a fundemental flaw with this routine. When the procedure attempts to execute, it will abort due to the fact that the trace file already exists.



I have two choices:-



1. When the procedure restarts, append to existing file or

2. Make a folder which comprise of today's day ie 20080128 and move trace file/s to this folder.



Option 2 is preferred.



How can I make this achievable?



Please note I'm using SQL Server 2005.



Ken



Below is a sample of my Code





-- Create a Queue

-- Declare Control Variable

declare @ReturnCode int

declare @Rc int

-- Declare Option Variable

declare @TraceID int

declare @maxfilesize bigint

declare @ColumnId int

declare @LogicalOperator int

declare @ComparisonOperator int

declare @Value int

declare @Option int

declare @on bit

declare @Event int

-- Set Option Variables

set @maxfilesize = 100 -- Maximum file size in megabytes

set @Option = 6 -- TraceFileRollOver and ShutdownOnError

set @on = 1 -- True

set @ReturnCode = 0 -- No Error

exec @Rc = sp_trace_create @TraceID output, @Option, N'\Server_named$SQLTraceActivity', @maxfilesize, NULL

select @ReturnCode=@@Error

if @ReturnCode <> 0

Begin

if @ReturnCode = 1

Print 'Error 1 - Unknown error.'

if @ReturnCode = 10

Print 'Error 10 - Invalid options. Returned when options specified are incompatible.'

if @ReturnCode = 12

Print 'Error 12 - Cannot create tracefile - check if file already exists, or this trace already running'

if @ReturnCode = 13

Print 'Error 13 - Out of memory. Returned when there is not enough memory to perform the specified action.'

if @ReturnCode = 14

Print 'Error 14 - Invalid stop time. Returned when the stop time specified has already happened.'

if @ReturnCode = 15

Print 'Error 15 - Invalid parameters. Returned when the user supplied incompatible parameters.'

else

Print 'Unexpected and Unknown error In creating trace - Please review'

Goto ErrorHandler

End

-- Set Events

-- Trace NTDomainName for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 7, @on

-- Trace HostName for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 8, @on

-- Trace IndexID for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 24, @on

-- Trace RequestID for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 56, @on

-- Trace SessionLoginName for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 64, @on

-- Trace ClientProccessID for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 9, @on

-- Trace IntegerData for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 25, @on

-- Trace LogionSid for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 41, @on

-- Trace RequestID for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 49, @on

-- Trace NTUserName for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 6, @on

-- Trace ApplicationName for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 10, @on

-- Trace StartTime for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 14, @on

-- Trace ObjectID for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 22, @on

-- Trace ServerName for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 26, @on

-- Trace ObjectName for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 34, @on

-- Trace XactSequence for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 50, @on

-- Trace DatabaseID for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 3, @on

-- Trace LoginName for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 11, @on

-- Trace NTDomainName for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 35, @on

-- Trace EventSequence for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 51, @on

-- Trace TransactionID for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 4, @on

-- Trace SPID for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 12, @on

-- Trace ObjectType for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 28, @on

-- Trace IsSystem for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 60, @on

-- Trace EventSubClass for Object:Altered event

exec sp_trace_setevent @TraceID, 164, 21, @on

View 7 Replies View Related

Exporting Sql Server Table Details To Ms-Excel

Dec 6, 2006

I want to export the datas of a table into a excel file using an Sql Query.

When I execute that query the Excel file should be created automatically in the given path with all the datas in that table.

Can anybody give me a solution for this problem?

View 4 Replies View Related

FTP Task Log Details In SQL Server Integration Services

Sep 6, 2007



Hi,

I has created a SSIS FTP Task Programatically for Receiving Files. I have written code for Transfering data from FTP to my local machine. it is working fine. i need to log the details of the file transferred like file name, file size it to database table.

can any one help me to solve this...... its very urgent please.....

View 1 Replies View Related

Linked Server Not Displaying Table Details

Apr 16, 2007

I have created a linked server using my local SQL2005. The linked server can be seen as a linked server, but the database can not been expanded to see the tables, stored procedures, views, and other details regarding the linked server. The only method that I have found that will allow me to see all the details is to use XP's Remote Desktop Connection to access the database. Has anyone else experienced this problem, if so, how did you resolve it?

View 1 Replies View Related

Server Failover Clustering - Costs And More Details

Mar 24, 2008

Hi All,

We're planning to install a Server 2005 Failover Cluster and I'd like to find more information about licensing, etc.
Basic questions:

- What is the best O.S. to run? Win 2003 or the new 2008? And what version (datacenter, enterprise)?
- Since I'm going to use 2 machines, will I have to pay for 2 licenses (sql and windows - two lic. each)? Or just 1 license, since just 1 machine will be the active server?

This is for some web applications, so, web environment.

Any help?

Thank you!

View 1 Replies View Related

How To Trace Modification On SQL Server 2005

Mar 6, 2008

Hello ;Can any one point me how to trace any modification made on a certain tabeles with in any data base?what i mean is if i have table "a" and i add updated some rows with it ... is there a way to figure iut the old data and the new data?simply i can create another table "history_on_a" which will be filled by a trigger when any updates happen ...this solution will consume my hard disk so is ther a built in funtion with sql ?so if any one can tell me what to search for or any idea 

View 1 Replies View Related

SQL Server Stored Procedure Trace

Jan 18, 2006

Hello,
I am using a component (infragistics netadvantage) within my application which uses a default database.  Unfortunately this database doesn't provide me with all the functionality I need. Since the component uses stored procedures.
Is there anyway I can see what stored procedures are called when an event occurs?
That way I can copy over the tables and the stored procedures I need and I can alter them to suit my database.

View 3 Replies View Related

Urgent >>>Want To Trace The Each Activity Of Sql Server

Jul 9, 2001

Hi,
sir, i have used Trace But it does not start automaticaly when server starts, is there any other way to track the Events, Because i have to track all the updates (Insert,Delete, UPdate etc.) of all the tables of my particuylar database .

Pls Help ME.

Atul

View 1 Replies View Related

Have Trace Flags Changed In SQL Server 7?

Dec 14, 1998

Have Trace Flags changed in SQL Server 7?
I need to use T204 because of getting error:

'ORDER BY items must appear in the select list if SELECT DISTINCT IS USED'
when I try to compile stor proc.

I entered T204 as startup parameter and restarted server
but doesn't seem to work.

Any experience with that?
Thanks

View 1 Replies View Related

The Server Trace In Query Analyzer

Aug 2, 2006

Hi,

When looking in the server trace in query analyzer – I can see how many ‘reads’ a stored procedure does.
So I'm wondering if we can determine whether our query is good or bad by looking at the number of reads/writes that showing in the Trace.

Thanks in advance

View 1 Replies View Related

The Server Trace In Query Analyzer

Aug 2, 2006

Hi,

When looking in the server trace in query analyzer – I can see how many ‘reads’ a stored procedure does.
So I'm wondering if we can determine whether our query is good or bad by looking at the number of reads/writes that showing in the Trace.

Thanks in advance

View 3 Replies View Related

How Use The Show Server Trace Option.

May 26, 2008

Sir

How to used Show Server Trace option.
Where I got this option in SQL server .
Pls Help me .

Yaman

View 3 Replies View Related

Server-Side Trace Enhancements

Feb 7, 2008


I have decided that I needed to modify my trace file name to include date and time in a further attempt to make my file name unique. See below snippet:-


-- Build File Name

select @hr = datepart(hh,getdate())

select @min = datepart(mi,getdate())

select @sec = datepart(ss,getdate())

set @time = convert(char(2),@hr) + convert(char(2),@min) + convert(char(2),@sec)

set @filedate = CONVERT(char(8),getdate(),112)

If @Hr = '12'

set @filename = @path + 'Activity_' + @filedate

Else

set @filename = @path + 'Activity_' + @filedate + '_' + @time

End


This works in part. However, when the time has a zero in it, the program will substitue the zero with a blank.

Can someone suggest a better method

View 3 Replies View Related

SQL Server 2012 :: Query To Get CPU Usage / Memory Usage Details Of Server?

Jan 30, 2014

providing a query for fetching the data for CPU Usage, Memory usage, blocking and all details ...

I want to create a job which will run on a Node every 15 min and store data in a table for each instance...

DMV is not giving more stuff and xtended events not sure if i can store that data into a table?

View 7 Replies View Related

How To: Set Up &&amp; Interpret A Model To Predict Even Dollar Transactions

Feb 12, 2007

Generally, what would be a good start to model and make predictions based on the following.

Even Dollar Transactions €“ Including transactions that end in $0 or $50 with a Total Transaction Amount between $400 and $5000.

I have a table called Transaction with a BillingAmount column.

I've gone through the SQL Server 2005 Data Mining Tutorial (which uses a discrete prediction BikeBuyer yes or no) and read a lot of Data Mining with SQL Server 2005. Neither of these give good, complete, methodical examples of selecting inputs and targets and making predictions; especially for continuous columns.

I think I'm generally struggling with the concepts of selecting (continuous?) predictable attributes and calculating predictions based on the results. Are there any examples of a scenario similar to the above that I can reference? or just some advise.

View 6 Replies View Related

SQL Server 2008 :: Job Details In Running Schedule In Minutes

Aug 6, 2015

In my requirement,My production server running more then 5 jobs . I want details in running schedule in minutes. For example

1) First Job

I am configured every one hour.

2) Second job

Configured in every 30 min

3) Third job

Configured every 60 min

4) Fourth Job

Configured every 24 hrs

I want the result

SNOJOBNameRunning Schedule(in Min)
1First JOB 60min
2Second JOB 30 min
3Third JOB 60min
4Fourth JOB 1440min

View 1 Replies View Related

Licensing Details For SQL Server CE Cab Files To Be Used In Custom Installer

May 16, 2007

Hello All,

We have a licensed version of VS2005 and we are developing commercial C#.net mobile applications targeted for Pocket PC 2003, Windows CE etc.

We are currently making use of System.Data.SqlServerCe.dll and are using the Sql Server CE for storing and retrieving information required for the application. We use this information and send it to our hosted web server for processing.

We use NSIS installer to develop the installer for mobile application. Can we make use of the Sql Server CE CAB files (sqlce30.dev.ENU.ppc.wce4.armv4.CAB) to install or should we only use the Sql Server CE dlls that are mentioned in the REDIST.txt?

We would like to know if we would be in agreement with the EULA if we make use of the CAB files for installation instead of the direct dlls.

Best Regards,
Manasvini

View 3 Replies View Related

SQL7 Profiler - Trace Properties - Server

Mar 30, 2001

Hi

We have two servers each running SQL7. I cannot run a trace on one server from the other. Whatever server name I enter in the drop down box, the trace only records activity on the server that profiler is running on. Even if I put a non-existent server name in the box (!), the trace accepts the name but still only runs on the host server.

Any explanations please.
Keith

View 2 Replies View Related

How Autorestart Sql Prifile Trace After Server Reboot ?

Sep 5, 2001

how autorestart sql prifile trace after NT server reboot or or after shotdown and restart of Sql server ?

thanks

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved