Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Friday, March 30, 2012

regarding datetime in asp.net

hi ,

i had textbox which is used to enter datetime . in the database, the data type is date/time. now my requirement is when the textbox is empty. i want 2 store a default value. which value is suitable for datetime.

i had given as follows

if textbox12.text = "" then

textbox12.text = 5/5/2000 ---- it is storing this value.

end if

but if i want 2 update this date means it is not supporting . if i select current date using calender it was saved as 12/30/1899.

can anyone help me.

regards

m.arunachalam

You can try
textbox12.Text = DateTime.Today

Wednesday, March 28, 2012

Reg: Query Performence

Below query output results time taking very much.

SELECT NON EMPTY

{[Measures].[Score]} ON COLUMNS,

NON EMPTY {

(DESCENDANTS({[Organisation].[Organisation].&[36]},0),

[Question].[Type Id].[Category Id],

[Question].[Type Description].[Category Description],

[Question].[Short Description].[Short Description]

)}

HAVING [Measures].[Points]>0 ON ROWS

FROM (SELECT [Assignment].[Id].&[1] ON COLUMNS

FROM [Sample])

Total 7 dimensions 2 measure groups

Fact Table : 18,000,00 Records

Dimensions: 2000 Records

[Organisation].[Organisation] having 9 levels

like

Level1

Level2

LEVEl3

Is there any solution to improve the query performence.Any steps to inreasing performence of cube. Please help me. this is urgent for me

Could you please rewrite your query in terms of AdventureWorks?

reg Stored procedure Performance

Hi ,
I am facing a typical problem with Stored procedure performance. When i
excute my stored procedure first time it is taking around 60 seconds which i
s
not meeting expectations. when i excute the same sp second time with same
scenario it takes around 30 to 35 seconds. after this this behaviour is not
consistent. again if you ran sometimes it takes 50 seconds and sometimes it
takes 35 seconds like this. with this kind of behaviour i was not able to
figure it out my sp execution time exactly. my sp is having lot of dynamic
sql also.
Could anybody have any thoughts why the sp execution time is not consistent
for the same scenario.
Thanks in advance
BhaskarBhaskar wrote:
> Hi ,
> I am facing a typical problem with Stored procedure performance. When
> i excute my stored procedure first time it is taking around 60
> seconds which is not meeting expectations. when i excute the same sp
> second time with same scenario it takes around 30 to 35 seconds.
> after this this behaviour is not consistent. again if you ran
> sometimes it takes 50 seconds and sometimes it takes 35 seconds like
> this. with this kind of behaviour i was not able to figure it out my
> sp execution time exactly. my sp is having lot of dynamic sql also.
> Could anybody have any thoughts why the sp execution time is not
> consistent for the same scenario.
> Thanks in advance
> Bhaskar
SP duration should not be your primary source of performance tuning.
While it's important, it should follow examination of the execution
plans generated by the SP and the overall CPU consumed. Duration is
dependent on many factors like overall system CPU, lock contention,
physical vs. logical disk reads, etc. CPU, Reads, and Execution Plans
should be consistent across executions with the same parameters.
What you probably have is a poorly tuned procedure that is causing a lot
of reads, likely because of missing indexes or non-sargable expressions
in the queries. If that's the case, you'll see slower execution times
when SQL Server has to go to disk to read data as opposed to getting the
same from memory.
To properly tunes the query, examine the execution plan from Profiler or
Query Analyzer. You can use Profiler to see CPU, Duration, and Reads for
the individual statements and for the overall SP. 30 and 50 seconds are
both way too long for anything but a nightly batch process. You should
strive for times in the <100ms or better if possible.
If you see Table Scan or Clustered Index Scan operations, that's likely
the problem. Examine the query and see why indexes are not used. Could
be because there are no indexes available for the query to use or
because the expressions in the query are no optimizable.
For example:
WHERE LEFT(MyTable.MyCol, 1) = 'T'
is not optimizable even if an index exists on the MyCol column. Whereas,
WHERE MyTable.MyCol = 'T'
is optimizable when a MyCol index exists (still may not be used, but it
could be).
Post the DDL for your tables, indexes, and procedure if you need
specific help.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||On Thu, 25 Aug 2005 21:17:02 -0700, "Bhaskar"
<Bhaskar@.discussions.microsoft.com> wrote:
>I am facing a typical problem with Stored procedure performance. When i
>excute my stored procedure first time it is taking around 60 seconds which
is
>not meeting expectations. when i excute the same sp second time with same
>scenario it takes around 30 to 35 seconds. after this this behaviour is no
t
>consistent. again if you ran sometimes it takes 50 seconds and sometimes i
t
>takes 35 seconds like this. with this kind of behaviour i was not able to
>figure it out my sp execution time exactly. my sp is having lot of dynamic
>sql also.
>Could anybody have any thoughts why the sp execution time is not consistent
>for the same scenario.
There are a lot of reasons.
The most obvious is if other people are using the server, which has
only so much horsepower to split between users. Are we talking a
server-class machine here, RAID5 for the data, separate disk for the
log, gigabytes of RAM, dual processors or better?
The slow first run is because (a) the SP needs to be compiled, because
(b) the plan is not already in cache, and (c) the data is not yet
cached, either. A few physical reads and your performance goes right
out the window.
As Dave suggests, the road to wisdom starts with running profiler,
looking at plans, looking at statistics - and getting away from
dynamic SQL! And OF COURSE, making certain you have the proper
indexes.
But when you tell me the time varies, that's a pretty strong sign that
other users are contending with your performance, and likely a sign
that your server is too busy or too small.
J.

Monday, March 26, 2012

Reg -MDX in Query issue

Hi,
I am using the following query in reporting services
="With Member [Measures].[Time] as '[TimeDim].CurrentMember.UniqueName'
MEMBER [Measures].[DisplayTime] AS '[TimeDim].CurrentMember.Name' SELECT
{[Measures].[Time],[Measures].[DisplayTime]} on columns, {Descendants({" &
Parameters!Year.value & "},[TimeDim].[Actual Date],BEFORE)} on rows from
ICMDestinationService"
I have given even spaces between the Query.
I am getting the following error
An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
Cannot set the command text for data set 'Time_Dim'.
(rsErrorSettingCommandText) Get Online Help
Error during processing of the CommandText expression of dataset â'Time_Dimâ'.
(rsQueryCommandTextProcessingError)
Any ideas or solutionVerify the MDX runs in the MDX Sample Application first.
Also, make sure you are using Generic Query Designer - 3rd or 4th button to
the right of dataset dropdown in data window
Finally, be sure there are no carriage returns in the query.
If still having problems, see advice offered in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/olapasandrs.asp
--
-- "This posting is provided 'AS IS' with no warranties, and confers no
rights."
jhmiller@.online.microsoft.com
"Yalaman" <Yalaman@.discussions.microsoft.com> wrote in message
news:4BADB3C5-20E1-495C-B1A0-8914E30E34DE@.microsoft.com...
> Hi,
> I am using the following query in reporting services
> ="With Member [Measures].[Time] as '[TimeDim].CurrentMember.UniqueName'
> MEMBER [Measures].[DisplayTime] AS '[TimeDim].CurrentMember.Name' SELECT
> {[Measures].[Time],[Measures].[DisplayTime]} on columns, {Descendants({" &
> Parameters!Year.value & "},[TimeDim].[Actual Date],BEFORE)} on rows from
> ICMDestinationService"
> I have given even spaces between the Query.
>
> I am getting the following error
> An error has occurred during report processing. (rsProcessingAborted) Get
> Online Help
> Cannot set the command text for data set 'Time_Dim'.
> (rsErrorSettingCommandText) Get Online Help
> Error during processing of the CommandText expression of dataset 'Time_Dim'.
> (rsQueryCommandTextProcessingError)
> Any ideas or solution
>

REG : SQL JOBS

Hi,
Is there anyway that we would be able to get the start time of the job
when it was started manually..I already looked into all the tables related
to jobs and everything gets updated only after the completion of the job.But
i would like to know the start time as soon as the job is started..Not aware of any. A work around:
add a step at the very beginning of the job, put something like "select 1"
in it. Then check job history after starting the job.
HTH
Quentin
"Karthik" <nkvatsan@.hotmail.com> wrote in message
news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is there anyway that we would be able to get the start time of the job
> when it was started manually..I already looked into all the tables related
> to jobs and everything gets updated only after the completion of the
job.But
> i would like to know the start time as soon as the job is started..
>|||Click on the job in Enterprise manager and view job history
It gets the time from sysjobhistory in the msdb database.
Regards
John|||sysjobhistory is not updated after the completion of the job. It gets an
update (or insert) after the completion of every step of every job.
"Karthik" <nkvatsan@.hotmail.com> wrote in message
news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is there anyway that we would be able to get the start time of the job
> when it was started manually..I already looked into all the tables related
> to jobs and everything gets updated only after the completion of the
job.But
> i would like to know the start time as soon as the job is started..
>|||Thanks for the reply...Well thats what i meant.I dont want to add a step at
the beginning of every job because we have 300 jobs...But i was thinking of
modifying the sp_start_job proc..But was just wondering is there any
undocumented sp that will give the start time of the job as soon as it is
started..
"Quentin Ran" <quentinran@.yahoo.com> wrote in message
news:OJ6TXgHTDHA.2260@.TK2MSFTNGP12.phx.gbl...
> sysjobhistory is not updated after the completion of the job. It gets an
> update (or insert) after the completion of every step of every job.
> "Karthik" <nkvatsan@.hotmail.com> wrote in message
> news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> > Hi,
> > Is there anyway that we would be able to get the start time of the job
> > when it was started manually..I already looked into all the tables
related
> > to jobs and everything gets updated only after the completion of the
> job.But
> > i would like to know the start time as soon as the job is started..
> >
> >
>|||The reason i wanted to know the start time is that i want to send
notification to the right group about the jobs that are taking more time
than the average run duration.I did already write scripts for that. But it
works only if the jobs are on their normal schedule because i can get the
next_run_time from sysjobschedule table. But if somebody starts the job
manually, i would like to know the start time for that so that i would be
able to calculate the rest of the information based on the start time of the
job..I hope i am clear on what i said...
"Quentin Ran" <quentinran@.yahoo.com> wrote in message
news:u2wkO$HTDHA.2148@.TK2MSFTNGP11.phx.gbl...
> Don't see why you need to do such check for so many jobs. A couple or
many,
> you may look at sp_add_jobstep to add the dummy step if so desire.
> I believe you are aware of the fact that if you need to start a job after
> another one, you can do it in a separate job to launch them one after the
> other.
> Quentin
>
> "Karthik" <nkvatsan@.hotmail.com> wrote in message
> news:e26Rx4HTDHA.1576@.TK2MSFTNGP12.phx.gbl...
> > Thanks for the reply...Well thats what i meant.I dont want to add a step
> at
> > the beginning of every job because we have 300 jobs...But i was thinking
> of
> > modifying the sp_start_job proc..But was just wondering is there any
> > undocumented sp that will give the start time of the job as soon as it
is
> > started..
> > "Quentin Ran" <quentinran@.yahoo.com> wrote in message
> > news:OJ6TXgHTDHA.2260@.TK2MSFTNGP12.phx.gbl...
> > > sysjobhistory is not updated after the completion of the job. It gets
> an
> > > update (or insert) after the completion of every step of every job.
> > >
> > > "Karthik" <nkvatsan@.hotmail.com> wrote in message
> > > news:eoOSuHHTDHA.2120@.TK2MSFTNGP10.phx.gbl...
> > > > Hi,
> > > > Is there anyway that we would be able to get the start time of the
> job
> > > > when it was started manually..I already looked into all the tables
> > related
> > > > to jobs and everything gets updated only after the completion of the
> > > job.But
> > > > i would like to know the start time as soon as the job is started..
> > > >
> > > >
> > >
> > >
> >
> >
>

Reg - Passing parameters to MDX Queries

Hi,
I am trying to use parameters in MDX Queries From one data set to other data
Set I created a data set which gives me Time values.
I am using this as parameter value as I do in SQL Queries.
Ex -
SELECT {[Measures].[Unit Sales]} on columns,
ORDER([Promotion Media].[Media Type].members,[Measures].[Unit Sales],DESC)
on rows FROM SALES where @.Time
When run It does'nt populate the value for the @.Time parameter
When i preview the report it populates the parameter values but when the
report view button is clicked it fails to build the Query because it cannot
populate the string.
Is there any other way to use the parameters and pass the parameters in MDX
Queries?
if possible with Examples
Thanks,Hi!
In MDX, this is not so simple. Checkt the article at
http://www.databasejournal.com/features/mssql/article.php/10894_3386441_1
for the procedure.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Yalaman" <Yalaman@.discussions.microsoft.com> wrote in message
news:413ED68C-5AD5-4143-B079-1ADDE5DB6EF2@.microsoft.com...
> Hi,
> I am trying to use parameters in MDX Queries From one data set to other
data
> Set I created a data set which gives me Time values.
> I am using this as parameter value as I do in SQL Queries.
> Ex -
> SELECT {[Measures].[Unit Sales]} on columns,
> ORDER([Promotion Media].[Media Type].members,[Measures].[Unit Sales],DESC)
> on rows FROM SALES where @.Time
> When run It does'nt populate the value for the @.Time parameter
> When i preview the report it populates the parameter values but when the
> report view button is clicked it fails to build the Query because it
cannot
> populate the string.
>
> Is there any other way to use the parameters and pass the parameters in
MDX
> Queries?
> if possible with Examples
> Thanks,
>
>
>
>
>|||The OleDB provider for AS 2000 does not support parameterized MDX queries.
This MSDN article explains how to achieve parameterized MDX in RS 2000:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/olapasandrs.asp
In addition, you may want to download this sample:
http://www.microsoft.com/downloads/details.aspx?FamilyID=f9b6e945-1f4c-4b7c-9c83-c6801f0576ff&DisplayLang=en
BTW: RS 2005 Beta 2 contains graphical and text-based query designers for
MDX and DMX. They also support single-value parameters at this point.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:e6eUiDqrEHA.1964@.TK2MSFTNGP12.phx.gbl...
> Hi!
> In MDX, this is not so simple. Checkt the article at
> http://www.databasejournal.com/features/mssql/article.php/10894_3386441_1
> for the procedure.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "Yalaman" <Yalaman@.discussions.microsoft.com> wrote in message
> news:413ED68C-5AD5-4143-B079-1ADDE5DB6EF2@.microsoft.com...
> > Hi,
> >
> > I am trying to use parameters in MDX Queries From one data set to other
> data
> > Set I created a data set which gives me Time values.
> >
> > I am using this as parameter value as I do in SQL Queries.
> >
> > Ex -
> > SELECT {[Measures].[Unit Sales]} on columns,
> > ORDER([Promotion Media].[Media Type].members,[Measures].[Unit
Sales],DESC)
> > on rows FROM SALES where @.Time
> >
> > When run It does'nt populate the value for the @.Time parameter
> >
> > When i preview the report it populates the parameter values but when the
> > report view button is clicked it fails to build the Query because it
> cannot
> > populate the string.
> >
> >
> > Is there any other way to use the parameters and pass the parameters in
> MDX
> > Queries?
> > if possible with Examples
> >
> > Thanks,
> >
> >
> >
> >
> >
> >
> >
> >
> >
>

Refreshing Parameter values when a higher level Parameter changes

Hi All.

I have a parameter (hidden) that gets its value using an expression base on another parameter.
When in the designer, the first time when the designer loads I can select the Parameter that controls the child parameter (expression lies in the default value section). The value changes.

When I change the parent parameter again, the value of the child parameter does not seem to change.

How can I make this parameter change automatically when the parent is changed ?

Any help will be appreciated.

Thanks,
Neil

I know a little about this, mainly because i have spent a lot of time doing the reverse - breaking the linkage so that parameters don't update when another changes.

The linkage between parameters is achieved via the ParameterDefinition nodes under the Dataset/Query/rd:MdxQuery/Query/Statement* node. These can be added, but can be hard to get right (it is easy to take them out, hard to put them in). What can be the easiest thing to do is create a new report with just the parent and child (hidden) parameters, by default the designer will make the child one dependant on the parent parameter, and you can then check the generated rdl to see how it is done.

Hope this helps!

*this is based on a report that uses a cube and MDX, i don't have a SQL one to hand that i can give an example from.

|||Thank you!

well, this was a point into the right direction.. I landed up setting the available values to the parent parameter and then whenever the parent parameter changed, so did this child one...

Thanks for the help!!

Refreshing links in frontend

Hi everyone,
Could someone explain to me how to refresh the links to my sql server?
Each time i modify or create a field in a table, the modifications are
not implented in the front-end. How can i resolve this.
Greetings,
StefanieAre you selecting from views with SELECT *? In this case, check out
sp_refreshview in the Books Online.
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"Stefanie Pindew" <spindew@.yahoo.com> wrote in message
news:ehJkMpZXDHA.1004@.TK2MSFTNGP12.phx.gbl...
> Hi everyone,
> Could someone explain to me how to refresh the links to my sql server?
> Each time i modify or create a field in a table, the modifications are
> not implented in the front-end. How can i resolve this.
> Greetings,
> Stefanie
>|||Or are you referring to an Access front end? In that case,
you can use the Linked Table Manager or do it
programmatically with the refresh method of the tabledefs
collection.
--Sue
On Fri, 08 Aug 2003 12:46:17 +0200, Stefanie Pindew
<spindew@.yahoo.com> wrote:
>Hi everyone,
>Could someone explain to me how to refresh the links to my sql server?
>Each time i modify or create a field in a table, the modifications are
>not implented in the front-end. How can i resolve this.
>Greetings,
>Stefanie|||>--Original Message--
>Or are you referring to an Access front end? In that case,
>you can use the Linked Table Manager or do it
>programmatically with the refresh method of the tabledefs
>collection.
>--Sue
>On Fri, 08 Aug 2003 12:46:17 +0200, Stefanie Pindew
><spindew@.yahoo.com> wrote:
>>Hi everyone,
>>Could someone explain to me how to refresh the links to
my sql server?
>>Each time i modify or create a field in a table, the
modifications are
>>not implented in the front-end. How can i resolve this.
>>Greetings,
>>Stefanie
>.
>Hi,
I want it do it programmatically in the access front-end
and in the access adp front-end|||Stefanie,
I've just checked the following code and it works:
Dim tdLoop As TableDef
For Each tdLoop In CurrentDb.TableDefs
tdLoop.RefreshLink
Next
However, I can remember having problems when using the
.RefreshLink method... Give it a try though.
Regards,
Danny
"Stefanie Pindew" <spindew@.lollo.com> wrote in message news:02f201c35fee$71d670c0$a001280a@.phx.gbl...
> >--Original Message--
> >Or are you referring to an Access front end? In that case,
> >you can use the Linked Table Manager or do it
> >programmatically with the refresh method of the tabledefs
> >collection.
> >
> >--Sue
> >
> >On Fri, 08 Aug 2003 12:46:17 +0200, Stefanie Pindew
> ><spindew@.yahoo.com> wrote:
> >
> >>Hi everyone,
> >>
> >>Could someone explain to me how to refresh the links to
> my sql server?
> >>Each time i modify or create a field in a table, the
> modifications are
> >>not implented in the front-end. How can i resolve this.
> >>
> >>Greetings,
> >>
> >>Stefanie
> >
> >.
> >Hi,
> I want it do it programmatically in the access front-end
> and in the access adp front-end|||>--Original Message--
>Stefanie,
>I've just checked the following code and it works:
>Dim tdLoop As TableDef
>For Each tdLoop In CurrentDb.TableDefs
> tdLoop.RefreshLink
>Next
>However, I can remember having problems when using the
>..RefreshLink method... Give it a try though.
>Regards,
>Danny
>
>"Stefanie Pindew" <spindew@.lollo.com> wrote in message
news:02f201c35fee$71d670c0$a001280a@.phx.gbl...
>> >--Original Message--
>> >Or are you referring to an Access front end? In that
case,
>> >you can use the Linked Table Manager or do it
>> >programmatically with the refresh method of the
tabledefs
>> >collection.
>> >
>> >--Sue
>> >
>> >On Fri, 08 Aug 2003 12:46:17 +0200, Stefanie Pindew
>> ><spindew@.yahoo.com> wrote:
>> >
>> >>Hi everyone,
>> >>
>> >>Could someone explain to me how to refresh the links
to
>> my sql server?
>> >>Each time i modify or create a field in a table, the
>> modifications are
>> >>not implented in the front-end. How can i resolve
this.
>> >>
>> >>Greetings,
>> >>
>> >>Stefanie
>> >
>> >.
>> >Hi,
>> I want it do it programmatically in the access front-end
>> and in the access adp front-end
>
>.
>He thanks man, it works for me too|||Stefanie,
There are some issues with using .RefreshLink with Access97,
but I can't remember what they are. In case you have any
problems, I ended up implementing a solution that deleted the
linked tables from within Access and then re-linked them.
Both tasks can be accomplished using the DoCmd object:
DoCmd.DeleteObject
DoCmd.TransferDatabase
Email me if you want some sample code.
Regards,
Danny
"Stefanie Pindew" <spindew@.lollo.com> wrote in message news:066501c35ffe$995740b0$a301280a@.phx.gbl...
> >--Original Message--
> >Stefanie,
> >
> >I've just checked the following code and it works:
> >
> >Dim tdLoop As TableDef
> >For Each tdLoop In CurrentDb.TableDefs
> > tdLoop.RefreshLink
> >Next
> >
> >However, I can remember having problems when using the
> >..RefreshLink method... Give it a try though.
> >
> >Regards,
> >Danny
> >
> >
> >"Stefanie Pindew" <spindew@.lollo.com> wrote in message
> news:02f201c35fee$71d670c0$a001280a@.phx.gbl...
> >>
> >> >--Original Message--
> >> >Or are you referring to an Access front end? In that
> case,
> >> >you can use the Linked Table Manager or do it
> >> >programmatically with the refresh method of the
> tabledefs
> >> >collection.
> >> >
> >> >--Sue
> >> >
> >> >On Fri, 08 Aug 2003 12:46:17 +0200, Stefanie Pindew
> >> ><spindew@.yahoo.com> wrote:
> >> >
> >> >>Hi everyone,
> >> >>
> >> >>Could someone explain to me how to refresh the links
> to
> >> my sql server?
> >> >>Each time i modify or create a field in a table, the
> >> modifications are
> >> >>not implented in the front-end. How can i resolve
> this.
> >> >>
> >> >>Greetings,
> >> >>
> >> >>Stefanie
> >> >
> >> >.
> >> >Hi,
> >>
> >> I want it do it programmatically in the access front-end
> >> and in the access adp front-end
> >
> >
> >.
> >He thanks man, it works for me too

refreshing database before restart

i am running a game from a dedi box .. ms sql..

and every time i restart and put it back up ,,,,it rewinds the database

the only way i can prevent this is if i restart the server

wait a phew hours then put it back up ,,"which makes it the same way it was when i logged off"

i was told that sql database servers refresh every hour.

is there a way i can make it refresh before i restart it so then i can put the server straight back up

\

\

\

if i restart the server back up straight away it does a rewind for some reason.

\

\

tech ::

the server does a rewind because it wouldn't have saved the game so to speak - as in updated everyone's characters. So yes waiting is the only way as far as I know to save the game.

This must be wrapped up in the game's logic where it keeps one database transaction open for a long time (like an hour).

Proper database behavior is that if an update transaction is never committed by the application, the updates are rolled back (rewound) if for any reason the connection is broken.

There is NOTHING in SQL that limits updates to that kind of frequency.

Unfortunately, you need to talk to whoever made/runs the game. They can chat with us and we'll help them.

|||ok thanks for ypur help anyway

Refreshing a CSV file using DTS

I have a DTS job that populates a CSV file on a regular basis.
It appears that by default, each time the job runs the contents of the file
are overwritten with the new data from SQL Server.
Can anyone that confirm that this is the case?
And is it possible to have DTS append to rather than overwrite the contents
of the file?
That's correct...the default is to overwrite.
The append option isn't supported with the text file
provider. The workaround is generally to generate a second
file and then use FileSystemObject to create a single file
or a dos copy command to combine the two file into a third
file.
-Sue
On Thu, 24 Feb 2005 07:22:52 -0800, "Dave" <dave@.nospam.ru>
wrote:

>I have a DTS job that populates a CSV file on a regular basis.
>It appears that by default, each time the job runs the contents of the file
>are overwritten with the new data from SQL Server.
>Can anyone that confirm that this is the case?
>And is it possible to have DTS append to rather than overwrite the contents
>of the file?
>
sql

Refreshing a CSV file using DTS

I have a DTS job that populates a CSV file on a regular basis.
It appears that by default, each time the job runs the contents of the file
are overwritten with the new data from SQL Server.
Can anyone that confirm that this is the case?
And is it possible to have DTS append to rather than overwrite the contents
of the file?That's correct...the default is to overwrite.
The append option isn't supported with the text file
provider. The workaround is generally to generate a second
file and then use FileSystemObject to create a single file
or a dos copy command to combine the two file into a third
file.
-Sue
On Thu, 24 Feb 2005 07:22:52 -0800, "Dave" <dave@.nospam.ru>
wrote:

>I have a DTS job that populates a CSV file on a regular basis.
>It appears that by default, each time the job runs the contents of the file
>are overwritten with the new data from SQL Server.
>Can anyone that confirm that this is the case?
>And is it possible to have DTS append to rather than overwrite the contents
>of the file?
>

Refreshing a CSV file using DTS

I have a DTS job that populates a CSV file on a regular basis.
It appears that by default, each time the job runs the contents of the file
are overwritten with the new data from SQL Server.
Can anyone that confirm that this is the case?
And is it possible to have DTS append to rather than overwrite the contents
of the file?That's correct...the default is to overwrite.
The append option isn't supported with the text file
provider. The workaround is generally to generate a second
file and then use FileSystemObject to create a single file
or a dos copy command to combine the two file into a third
file.
-Sue
On Thu, 24 Feb 2005 07:22:52 -0800, "Dave" <dave@.nospam.ru>
wrote:
>I have a DTS job that populates a CSV file on a regular basis.
>It appears that by default, each time the job runs the contents of the file
>are overwritten with the new data from SQL Server.
>Can anyone that confirm that this is the case?
>And is it possible to have DTS append to rather than overwrite the contents
>of the file?
>

Friday, March 23, 2012

Refresh of Data in Crystal Report

Hello,

I'm developing Crystal Report and data is being fetched using Query. Now each time I "run" report, I get stale data. I tested query several times and that is working fine.

I also checked that,

1. File->Report Options-> Save Data with Report is UNChecked.
2. File->Options->Reporting->Save Data with Report is UNChecked.
3. File->Options->Reporting->Discard Saved Data while Loading Report is Checked.

Whenever I open report, I only see Design tab and no Preview tab. however, on running report, I get stale data. Please let me know if you know solution to this problem.

Thanks a lot in Advance,
Regards,
RupeshI am having a very similar problem. I just gave one of our users a new computer. She was running windows 2000 and she is now running windows xp. I installed crystal reports for her and imported all of her ODBC settings from the old computer to the new computer. There are two crystal reports that when she opens them, it only shows the "design tab", but no "preview tab". When I go back and open those two reports from her old computer, they open fine. I see that nobody responded to your post. Did you ever find a solution to the problem?

Thanks - Jeff|||Rupsan,
What do you mean by stale data?
Also what Ver are you using?

Texasman,
The reason your preview tab does not show up is because the savedata box is not checked in report options.|||ya exactly dear when you uncheck the save data you don't find any preview tab if you want preview click on print preview in report you will find it.

and rupsan i also don't understand what stale data means.

thanks|||I have the same issue. I have unchecked (and checked) the appropriate boxes as did the OP. On open, I do not get a preview tab (This is what I expected). However, on refresh the data on my report is last weeks data. I looked directly at the data table and there have been several additional entries that are not shown on the report. I have disconnected and reconnected to the databse, all to no avail. Can anyone figure this out?? Thanks.

Refresh Memory Usage History in Taskman

Hi,
After some time, my server Memory Usage History run up to 80%-90% even the
server does not have any connection in it.
This is server running only MS SQL 2000 + IIS in Win2K Server.
I was wondering that, by using the Win / WMI command to refresh / reset
this Memory Usage History.
Does anyone try this before or any ideal from you all?
Thank you.....
--
Regard,
Kzeto ngHave a look at
INF: SQL Server Memory Usage
http://support.microsoft.com/default.aspx?scid=kb;en-us;q321363
http://www.mssqlserver.com/faq/troubleshooting-memoryleak.asp
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Kzeto ng" <kzetong@.yahoo.com> wrote in message news:eVe2I3kuDHA.3196@.TK2MSFTNGP11.phx.gbl...
> Hi,
> After some time, my server Memory Usage History run up to 80%-90% even the
> server does not have any connection in it.
> This is server running only MS SQL 2000 + IIS in Win2K Server.
> I was wondering that, by using the Win / WMI command to refresh / reset
> this Memory Usage History.
> Does anyone try this before or any ideal from you all?
> Thank you.....
> --
> Regard,
> Kzeto ng
>
>|||How much memory do you have, how much is assigned to SQL (see SQL
configuration parameters)?
And how much is the threshold set for IIS (check your machine.config file)?
Willy.
"Kzeto ng" <kzetong@.yahoo.com> wrote in message
news:eVe2I3kuDHA.3196@.TK2MSFTNGP11.phx.gbl...
> Hi,
> After some time, my server Memory Usage History run up to 80%-90% even
the
> server does not have any connection in it.
> This is server running only MS SQL 2000 + IIS in Win2K Server.
> I was wondering that, by using the Win / WMI command to refresh / reset
> this Memory Usage History.
> Does anyone try this before or any ideal from you all?
> Thank you.....
> --
> Regard,
> Kzeto ng
>
>

Wednesday, March 21, 2012

Referring to Sql connection string in web.config from code behind

Every time I move my project from my computer to the testing server I have to change the connection string references in the aspx side and in my code behind.

For the code behind I declared the SqlConnection string at the top of the code-behind page for both connection strings and comment out the one not in use. Obviously I then comment out the string not in use in the WebConfig as well.

Being superlatively lazy I always look for the easiest and quickest way to do most anything - connection strings included. Having to comment out strings twice brought rise to the question of whether I can refer to the connection string in the web.config file from the code-behind page. I'm sure it can be done, and I did a good amount of hunting around, but I couldn't find any examples of code that would do that.

Currently, as I said above, I have two connection strings declared at the top of my code-behind. Here's an example of one:

Private sqlConnAs New SqlConnection("Data Source=DATABASESERVER;Initial Catalog=DATABASE;User ID=USER;Password=PASSWORD")

Then, I just use sqlConn as usual in my binding without having to "dim" it in every sub:

sdaPersonnel =New SqlDataAdapter(strSqlPersonnel, sqlConn)

Then there's the SqlConnections set up by the wizard on the aspx side:

<asp:SqlDataSource ID="sqlDataSourcePayrollCompany" Runat="Server" ConnectionString="<%$ ConnectionStrings:DATABASECONNECTIONSTRING%>" ...>

And for the connection in the web.config:

<add name="DATABASECONNECTIONSTRING" connectionString="Data Source=DATABASESERVER;Initial Catalog=DATABASE;User ID=USER;Password=PASSWORD" providerName="System.Data.SqlClient" />

So, what would be the code in the code-behind page to refer to the connection string in the web.config file?

Thanks!

To refer to the connection string via code: ConfigurationManager.ConnectionStrings["<ConnectionStringName>"]|||

Hey, Stiletto, Thanks! That did the trick (or, at least, it got me on the right track). I wasn't exaclty sure how to actually add that to my connection string code, so I had to do some hunting and trying different syntax, but ended up with this working:

Private sqlConnAs New SqlConnection(ConfigurationManager.ConnectionStrings("DATABASECONNECTIONSTRING").ConnectionString)
Thanks again!

Referencing to System.Data.SqlServerCe causes large files to deploy to Emulator

Hello everyone,

This is my first time posting here, I hope this questions has not been asked before. I tried to search for it but I came not with nothing.

Recreating the error :

I am using VS2005. I created a Pocket PC 2003 project.
I have downloaded the SQL Server Compact Edition and installed it. I get the System.Data.SqlServerCe.dll file from the installation directory.
I reference to that DLL using Add Reference in VS2005.

Build it. In the Bin folder, a long list of files suddenly appears.

System.data.dll

System.data.oracleClient.dll

system.web.dll

system.enterpriseservices.dll

system.enterpriseservices.wrapper.dll

system.transactions.dll

and the rest of your original files in Bin

The worst of it all, all of these files are deployed into the Emulator! Causing it to run out of memory and unable to deploy.

Something is not right here, I just cannot figure it out! If this happens, each mobile devices can hold one applications. Thats not the way it should be, right?

If you have solved this before, do help. I am at my wits end at the moment.

Thanking you in advance.

Sincerely,
Lasker

That means you have a reference to some desktop DLL(s) which brings pretty much entire desktop framework with it. It might be desktop version of System.Data.SqlServerCe.dll or it might be any other desktop DLL you’re referencing. You’d need to remove that reference and replace it with device one.

Referencing to System.Data.SqlServerCe causes large files to deploy to Emulator

Hello everyone,

This is my first time posting here, I hope this questions has not been asked before. I tried to search for it but I came not with nothing.

Recreating the error :

I am using VS2005. I created a Pocket PC 2003 project.
I have downloaded the SQL Server Compact Edition and installed it. I get the System.Data.SqlServerCe.dll file from the installation directory.
I reference to that DLL using Add Reference in VS2005.

Build it. In the Bin folder, a long list of files suddenly appears.

System.data.dll

System.data.oracleClient.dll

system.web.dll

system.enterpriseservices.dll

system.enterpriseservices.wrapper.dll

system.transactions.dll

and the rest of your original files in Bin

The worst of it all, all of these files are deployed into the Emulator! Causing it to run out of memory and unable to deploy.

Something is not right here, I just cannot figure it out! If this happens, each mobile devices can hold one applications. Thats not the way it should be, right?

If you have solved this before, do help. I am at my wits end at the moment.

Thanking you in advance.

Sincerely,
Lasker

That means you have a reference to some desktop DLL(s) which brings pretty much entire desktop framework with it. It might be desktop version of System.Data.SqlServerCe.dll or it might be any other desktop DLL you’re referencing. You’d need to remove that reference and replace it with device one.

Monday, March 12, 2012

Reference Materials

Reference Materials
I am having a hard time finding good reference materials for Reporting
Services; especially information online. For one I canâ't find a good resource
for writing expressions, examples, tutorials etc. Just the other day I saw
the use of â'vbcrlfâ' in an expression, but when looking for information on it
I canâ't find a single thing. Iâ'm really at a loss as to what can or canâ't be
done. Anyone know of any good websites on MS Reporting Services?Hi Tome:
Do you have the documentation material?
http://www.microsoft.com/downloads/details.aspx?familyid=5e550d73-8f35-435e-bb71-c8573a1cdbdb&displaylang=en
--
Scott
http://www.OdeToCode.com/
On Sun, 10 Oct 2004 09:45:03 -0700, Tome73
<Tome73@.discussions.microsoft.com> wrote:
>Reference Materials
>I am having a hard time finding good reference materials for Reporting
>Services; especially information online. For one I can?t find a good resource
>for writing expressions, examples, tutorials etc. Just the other day I saw
>the use of ?vbcrlf? in an expression, but when looking for information on it
>I can?t find a single thing. I?m really at a loss as to what can or can?t be
>done. Anyone know of any good websites on MS Reporting Services?|||The problem with the documentation on expressions is that they leave out one
very very important fact. Three namespaces are included that you can use in
expressions. For instance you can use anything from microsoft.visualbasic,
system.convert (very very important for expressions) and system.math. This
opens up a whole world of additional functionality. So, go to visual basic
documentation on these namespaces and you will be ready to roll.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Tome73" <Tome73@.discussions.microsoft.com> wrote in message
news:83100312-648A-4D36-81D2-19E3A4FAAF30@.microsoft.com...
> Reference Materials
> I am having a hard time finding good reference materials for Reporting
> Services; especially information online. For one I can't find a good
resource
> for writing expressions, examples, tutorials etc. Just the other day I saw
> the use of "vbcrlf" in an expression, but when looking for information on
it
> I can't find a single thing. I'm really at a loss as to what can or can't
be
> done. Anyone know of any good websites on MS Reporting Services?
>

Wednesday, March 7, 2012

Reduction of Query Execution Time of Larger Database in SQL

I am having a database in SQL which is of size 6GB. My application will be
logging the data into database, which makes increases the size of
database.(currently it is growing by 10%).
I am running a query againest the database, which refers many tables, which
is taking around 5 Minutes. I am having many such queries which i use to
generate the reports. Now i want to reduce the Query Execution time, without
deleting the data. I am thinking of the below 4 possibilities:
1) Indexing has to be introduced/modified.
2.) We may restrict the database growth by specifying the size (currently it
is growing by 10%).
3.) Moving the inline sql to the database level as stored procedures
4. )Breaking the large and complex queries into fragments (Needs some
database expert
Which of the above options is better. Is there is any other way to reduce
the Query Execution time?> 1) Indexing has to be introduced/modified.
You can never have efficient queries on tables of that size without
proper indexing. This is a must.

> 2.) We may restrict the database growth by specifying the size (currently
> it
> is growing by 10%).
What are you going to do about new rows? You can't simply stop growth by
setting a limit on the size. Well you can but you will get errors when you
attempt to insert new rows after you reached that size limit.

> 3.) Moving the inline sql to the database level as stored procedures
That is always a good idea.

> 4. )Breaking the large and complex queries into fragments (Needs some
> database expert
Hard to say. I would tackle the others first.
Andrew J. Kelly SQL MVP
"uday" <uday@.discussions.microsoft.com> wrote in message
news:90B8A1F9-07A5-45E0-BB63-605BB4F86634@.microsoft.com...
>I am having a database in SQL which is of size 6GB. My application will be
> logging the data into database, which makes increases the size of
> database.(currently it is growing by 10%).
> I am running a query againest the database, which refers many tables,
> which
> is taking around 5 Minutes. I am having many such queries which i use to
> generate the reports. Now i want to reduce the Query Execution time,
> without
> deleting the data. I am thinking of the below 4 possibilities:
> 1) Indexing has to be introduced/modified.
> 2.) We may restrict the database growth by specifying the size (currently
> it
> is growing by 10%).
> 3.) Moving the inline sql to the database level as stored procedures
> 4. )Breaking the large and complex queries into fragments (Needs some
> database expert
> Which of the above options is better. Is there is any other way to reduce
> the Query Execution time?|||> 1) Indexing has to be introduced/modified.
Definitely a good idea. Use SQL Profiler and the Index Tuning Wizard on a
typical DML load.

> 2.) We may restrict the database growth by specifying the size (currently
it
> is growing by 10%).
Why? Just make sure to backup your data regularly, including frequent
Transaction Log backups.

> 3.) Moving the inline sql to the database level as stored procedures
That might seriously improve performance.

> 4. )Breaking the large and complex queries into fragments (Needs some
> database expert
Be careful not to break the ACID properties of any transaction. Read more
here:
http://msdn.microsoft.com/library/d...r />
_2it2.asp
ML|||Hi actually my database has the indexes andprimary keys. Only 1 0r 2 tables
are not having indexes , but they are having proper primary keys and foreign
keys. I only meant to modify them also. After proper indexing also it is
taking too long. For Ex one query took 25 minutes to execute today. I want t
o
reduce that execution time. So can u please say what are the other measures
which i can use.
"ML" wrote:

> Definitely a good idea. Use SQL Profiler and the Index Tuning Wizard on a
> typical DML load.
>
> Why? Just make sure to backup your data regularly, including frequent
> Transaction Log backups.
>
> That might seriously improve performance.
>
> Be careful not to break the ACID properties of any transaction. Read more
> here:
> http://msdn.microsoft.com/library/d.../>
06_2it2.asp
>
> ML|||For this we'd have to see the DDL and some sample data.
ML

Reducing the size of the transaction log file

At this time I am only playing with the applications that generate the data and send it to the database. Without doing too much, and with deleting most data tables that were created, my transaction log file has grown over a gigabyte. I tried using the SQL server management studio (express) to shrink the database (tried shrinking files, too) but that did not make the file smaller. Right now there is hardly any data in the database (6 tables, a dozen columns and rows each) so it must be old transactions that are kept in the log. How do I get rid of the old data and make the file size smaller? Thanks.
KamenHi,

I had the same issue yesterday, i had to, Backup the log file then use shrink, backup one moore time and shrink.|||1. Check your database 'Recovery Model', set it according to your requirement.
2. Make a backup plan matching your data sensitivity & requirement as well as schedule it.
3. Plan Log backup along with Log Truncate option.

Refer Books OnLine from SQL Query Analyzer.|||Thank you very much!
Kamen