Showing posts with label table. Show all posts
Showing posts with label table. Show all posts

Wednesday, March 28, 2012

Scheduling in SQL server 2000

Hi all,

I have a case :

I have an employee SQL-View (not table) in my sql server 2000 database. This view actually connect to an oracle database server, because all our employee data is located on the oracle database server.

This linked server soon proven to be the cause of poor application performance (response time is very slow). So we decide to put a local copy of employee table in our sql server 2000 database. We have successfully copy it to our database. But the most up-to-date employee data is still reside on oracle server. To deal with this problem we need to scheduling a sinchronization between sqlserver 2000 and oracle everyday at 01:00 o'clock midnight.

I never get task like this before, how to make a scheduling in sql server 2000? my friend suggest a dts scheduling but unfortunately I haven't found any tutorial about this for beginner

thanks

You could just schedule a linked server INSERT INTO statement or use the DTS wizard to create a package and create a SQL Server Agent JOB to run at the above time. If you are not the DBA SQL Server Agent wil need a service account with Admin permissions to run your package through JOBs. Try the links below for more about SQL Server Agent permissions and DTS sample code. Hope this helps.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_8sdm.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_4jxo.asp

http://www.sqldts.com

Monday, March 26, 2012

Scheduling Database - Design Help!

I need to develop a scheduling app and am having trouble with the
database
design. I can easily design a table hold appointments with start and
finish
times, but I always have an issue when it comes time to searching for
free
time.

The search examples:
Find the first available appointment in September
Find the first afternoon appointment
etc...

Should appointments be linked similar to a linked list? Should I create
a
row for each 5 or 10 or 15 minute slice of the day for every day and
then
just search for null in a 'used' field? This could grow way to fast.

If you need a more specific example to understand I can provide that,
but I
wanted to keep this as short as possible.

If anyone has experience designing a scheduling DB then please post
your
expoeriences.

ThanksOn 18 Sep 2005 22:20:03 -0700, Trevor.D.Matthews@.gmail.com wrote:

>I need to develop a scheduling app and am having trouble with the
>database
>design. I can easily design a table hold appointments with start and
>finish
>times, but I always have an issue when it comes time to searching for
>free
>time.
>The search examples:
>Find the first available appointment in September
>Find the first afternoon appointment
>etc...
>Should appointments be linked similar to a linked list? Should I create
>a
>row for each 5 or 10 or 15 minute slice of the day for every day and
>then
>just search for null in a 'used' field? This could grow way to fast.
>If you need a more specific example to understand I can provide that,
>but I
>wanted to keep this as short as possible.
>If anyone has experience designing a scheduling DB then please post
>your
>expoeriences.
>Thanks

Hi Trevor,

Using pre-allocated slots would bloat your database (though Daniel's
idea would limit this somewhat), and at the same time, it would limit
the freedom of the user to make appointments the way he wants to, to the
granularity of your pre-allocated slots.

Here's an alternative:
CREATE TABLE Schedule
(PersonID int NOT NULL REFERENCES (Persons),
StartTime smalldatetime NOT NULL,
EndTime smalldatetime NOT NULL, -- but see below!
-- other columns,
PRIMARY KEY (PersonID, StartTime),
UNIQUE (PersonID, EndTime),
CHECK (EndTime > StartTime),
)
You'd also need to ensure that there are no overlapping intervals, but
that can't be done in a CHECK constraint - you'll ened a trigger to
verify that business rule.

With this design, you can go two ways:

a) Store only the appointments. If there are no intervals that start
before time Y and end after time X, then the time interval from X to Y
is available for appointments.
This approach makes the processes for adding, changing and removing
appointments easy, but makes searching for available time somewhat
harder, as you have to search for absence of rows.

b) Change the nullability of EndTime to allow NULLs. NULL will represent
"eternity". Define a code to represent available time. Give each person
one special starting row: StartTime is the earliest datetime your
application will allow; EndTime is NULL; row marked as "available time".
When making the first appointment, the end time in this first row is
changed to the start time of the appointment, a row is added for the
appointment and an extra row is inserted to makr the time from the end
of the appointment to eternity (NULL) as available.
This approach makes the processes for adding, changing and removing
appointments harder (think about the combinations: an appointment in the
middle of available time has to be treated differently from an
appointment that immediately follow the previous appointment, that's
followed by another appointment, or even both. When appointments get
removed, changed, or shortened, the time that is now available again has
to be collapsed with adjacent avaialble time. Etc etc), but makes
searching for available time easier, as each time will always be part of
exactly one time slot in the Schedule table.
Note: To be complete and fail-safe, you'll also have to implement checks
(in trigger code) to ensure that there are no overlaps and no gaps
between a person's rows in the schedule).

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thanks so much to everyone for the input. I'll try out a couple of the
ideas and post back my results in case anyone wants to know how it
played out.

Thanks again,
Trevor

Trevor.D.Matthews@.gmail.com wrote:
> I need to develop a scheduling app and am having trouble with the
> database
> design. I can easily design a table hold appointments with start and
> finish
> times, but I always have an issue when it comes time to searching for
> free
> time.
> The search examples:
> Find the first available appointment in September
> Find the first afternoon appointment
> etc...
> Should appointments be linked similar to a linked list? Should I create
> a
> row for each 5 or 10 or 15 minute slice of the day for every day and
> then
> just search for null in a 'used' field? This could grow way to fast.
> If you need a more specific example to understand I can provide that,
> but I
> wanted to keep this as short as possible.
> If anyone has experience designing a scheduling DB then please post
> your
> expoeriences.
> Thanks

Scheduling an SSIS that connects to AS400

I am facing a SQL 2005 SSIS problem.

I have an SSIS package that downloads some data from an AS400 and places the data into a SQL 2005 table.

I use Client Access ODBC connection as my Source.

When I run the package from Business Intelligence - Visual Studio, it works fine.

However when I schedule the SSIS package as a job, it falls over with the following error:

Description: System.Data.Odbc.OdbcException: ERROR [08S01] [IBM][iSeries Access ODBC Driver]Communication link failure. comm rc=11004 - CWBCO1011 - Remote port could not be resolved

Please can someone help me......

Ric

By the way this is the full error message below:

Error: 2007-08-08 14:00:47.85
Code: 0xC0047062
Source: Data Flow Task DataReader Source [893]
Description: System.Data.Odbc.OdbcException: ERROR [08S01] [IBM][iSeries Access ODBC Driver]Communication link failure. comm rc=11004 - CWBCO1011 - Remote port could not be resolved
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.Odbc.OdbcConnection.Open()
at Microsoft.SqlServer.Dts.Runtime.ManagedHelper.GetManagedConnection(String assemblyQualifiedName, String connStr, Object transaction)
at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectionManager90.AcquireConnection(Object pTransaction)
at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.AcquireConnections(Object transaction)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostAcquireConnections(IDTSManagedComponentWrapper90 wrapper, Object transaction)
End Error
Error: 2007-08-08 14:00:47.87
Code: 0xC0047017
Source: Data Flow Task DTS.Pipeline
Description: component "DataReader Source" (893) failed validation and returned error code 0x80131937.
End Error

Hi,

If you run your package from Management Studio or dtexec, do you get the same error?

Do you have any other job succesfuly running packages pulling from other sources?

It could be a security issue rather than a data provider issue.

Philippe

|||

Moving data from AS400 with SQL Server Agent Job have worked since SQL Server 7.0 Microsoft have changed a few things but it still works. All you need is in the thread below.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1963603&SiteID=1

Scheduling an SSIS package that invokes a web service

Hey,

I have an SSIS package that invokes a web service and then updates a table. It runs fine as long as I am running it on the local machine. However, as soon as I save this package to the sql server, and try to schedule this as a job, it starts to fail. Now, the web service writes to an xml file and also uses an xsd and and an xsl file. When I save a dts package to the sql server, whats the proper way of referencing these files? I think this probably is what is making the package to fail, ut I am not sure.

Any help is greatly appreciated!!

Thanks!

You should use a configuration (right-click in the package and choose configurations) to set the ConnectionString property of the connection managers for the files. Or you could use expressions to set the connection strings (paths and filenames) based on variables. The variables can be set at runtime using the /SET option of DTEXEC.|||Also make sure you've configured SSIS logging, so you can find out why the package fails now or (once you fix the problem and go to production) if something goes wrong with scheduled package in production.|||That depends on where you want to keep them. I prefer to keep them in files on the disk. If your package is in SQL and you prefer to avoid the disk entirely, you can keep them in the database and just load them into variables via the Execute SQL task. The XML task and the XML Source component support receiving the XSD/XSLT from variables.
|||Thanks a lot for the suggestions. I will try them out and see how it works.|||

Hey,

Sorry for this delayed reply. Since I posted this question a lot of issues cropped up with my SQL server which eventually led to a total reinstallation of all apps on my pc. Anyway, I discovered that the problem I have been having was because of permission issues. I was able to fix that problem and just when I thought that I had everything going, I came across a new problem. After I save the SSIS package in sql server and create a job, the job starts failing. This is the error that I am getting:

-1073548540,0x,An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The Web Service threw an error during method execution. The error is: Unable to connect to the remote server.

Any suggestions would be very helpful.

Thanks!

|||Could it be a authentication issue? Is there any security on the web service?|||

Guys!!Thanks a lot for all the suggestions. Really appreciate your help. Problem was a combination of many issues. One was related to 32bit/64bit differences, the other was authentication, and finally some syntax problems when invoking the web service. Seems it is working really well now.

Thanks again!

Scheduling a text file to be inserted to a database table

Hi there
New to SQL 2000 and i have a question regarding scheduling a task. I have a
text file that is being downloaded to a web folder from an AS400 system
three times a day. I want to then grab this file and insert and replace the
exisiting records in a database table.
What be the best way to do this? Stored Procedure?
Can you schedule stored procedures to be run at time specific intervals?
Any help appreciatedBJ
DTS Package
"bj" <orders@.seton.net.au> wrote in message
news:OifAtnhUGHA.5808@.TK2MSFTNGP12.phx.gbl...
> Hi there
> New to SQL 2000 and i have a question regarding scheduling a task. I have
> a text file that is being downloaded to a web folder from an AS400 system
> three times a day. I want to then grab this file and insert and replace
> the exisiting records in a database table.
> What be the best way to do this? Stored Procedure?
> Can you schedule stored procedures to be run at time specific intervals?
> Any help appreciated
>
>

Scheduling a summary Stored Procedure

I had stored procedure[this read the data from couple of table and summarize
them based on the input paramter] which needs to be executed for every half
hour.I need to pass some input parameter to that proc. I am planning to
schedule this proc using below system procs
sp_add_jobschedule
sp_add_job
I need to pass some input parameter to the stored proc. I need give start
interval and end interval and some configurable values[int 1...int 5) to
filter out columns. These values can be modifiable by the end user
i.e exec my _storedpoc(startinterval, endinterval, int1, int2, int3,
int5...)
How do I pass this input params to my stored proc, when I shceduled .?
Is it the right approch to do this kind of summary procedure ?
Thanks in advance for your thoughts and comments appreciate it
prabhu
If the procedure you need to run have changing parameters' values, what
application supplies the parameters' values? That application should be the
job scheduled (within SQL server or outside).
If you have a few sets of such values that are fed to the same stored proc
to be run at different time, you can create separate jobs, each has its own
schedule and parameter values.
"prabhu" <prabahar.ignatius@.inin.com> wrote in message
news:uvHi57LnEHA.2216@.TK2MSFTNGP10.phx.gbl...
> I had stored procedure[this read the data from couple of table and
summarize
> them based on the input paramter] which needs to be executed for every
half
> hour.I need to pass some input parameter to that proc. I am planning to
> schedule this proc using below system procs
> sp_add_jobschedule
> sp_add_job
> I need to pass some input parameter to the stored proc. I need give start
> interval and end interval and some configurable values[int 1...int 5) to
> filter out columns. These values can be modifiable by the end user
> i.e exec my _storedpoc(startinterval, endinterval, int1, int2, int3,
> int5...)
> How do I pass this input params to my stored proc, when I shceduled .?
> Is it the right approch to do this kind of summary procedure ?
> Thanks in advance for your thoughts and comments appreciate it
> prabhu
>
>
|||Thank for the response Ran.
Most of the time parameters are going to have same value. But I cannot hard
code these values. Instead I need to read it from the file[ or Is there
place I can keep the values for the stored proc parameter.?] and invoke my
summary proc.
So the approach should be, the SP which is feeding the value should be
scheduled which intern call the summary procedure. Let me know if you have
any thoughts...
"Quentin Ran" <xyz@.abc.com> wrote in message
news:ezt3LrOnEHA.536@.TK2MSFTNGP11.phx.gbl...
> If the procedure you need to run have changing parameters' values, what
> application supplies the parameters' values? That application should be
the
> job scheduled (within SQL server or outside).
> If you have a few sets of such values that are fed to the same stored proc
> to be run at different time, you can create separate jobs, each has its
own[vbcol=seagreen]
> schedule and parameter values.
>
> "prabhu" <> wrote in message
> news:uvHi57LnEHA.2216@.TK2MSFTNGP10.phx.gbl...
> summarize
> half
start
>
|||Or rather, you want to set up a table which holds the parameter values.
Your job will query the table to construct the code.
"prabhu" <prabahar.ignatius@.inin.com> wrote in message
news:OQk2W3OnEHA.3324@.TK2MSFTNGP15.phx.gbl...
> Thank for the response Ran.
> Most of the time parameters are going to have same value. But I cannot
hard
> code these values. Instead I need to read it from the file[ or Is there
> place I can keep the values for the stored proc parameter.?] and invoke
my[vbcol=seagreen]
> summary proc.
> So the approach should be, the SP which is feeding the value should be
> scheduled which intern call the summary procedure. Let me know if you have
> any thoughts...
>
> "Quentin Ran" <xyz@.abc.com> wrote in message
> news:ezt3LrOnEHA.536@.TK2MSFTNGP11.phx.gbl...
> the
proc[vbcol=seagreen]
> own
to[vbcol=seagreen]
> start
to
>

Scheduling a summary Stored Procedure

I had stored procedure[this read the data from couple of table and summarize
them based on the input paramter] which needs to be executed for every half
hour.I need to pass some input parameter to that proc. I am planning to
schedule this proc using below system procs
sp_add_jobschedule
sp_add_job
I need to pass some input parameter to the stored proc. I need give start
interval and end interval and some configurable values[int 1...int 5) to
filter out columns. These values can be modifiable by the end user
i.e exec my _storedpoc(startinterval, endinterval, int1, int2, int3,
int5...)
How do I pass this input params to my stored proc, when I shceduled .?
Is it the right approch to do this kind of summary procedure ?
Thanks in advance for your thoughts and comments appreciate it
prabhuIf the procedure you need to run have changing parameters' values, what
application supplies the parameters' values? That application should be the
job scheduled (within SQL server or outside).
If you have a few sets of such values that are fed to the same stored proc
to be run at different time, you can create separate jobs, each has its own
schedule and parameter values.
"prabhu" <prabahar.ignatius@.inin.com> wrote in message
news:uvHi57LnEHA.2216@.TK2MSFTNGP10.phx.gbl...
> I had stored procedure[this read the data from couple of table and
summarize
> them based on the input paramter] which needs to be executed for every
half
> hour.I need to pass some input parameter to that proc. I am planning to
> schedule this proc using below system procs
> sp_add_jobschedule
> sp_add_job
> I need to pass some input parameter to the stored proc. I need give start
> interval and end interval and some configurable values[int 1...int 5) to
> filter out columns. These values can be modifiable by the end user
> i.e exec my _storedpoc(startinterval, endinterval, int1, int2, int3,
> int5...)
> How do I pass this input params to my stored proc, when I shceduled .?
> Is it the right approch to do this kind of summary procedure ?
> Thanks in advance for your thoughts and comments appreciate it
> prabhu
>
>|||Thank for the response Ran.
Most of the time parameters are going to have same value. But I cannot hard
code these values. Instead I need to read it from the file[ or Is there
place I can keep the values for the stored proc parameter.?] and invoke my
summary proc.
So the approach should be, the SP which is feeding the value should be
scheduled which intern call the summary procedure. Let me know if you have
any thoughts...
"Quentin Ran" <xyz@.abc.com> wrote in message
news:ezt3LrOnEHA.536@.TK2MSFTNGP11.phx.gbl...
> If the procedure you need to run have changing parameters' values, what
> application supplies the parameters' values? That application should be
the
> job scheduled (within SQL server or outside).
> If you have a few sets of such values that are fed to the same stored proc
> to be run at different time, you can create separate jobs, each has its
own
> schedule and parameter values.
>
> "prabhu" <> wrote in message
> news:uvHi57LnEHA.2216@.TK2MSFTNGP10.phx.gbl...
> > I had stored procedure[this read the data from couple of table and
> summarize
> > them based on the input paramter] which needs to be executed for every
> half
> > hour.I need to pass some input parameter to that proc. I am planning to
> > schedule this proc using below system procs
> > sp_add_jobschedule
> > sp_add_job
> > I need to pass some input parameter to the stored proc. I need give
start
> > interval and end interval and some configurable values[int 1...int 5) to
> > filter out columns. These values can be modifiable by the end user
> > i.e exec my _storedpoc(startinterval, endinterval, int1, int2, int3,
> > int5...)
> > How do I pass this input params to my stored proc, when I shceduled .?
> > Is it the right approch to do this kind of summary procedure ?
> > Thanks in advance for your thoughts and comments appreciate it
> >
> > prabhu
> >
> >
> >
> >
>|||Or rather, you want to set up a table which holds the parameter values.
Your job will query the table to construct the code.
"prabhu" <prabahar.ignatius@.inin.com> wrote in message
news:OQk2W3OnEHA.3324@.TK2MSFTNGP15.phx.gbl...
> Thank for the response Ran.
> Most of the time parameters are going to have same value. But I cannot
hard
> code these values. Instead I need to read it from the file[ or Is there
> place I can keep the values for the stored proc parameter.?] and invoke
my
> summary proc.
> So the approach should be, the SP which is feeding the value should be
> scheduled which intern call the summary procedure. Let me know if you have
> any thoughts...
>
> "Quentin Ran" <xyz@.abc.com> wrote in message
> news:ezt3LrOnEHA.536@.TK2MSFTNGP11.phx.gbl...
> > If the procedure you need to run have changing parameters' values, what
> > application supplies the parameters' values? That application should be
> the
> > job scheduled (within SQL server or outside).
> >
> > If you have a few sets of such values that are fed to the same stored
proc
> > to be run at different time, you can create separate jobs, each has its
> own
> > schedule and parameter values.
> >
> >
> >
> > "prabhu" <> wrote in message
> > news:uvHi57LnEHA.2216@.TK2MSFTNGP10.phx.gbl...
> > > I had stored procedure[this read the data from couple of table and
> > summarize
> > > them based on the input paramter] which needs to be executed for every
> > half
> > > hour.I need to pass some input parameter to that proc. I am planning
to
> > > schedule this proc using below system procs
> > > sp_add_jobschedule
> > > sp_add_job
> > > I need to pass some input parameter to the stored proc. I need give
> start
> > > interval and end interval and some configurable values[int 1...int 5)
to
> > > filter out columns. These values can be modifiable by the end user
> > > i.e exec my _storedpoc(startinterval, endinterval, int1, int2, int3,
> > > int5...)
> > > How do I pass this input params to my stored proc, when I shceduled .?
> > > Is it the right approch to do this kind of summary procedure ?
> > > Thanks in advance for your thoughts and comments appreciate it
> > >
> > > prabhu
> > >
> > >
> > >
> > >
> >
> >
>

Friday, March 23, 2012

Scheduling a job !

hi,
i am trying to automate the following process using TSQL.
1. Import table 'A' from Database 'x' to my Database 'Y'
2. After the import is complete , insert an identity column in table A, make it a Primary key and then rename it as 'B'.

I was successful in Scheduling a job to import the table from database 'X' to "Y'. but i am not able to insert the identity column and rename the table.

Can anyone please help me !
thanks in advance !
AraoCan't you let the job first do a Create Table to create the new table with the name you want it to have, then imort into that table?|||i will try doing that. but i need to drop the previous table which has the same name. and the job is erroring out at this point. it says " the @.newname value is already in use as a object name and would cause duplicate that is not permitted. the step failed " but it's not in use by any of the users. i tried several times but it will never drop the table ! the following is my code.

if exists (select * from sysobjects where id = object_id(N'[dbo].[AR_ACCOUNTS') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AR_ACCOUNTS]
GO
EXEC sp_rename 'AR1_CUSTOMERMASTER', 'AR_ACCOUNTS'
GO

thanks,
anithasql

Scheduling a DTS package

I am using Enterprise manager with an MSDE engine. I have created a DTS package that updates a table in one of the databases. If I right click and choose "Execute Package" it runs...No sweat. When I try to use the scheduler to run the job every hour, it always fails between 1 and 10 seconds into the job...It only returns the error "Failed During Step 1."

I'm wondering if this feature won't work with MSDE? Does anyone have any ideas?Under Management>Jobs, right click on the job in question, and select "Job History". There should be a checkbox that says "Show step details". Clicking that will expand the information. Check to see if there's more information in there.|||Probably a security issue. Wen you run the package interactively it uses the logged in user, when running from the job queue it uses the configured user account of the DTS Package.

Open your package, click Package->Properties->Logging|||Thanks for tips, the error is:

Step Error Source: Microsoft Data Transformation Services Flat File Rowset Provider
Step Error Description:Error opening datafile: The system cannot find the path specified.

Step Error code: 80004005
Step Error Help File:DTSFFile.hlp
Step Error Help Context ID:0

I checked the path and it's correct, and it finds the file when I run it manually.|||Check the server to see if the file exists in the exact same filepath as on your machine. I believe that when you run a DTS package interactively, it resolves file names locally, but when executed from the server via SQLAgent it will resolve the filepaths from the server.|||i concurr
i suck at typing in filepaths so i always set the windows explorer to display the full path in the title bar and i just copy it from there.

Scheduler UTC problem

Hi all,

I'm having trouble to implement an "scheduler" in a stored procedure with UTC date.

In one table (ScheduleCfg) I have one field that indicates which days of the week my banner must be exhibited, separated by commas (e.g. 0,5,6)
In my table "Schedule", I have a datetime field that indicates which is the next time that the banner must be shown.
(To explain: I have a process which runs every hour to republicate the banners and recalculate the next exhibition hour).

My SP gets the "Last Display" datetime and sums one hour... If the day still the same, then the new value of "Next Display" is this value.
But if it changes the day, then I'll have to verify if the new day's dayofweek number matches with the tables...

Until this everything works fine... But all my problem is: UTC TIME!

My application is globalizated, so many countries can use it. All the dates stored in my database must be UTC, so here's my problem:

When I sum one hour, I'm using the UTC date. So the "turn of the day" occurs in a different moment. For example, in Brazil the TimeZone is -3 hours, so when the day changes it will be 9 o'clock in Brazil. (because it's 0h UTC, so the Brazil's local time will be 9h PM of the day before...)

Anyone can help me?
I've been thinking about it for weeks and I couldn't find a good solution...

Thanks in advance.

This should work. I've used the difference between the GetUTCDate and GetDate functions to get the difference between the local timezone and UTC. Here is my suggested approach:

Code Snippet

--This variable contains the last saved date

Declare @.LastDisplay as Datetime

--Retrieve the value from the 'Schedule' table

--Retrieve the number of hours difference between the local timezone and UTC

Declare @.HourDiff as Int

Select @.HourDiff = DateDiff(hour, GetUTCDate(), GetDate())

--Calculate the next schedule date taking into consideration the timezone difference and adding an hour

Declare @.NextDisplay as Datetime

Set @.NextDisplay = DateAdd(hour, 1 + @.HourDiff, @.LastDisplay)

Select @.NextDisplay

--Check the difference between the last date (in UTC) and the new date (local time)

If DateDiff(day, @.LastDisplay, @.NextDisplay) = 1

Begin

--The day has changed

End

Else

Begin

-- The day has not changed

End

The DateDiff at the end, compares the last date the schedule ran which is saved in UTC with the new calculated date which is in local time. If the difference is not 0 then this is a new date and you can perform the logic that you want.

I hope this answers your question.

Best regards,

Sami Samir

|||Hmmm. Good idea..
I'll try to pass a parameter with the time difference, since my SQL Server does not know which country is calling..

Thank you!!!!

Tuesday, March 20, 2012

Scheduled job fails because locks were not released on the table

Hi,
I have a scheduled job that has started failing frequently because of a user
who only works on the weekends. Even though the user stops working on the
application, somehow the locks stay on the table making the scheduled job to
fail. Is there a way to release the locks on a particular table through TSQL
before the job runs so that the job gets completed successfully?Not some general way. You could use procedures such as sp_who, sp_lock, sp_who2 etc to find the SPID
you need to get rid of and then use the KILL command to force a rollback and termination of the
connection in question. Another option is to set the database to single user and specify a ROLLBACK
option (see ALTER DATABASE).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"ronnie" <ronnie@.discussions.microsoft.com> wrote in message
news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> Hi,
> I have a scheduled job that has started failing frequently because of a user
> who only works on the weekends. Even though the user stops working on the
> application, somehow the locks stay on the table making the scheduled job to
> fail. Is there a way to release the locks on a particular table through TSQL
> before the job runs so that the job gets completed successfully?|||Well, what exactly is the user doing to lock the table? What do they do
when they "stop working" on it?
"ronnie" <ronnie@.discussions.microsoft.com> wrote in message
news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> Hi,
> I have a scheduled job that has started failing frequently because of a
> user
> who only works on the weekends. Even though the user stops working on the
> application, somehow the locks stay on the table making the scheduled job
> to
> fail. Is there a way to release the locks on a particular table through
> TSQL
> before the job runs so that the job gets completed successfully?|||The user works remotely and connects to the application through a VPN. I am
trying to find out from the user how he logs off after he stops working.
Maybe he doesn't even logs off and leave the application open on the machine
and just closes the VPN connection. I will post the answer as soon as I hear
from the user.
As this job runs during the night, I can get the spid from the username and
then put in a TSQL command to kill the spid/s created by this user so that
the locks get released from the table.
"Aaron Bertrand [SQL Server MVP]" wrote:
> Well, what exactly is the user doing to lock the table? What do they do
> when they "stop working" on it?
>
> "ronnie" <ronnie@.discussions.microsoft.com> wrote in message
> news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> > Hi,
> >
> > I have a scheduled job that has started failing frequently because of a
> > user
> > who only works on the weekends. Even though the user stops working on the
> > application, somehow the locks stay on the table making the scheduled job
> > to
> > fail. Is there a way to release the locks on a particular table through
> > TSQL
> > before the job runs so that the job gets completed successfully?
>|||I found out from the user that while running an update on the table, his
machine froze and he wasn't able to do anything afterwards. Since the machine
is at a remote location and he is connecting through VPN he wasn't even able
to reboot the machine. This might have caused the locks to remain on this
table.
What should be done to handle situations like this to prevent future
scheduled job failures?
"ronnie" wrote:
> The user works remotely and connects to the application through a VPN. I am
> trying to find out from the user how he logs off after he stops working.
> Maybe he doesn't even logs off and leave the application open on the machine
> and just closes the VPN connection. I will post the answer as soon as I hear
> from the user.
> As this job runs during the night, I can get the spid from the username and
> then put in a TSQL command to kill the spid/s created by this user so that
> the locks get released from the table.
> "Aaron Bertrand [SQL Server MVP]" wrote:
> > Well, what exactly is the user doing to lock the table? What do they do
> > when they "stop working" on it?
> >
> >
> >
> > "ronnie" <ronnie@.discussions.microsoft.com> wrote in message
> > news:DDE09196-44F6-4681-BD95-40472FB8112A@.microsoft.com...
> > > Hi,
> > >
> > > I have a scheduled job that has started failing frequently because of a
> > > user
> > > who only works on the weekends. Even though the user stops working on the
> > > application, somehow the locks stay on the table making the scheduled job
> > > to
> > > fail. Is there a way to release the locks on a particular table through
> > > TSQL
> > > before the job runs so that the job gets completed successfully?
> >|||> What should be done to handle situations like this to prevent future
> scheduled job failures?
Well, what I was trying to get at what was, what exactly is the user doing
to hold locks on the table in the first place? Using what app(s)? Is he
opening data in a grid? Ideally he should be submitting short transactions
(using stored procedures or insert/update statements) and should not be as
exposed to the risk of connection interruptions. If this has happened more
than once then my guess is his data manipulation techniques are not ideal.|||The user was working on an Microsoft Access application that uses SQL Server
database as the backend. This user did an update / insert into a table using
an Access Form and while he was doing that using VPN and remote desktop his
machine froze and the connection broke down. This somehow created the
situation where the entire table got locked and the connection to SQL Server
persisted even though the user's machine has frozen.
"Aaron Bertrand [SQL Server MVP]" wrote:
> > What should be done to handle situations like this to prevent future
> > scheduled job failures?
> Well, what I was trying to get at what was, what exactly is the user doing
> to hold locks on the table in the first place? Using what app(s)? Is he
> opening data in a grid? Ideally he should be submitting short transactions
> (using stored procedures or insert/update statements) and should not be as
> exposed to the risk of connection interruptions. If this has happened more
> than once then my guess is his data manipulation techniques are not ideal.
>

Monday, March 12, 2012

scheduled import/export

I used import/export in SQL 2000 to transfer one table from A server to B
server and save the package and schedule it. This works fine in SQL 2000.
However, when I try to do the same thing in SQL 2005 and after I save the
package, there is no way to schedule it. And I couldn't locate the package I
created in import/export. Does anyone know where I can find the package and
schedule it after the import/export? Is this very different way from
SQL2000? Please help. Thanks.
Hi
"00kobebrian" wrote:

> I used import/export in SQL 2000 to transfer one table from A server to B
> server and save the package and schedule it. This works fine in SQL 2000.
> However, when I try to do the same thing in SQL 2005 and after I save the
> package, there is no way to schedule it. And I couldn't locate the package I
> created in import/export. Does anyone know where I can find the package and
> schedule it after the import/export? Is this very different way from
> SQL2000? Please help. Thanks.
If you saved the task as a SSIS package on the server then you will need to
connect to Integration services to find and run the package.
To schedule a job to run the package copy the command line from the run
package dialog and use this as the parameters for DTEXEC.
>
John
|||Sorry. Do you mean copy the content in "command line" tab in "execute
package utility"? and where is DTEXEC? Thanks.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:94A2C248-9076-4126-9877-1BBFF1AB1FB2@.microsoft.com...
> Hi
> "00kobebrian" wrote:
>
> If you saved the task as a SSIS package on the server then you will need
> to
> connect to Integration services to find and run the package.
> To schedule a job to run the package copy the command line from the run
> package dialog and use this as the parameters for DTEXEC.
> John

scheduled import/export

I used import/export in SQL 2000 to transfer one table from A server to B
server and save the package and schedule it. This works fine in SQL 2000.
However, when I try to do the same thing in SQL 2005 and after I save the
package, there is no way to schedule it. And I couldn't locate the package I
created in import/export. Does anyone know where I can find the package and
schedule it after the import/export? Is this very different way from
SQL2000? Please help. Thanks.Hi
"00kobebrian" wrote:

> I used import/export in SQL 2000 to transfer one table from A server to B
> server and save the package and schedule it. This works fine in SQL 2000.
> However, when I try to do the same thing in SQL 2005 and after I save the
> package, there is no way to schedule it. And I couldn't locate the package
I
> created in import/export. Does anyone know where I can find the package an
d
> schedule it after the import/export? Is this very different way from
> SQL2000? Please help. Thanks.
If you saved the task as a SSIS package on the server then you will need to
connect to Integration services to find and run the package.
To schedule a job to run the package copy the command line from the run
package dialog and use this as the parameters for DTEXEC.
>
John|||How can I connect to integration services? Thanks.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:94A2C248-9076-4126-9877-1BBFF1AB1FB2@.microsoft.com...
> Hi
> "00kobebrian" wrote:
>
> If you saved the task as a SSIS package on the server then you will need
> to
> connect to Integration services to find and run the package.
> To schedule a job to run the package copy the command line from the run
> package dialog and use this as the parameters for DTEXEC.
> John|||Hi
On Feb 5, 2:31 am, "00EricClapton" <E...@.yahoo.com> wrote:
> How can I connect to integration services? Thanks.
> "John Bell" <jbellnewspo...@.hotmail.com> wrote in message
> news:94A2C248-9076-4126-9877-1BBFF1AB1FB2@.microsoft.com...
>
If you open up object explorere (F8) then there is a large connect
button at the top of the pane. Alternatively you can use the file/
connect object explorer menu options. Choose integration services for
the service type and enter the authentication details.
HTH
John|||Sorry. Do you mean copy the content in "command line" tab in "execute
package utility"? and where is DTEXEC? Thanks.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:94A2C248-9076-4126-9877-1BBFF1AB1FB2@.microsoft.com...
> Hi
> "00kobebrian" wrote:
>
> If you saved the task as a SSIS package on the server then you will need
> to
> connect to Integration services to find and run the package.
> To schedule a job to run the package copy the command line from the run
> package dialog and use this as the parameters for DTEXEC.
> John

scheduled import/export

I used import/export in SQL 2000 to transfer one table from A server to B
server and save the package and schedule it. This works fine in SQL 2000.
However, when I try to do the same thing in SQL 2005 and after I save the
package, there is no way to schedule it. And I couldn't locate the package I
created in import/export. Does anyone know where I can find the package and
schedule it after the import/export? Is this very different way from
SQL2000? Please help. Thanks.Hi
"00kobebrian" wrote:
> I used import/export in SQL 2000 to transfer one table from A server to B
> server and save the package and schedule it. This works fine in SQL 2000.
> However, when I try to do the same thing in SQL 2005 and after I save the
> package, there is no way to schedule it. And I couldn't locate the package I
> created in import/export. Does anyone know where I can find the package and
> schedule it after the import/export? Is this very different way from
> SQL2000? Please help. Thanks.
If you saved the task as a SSIS package on the server then you will need to
connect to Integration services to find and run the package.
To schedule a job to run the package copy the command line from the run
package dialog and use this as the parameters for DTEXEC.
>
John|||How can I connect to integration services? Thanks.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:94A2C248-9076-4126-9877-1BBFF1AB1FB2@.microsoft.com...
> Hi
> "00kobebrian" wrote:
>> I used import/export in SQL 2000 to transfer one table from A server to B
>> server and save the package and schedule it. This works fine in SQL 2000.
>> However, when I try to do the same thing in SQL 2005 and after I save the
>> package, there is no way to schedule it. And I couldn't locate the
>> package I
>> created in import/export. Does anyone know where I can find the package
>> and
>> schedule it after the import/export? Is this very different way from
>> SQL2000? Please help. Thanks.
> If you saved the task as a SSIS package on the server then you will need
> to
> connect to Integration services to find and run the package.
> To schedule a job to run the package copy the command line from the run
> package dialog and use this as the parameters for DTEXEC.
> John|||Hi
On Feb 5, 2:31 am, "00EricClapton" <E...@.yahoo.com> wrote:
> How can I connect to integration services? Thanks.
> "John Bell" <jbellnewspo...@.hotmail.com> wrote in message
> news:94A2C248-9076-4126-9877-1BBFF1AB1FB2@.microsoft.com...
>
If you open up object explorere (F8) then there is a large connect
button at the top of the pane. Alternatively you can use the file/
connect object explorer menu options. Choose integration services for
the service type and enter the authentication details.
HTH
John|||Sorry. Do you mean copy the content in "command line" tab in "execute
package utility"? and where is DTEXEC? Thanks.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:94A2C248-9076-4126-9877-1BBFF1AB1FB2@.microsoft.com...
> Hi
> "00kobebrian" wrote:
>> I used import/export in SQL 2000 to transfer one table from A server to B
>> server and save the package and schedule it. This works fine in SQL 2000.
>> However, when I try to do the same thing in SQL 2005 and after I save the
>> package, there is no way to schedule it. And I couldn't locate the
>> package I
>> created in import/export. Does anyone know where I can find the package
>> and
>> schedule it after the import/export? Is this very different way from
>> SQL2000? Please help. Thanks.
> If you saved the task as a SSIS package on the server then you will need
> to
> connect to Integration services to find and run the package.
> To schedule a job to run the package copy the command line from the run
> package dialog and use this as the parameters for DTEXEC.
> John

Scheduled DTS package not running

I have created a DTS package to read data from a SQL Server table and copy it to an Excel file on one sheet. I have tested the DTS package manually and it runs. I scheduled the package but it keeps failing giving the following error message. The path to the Excel file is valid and the SQL server is connected to the server where the Excel file resides.

... DTSRun: Executing... DTSRun OnStart: Copy Data from vw_Symbols to vw_Symbols$ Step DTSRun OnError: Copy Data from vw_Symbols to vw_Symbols$ Step, Error = -2147467259 (80004005) Error string: 'S:\Mission Critical Enterprises\Current Projects\JPMC Aperture Rollout 05-100-1-0001\Symbol Requests\JPMC - Symbols Added.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. Error source: Microsoft JET Database Engine Help file: Help context: 5003044 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -534774783 (E01FFC01) Error string: 'S:\Mission Critical Enterprises\Current Projects\JPMC Aperture Rollout 05-100-1-0001\Symbol Requests\JPMC - Symbols Added.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. Error sour... Process Exit Code 1. The step failed.

Is S:\ a network-shared drive?

The Agent runs your package under its own account, so if S:\ is a network drive mapped under your account, it might not be visible to Agent's account.

You may create Agent Proxy to make package run under your account.|||

I have a same or pretty similar problem, but in my case it′s when a trying to schedule a DTS and leave a file in a share point tool. If you have some information or tips I will appreciate it.

This is the message error.

Executed as user: Server Name\CRMSandbox. ...Step_DTSExecuteSQLTask_1 DTSRun OnError: DTSStep_DTSExecuteSQLTask_1, Error = -2147467259 (80004005) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -329978796 (EC54EC54) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_1 DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2 DTSRun OnError: DTSStep_DTSExecuteSQLTask_2, Error = -2147467259 (80004005) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -329978796 (EC54EC54) Error string: Failur... Process Exit Code 2. The step failed.

Thanks.

Miguel

|||

Hi, with regards to creating "Agnet Proxy" have you any further information regarding this?

Thank you.

|||Search for "Creating SQL Server Agent Proxies" in Books Online.

Scheduled DTS package not running

I have created a DTS package to read data from a SQL Server table and copy it to an Excel file on one sheet. I have tested the DTS package manually and it runs. I scheduled the package but it keeps failing giving the following error message. The path to the Excel file is valid and the SQL server is connected to the server where the Excel file resides.

... DTSRun: Executing... DTSRun OnStart: Copy Data from vw_Symbols to vw_Symbols$ Step DTSRun OnError: Copy Data from vw_Symbols to vw_Symbols$ Step, Error = -2147467259 (80004005) Error string: 'S:\Mission Critical Enterprises\Current Projects\JPMC Aperture Rollout 05-100-1-0001\Symbol Requests\JPMC - Symbols Added.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. Error source: Microsoft JET Database Engine Help file: Help context: 5003044 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -534774783 (E01FFC01) Error string: 'S:\Mission Critical Enterprises\Current Projects\JPMC Aperture Rollout 05-100-1-0001\Symbol Requests\JPMC - Symbols Added.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. Error sour... Process Exit Code 1. The step failed.

Is S:\ a network-shared drive?

The Agent runs your package under its own account, so if S:\ is a network drive mapped under your account, it might not be visible to Agent's account.

You may create Agent Proxy to make package run under your account.|||

I have a same or pretty similar problem, but in my case it′s when a trying to schedule a DTS and leave a file in a share point tool. If you have some information or tips I will appreciate it.

This is the message error.

Executed as user: Server Name\CRMSandbox. ...Step_DTSExecuteSQLTask_1 DTSRun OnError: DTSStep_DTSExecuteSQLTask_1, Error = -2147467259 (80004005) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -329978796 (EC54EC54) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_1 DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2 DTSRun OnError: DTSStep_DTSExecuteSQLTask_2, Error = -2147467259 (80004005) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -329978796 (EC54EC54) Error string: Failur... Process Exit Code 2. The step failed.

Thanks.

Miguel

|||

Hi, with regards to creating "Agnet Proxy" have you any further information regarding this?

Thank you.

|||Search for "Creating SQL Server Agent Proxies" in Books Online.

Scheduled DTS package not running

I have created a DTS package to read data from a SQL Server table and copy it to an Excel file on one sheet. I have tested the DTS package manually and it runs. I scheduled the package but it keeps failing giving the following error message. The path to the Excel file is valid and the SQL server is connected to the server where the Excel file resides.

... DTSRun: Executing... DTSRun OnStart: Copy Data from vw_Symbols to vw_Symbols$ Step DTSRun OnError: Copy Data from vw_Symbols to vw_Symbols$ Step, Error = -2147467259 (80004005) Error string: 'S:\Mission Critical Enterprises\Current Projects\JPMC Aperture Rollout 05-100-1-0001\Symbol Requests\JPMC - Symbols Added.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. Error source: Microsoft JET Database Engine Help file: Help context: 5003044 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -534774783 (E01FFC01) Error string: 'S:\Mission Critical Enterprises\Current Projects\JPMC Aperture Rollout 05-100-1-0001\Symbol Requests\JPMC - Symbols Added.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. Error sour... Process Exit Code 1. The step failed.

Is S:\ a network-shared drive?

The Agent runs your package under its own account, so if S:\ is a network drive mapped under your account, it might not be visible to Agent's account.

You may create Agent Proxy to make package run under your account.|||

I have a same or pretty similar problem, but in my case it′s when a trying to schedule a DTS and leave a file in a share point tool. If you have some information or tips I will appreciate it.

This is the message error.

Executed as user: Server Name\CRMSandbox. ...Step_DTSExecuteSQLTask_1 DTSRun OnError: DTSStep_DTSExecuteSQLTask_1, Error = -2147467259 (80004005) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -329978796 (EC54EC54) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_1 DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2 DTSRun OnError: DTSStep_DTSExecuteSQLTask_2, Error = -2147467259 (80004005) Error string: Failure creating file. Error source: Microsoft JET Database Engine Help file: Help context: 5003436 Error Detail Records: Error: -2147467259 (80004005); Provider Error: -329978796 (EC54EC54) Error string: Failur... Process Exit Code 2. The step failed.

Thanks.

Miguel

|||

Hi, with regards to creating "Agnet Proxy" have you any further information regarding this?

Thank you.

|||Search for "Creating SQL Server Agent Proxies" in Books Online.

Scheduled DTS issue - copying of data

Hi all,
I have a problem.
I have a scheduled DTS package that runs every week that copies data
only from staging server to production into a table. When the job is
finished it states that all is successful. When I check the row count
for this table there is a discrepancy with what exists in prod to that
which exists in staging. In prod there is about 200,000 records
less. If I run the DTS job manually...then all is correct - rowcounts
are the same. When I run it from the schedule it does not.
Does anyone know why this is occurring and how to resolve the issue?
Thanks.Hi
You don't say which version of SQL Server you are running on, or if this is
a straight forward import/export or how you are handling errors.
Has data been added after the import has occurred?
John
"woohoo30@.hotmail.com" wrote:
> Hi all,
> I have a problem.
>
> I have a scheduled DTS package that runs every week that copies data
> only from staging server to production into a table. When the job is
> finished it states that all is successful. When I check the row count
> for this table there is a discrepancy with what exists in prod to that
> which exists in staging. In prod there is about 200,000 records
> less. If I run the DTS job manually...then all is correct - rowcounts
> are the same. When I run it from the schedule it does not.
> Does anyone know why this is occurring and how to resolve the issue?
> Thanks.
>|||On Nov 1, 12:20 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi
> You don't say which version of SQL Server you are running on, or if this is
> a straight forward import/export or how you are handling errors.
> Has data been added after the import has occurred?
> John
>
>
Hi John,
1st it truncates the table and then it does a transform of data on
staging to production server.
there are no errors...it says successful.
It inserts about 2million rows into the table...there is a discrepancy
of 200,000.
I don't understand why it's occurring and how to fix this issue.
woohoo30|||Hi
If you use a linked server to the staging server and use a INSERT... SELECT
statement from the live server does this bring all the rows you expect?
Does the live server have a primary key? Does the staged data have this key,
if not how many rows are unique for the primary key columns?
John
"woohoo30@.hotmail.com" wrote:
> On Nov 1, 12:20 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> > Hi
> >
> > You don't say which version of SQL Server you are running on, or if this is
> > a straight forward import/export or how you are handling errors.
> >
> > Has data been added after the import has occurred?
> >
> > John
> >
> >
> >
>
> Hi John,
> 1st it truncates the table and then it does a transform of data on
> staging to production server.
> there are no errors...it says successful.
> It inserts about 2million rows into the table...there is a discrepancy
> of 200,000.
> I don't understand why it's occurring and how to fix this issue.
> woohoo30
>

scheduled delete performance cost

What would be the performance cost if I deleted all the rows from a table in MSSQL every 5 minutes?

I'm doing this to keep track of whos online. Every time a user goes to a new page they get logged into a table called WhosOnline. Every 5 minutes the log will get deleted.

What would be the performance cost of this and if its high, does anyone know a better way to keep track of whos Online?Forget it, I figured out how to do it. SessionID & UserName in a database.

Friday, March 9, 2012

Schedule table

Where can I find an english translation of the values in fields ReccurrenceType, State, Daysofweek, and Type in the Schedule table of the ReportServer database?

Example what does it mean when RecurrenceType is equal to 2, or equal to 4?

Thanks

Don't query these tables directly... You should access this information via the SOAP management APIs.

The catalog database is not documented and we have no plans to retain compatibility with the schema moving forward.