Sunday, March 25, 2012
Comparing datetime fields results in slow query performance
I am currently deduping a data warehouse containing around 3 million
records. Most of my dedupe scripts run in 3 or 4 minutes but the
scripts which compare datetime fields take up to 3 hours. I have a
non-clustered index on the date column. Can anybody offer any advice on
how I might improve query times please?
Thanks,
Charlie.which version of SQL Server? (2000 or 2005)
what the index plan says?
what type of comparison do you do?
what the index tunning wizard says against your query?
comparing date/time is slower then comparing integer.
<chairleg@.gmail.com> wrote in message
news:1137577249.061546.244550@.g43g2000cwa.googlegroups.com...
> Hi,
> I am currently deduping a data warehouse containing around 3 million
> records. Most of my dedupe scripts run in 3 or 4 minutes but the
> scripts which compare datetime fields take up to 3 hours. I have a
> non-clustered index on the date column. Can anybody offer any advice on
> how I might improve query times please?
> Thanks,
> Charlie.
>|||In addition to the previous post, my guess is you use the columns inside an
expression, so they are not Searchable ARGuments (SARGs) anymore. Try to
rewrite the queries to have the indexed datetime columns without an
expression in the Where clause. For example:
create table a
(a datetime)
create index aa on a(a)
insert into a values ('2006-01-16')
insert into a values ('2006-01-17')
go
select a from a
where datediff(dd,a,getdate()) < 2 -- this query should do an index scan
select a from a
where dateadd(dd,-1,convert(char(10),getdate(),112)) = a -- this query
should do an index seek
However, take care you get correct results - don't forget that you always
have time part in the datetime data. You should check if the Between
operator would be useful for you.
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message
<chairleg@.gmail.com> wrote in message
news:1137577249.061546.244550@.g43g2000cwa.googlegroups.com...
> Hi,
> I am currently deduping a data warehouse containing around 3 million
> records. Most of my dedupe scripts run in 3 or 4 minutes but the
> scripts which compare datetime fields take up to 3 hours. I have a
> non-clustered index on the date column. Can anybody offer any advice on
> how I might improve query times please?
> Thanks,
> Charlie.
>
Comparing datetime fields results in slow query performance
I am currently deduping a data warehouse containing around 3 million
records. Most of my dedupe scripts run in 3 or 4 minutes but the
scripts which compare datetime fields take up to 3 hours. I have a
non-clustered index on the date column. Can anybody offer any advice on
how I might improve query times please?
Thanks,
Charlie.
which version of SQL Server? (2000 or 2005)
what the index plan says?
what type of comparison do you do?
what the index tunning wizard says against your query?
comparing date/time is slower then comparing integer.
<chairleg@.gmail.com> wrote in message
news:1137577249.061546.244550@.g43g2000cwa.googlegr oups.com...
> Hi,
> I am currently deduping a data warehouse containing around 3 million
> records. Most of my dedupe scripts run in 3 or 4 minutes but the
> scripts which compare datetime fields take up to 3 hours. I have a
> non-clustered index on the date column. Can anybody offer any advice on
> how I might improve query times please?
> Thanks,
> Charlie.
>
|||In addition to the previous post, my guess is you use the columns inside an
expression, so they are not Searchable ARGuments (SARGs) anymore. Try to
rewrite the queries to have the indexed datetime columns without an
expression in the Where clause. For example:
create table a
(a datetime)
create index aa on a(a)
insert into a values ('2006-01-16')
insert into a values ('2006-01-17')
go
select a from a
where datediff(dd,a,getdate()) < 2 -- this query should do an index scan
select a from a
where dateadd(dd,-1,convert(char(10),getdate(),112)) = a -- this query
should do an index seek
However, take care you get correct results - don't forget that you always
have time part in the datetime data. You should check if the Between
operator would be useful for you.
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message
<chairleg@.gmail.com> wrote in message
news:1137577249.061546.244550@.g43g2000cwa.googlegr oups.com...
> Hi,
> I am currently deduping a data warehouse containing around 3 million
> records. Most of my dedupe scripts run in 3 or 4 minutes but the
> scripts which compare datetime fields take up to 3 hours. I have a
> non-clustered index on the date column. Can anybody offer any advice on
> how I might improve query times please?
> Thanks,
> Charlie.
>
sqlsql
Sunday, March 11, 2012
Compare Queries
Put both queries in the same query window and run them. Then the
percentiles will reflect both queries. Therefore, if query1 and its
functions use 25% and query2 and its functions use 75%, that suggests that
query1 is more efficient. However, UDFs (and some other functions) do
degrade the reliability of these numbers. Still, it is a good first take.
However, running both queries repeatly and getting a set of actual execution
times for each will, in the final analysis, be a more accurate measure of
the queries.
RLF
"Chris" <nospam@.nospam.com> wrote in message
news:emgxeRbuHHA.3796@.TK2MSFTNGP02.phx.gbl...
>I am creating an SP. I want to compare alternative ways of writing the
>query to see which one is the most efficient. I am trying to use the
>execution plan but it doesn't give an overall cost of the query so I can
>compare it to the alternative query. Rather I get a break down of the
>various steps (this query uses functions which produce aggregates and these
>steps are included in the execution plan) . I want to explore the steps
>later, at this point I just want to compare the two queries as a whole.
>What is the best way of going about this? Regards, Chris.
>
On Jun 29, 1:02 am, "Chris" <nos...@.nospam.com> wrote:
> The wording is a bit unclear. My SP could potentially contain a variety of
> variables obtained from sub queries etc. This means there will be more than
> just two queries to compare. How would you deal with a more complex scenario
> with SP's that use temp tables or subqueries etc.
> Regards, Chris.
> "Russell Fields" <russellfie...@.nomail.com> wrote in message
> news:emDSzebuHHA.4916@.TK2MSFTNGP04.phx.gbl...
>
>
>
>
> - Show quoted text -
Make each version of your SP. Then capture in profiler
SP:StatementCompleted
with read,writes,duration,CPU
You need to clear database and procedure cache before each
execution of SP to have accurate values
DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
Compare feilds in seperate databases on seperate servers
I want to run an update script where a field in a table in a database on a
server is equal to another field in a table in a database on a seperate
server. Here are the details:
Server 1:
Server name - Server1\Logi
Database - Ascent
Table - _customers
Field - email
Server 2:
Server name - Server2\Web
Database - ProductCart
Table - customers
Field - email
I want to update a field called 'flag' to equal 1 where the email addresses
are equal.
Can anyone help?To do this right we'd have to see more DDL - particulary interested in keys.
ML
http://milambda.blogspot.com/|||Hi
assuming you are on Server1\Logi, you can do something like
sp_addlinkedserver Web, @.srvproduct='', @.provider='SQLNCLI',
@.datasrc='Server2\WEB'
update _customers set flag = 1
from _customers a inner join Web.ProductCart.dbo.customers b on a.email =
b.email
exec sp_dropserver Web
Note that you should take care about proper credentials when connecting to
the linked server - read BOL about sp_addlinkedserver sproc. It is possible
also that it might be better to join tables on other column[s], but you did
not give any info on this.
HTH
Peter|||Hi Peter,
Thanks for the reply. I ran your script but got the following error:
Server: Msg 446, Level 16, State 9, Line 4
Cannot resolve collation conflict for equal to operation.
Any ideas what this means?
Darren
"Rogas69" <rogas69@.no_spamers.o2.ie> wrote in message
news:OAH9afjAGHA.1460@.TK2MSFTNGP14.phx.gbl...
> Hi
> assuming you are on Server1\Logi, you can do something like
> sp_addlinkedserver Web, @.srvproduct='', @.provider='SQLNCLI',
> @.datasrc='Server2\WEB'
> update _customers set flag = 1
> from _customers a inner join Web.ProductCart.dbo.customers b on a.email =
> b.email
> exec sp_dropserver Web
> Note that you should take care about proper credentials when connecting to
> the linked server - read BOL about sp_addlinkedserver sproc. It is
> possible also that it might be better to join tables on other column[s],
> but you did not give any info on this.
> HTH
> Peter
>|||You have to make sure that they are using the same collation to join
them, sample below:
Select * FROM
sometable localtable
Inner join
SomeotherServer.Database.Owner.SomeTable linkedtable
WHERE linkedserv.Somecolumn COLLATE SQL_Latin1_General_CP1_CI_AI =3D
localtable.somecolumn COLLATE SQL_Latin1_General_CP1_CI_AI
Normally you don=B4t need to specify that on both sides if you just
specify the collation on the side that is different to this on your
local server and vice cersa.
HTH, jens Suessmeyer.|||This means that the two databases use different collations. Look up
collations in Books Online, there you'll also find the COLLATE keyword, whic
h
you can use to solve the problem.
Something like that:
update _customers set flag = 1
from _customers a
inner join Web.ProductCart.dbo.customers b
on a.email = b.email collate <collation
name>
The collation name is displayed in database properties in Enterprise manager
.
ML
http://milambda.blogspot.com/|||Thanks guys, i'll go check it out.
"ML" <ML@.discussions.microsoft.com> wrote in message
news:70933017-66F0-4438-B8EE-E5824B77E3C9@.microsoft.com...
> This means that the two databases use different collations. Look up
> collations in Books Online, there you'll also find the COLLATE keyword,
> which
> you can use to solve the problem.
> Something like that:
> update _customers set flag = 1
> from _customers a
> inner join Web.ProductCart.dbo.customers b
> on a.email = b.email collate <collation
> name>
> The collation name is displayed in database properties in Enterprise
> manager.
>
> ML
> --
> http://milambda.blogspot.com/
Wednesday, March 7, 2012
Compact Edition DVD Standalone
Is it possible to run SQL Server Compact Edition as a standalone application from a DVD?
i.e. it would not leave anything installed on the users computer after the DVD was ejected.
Hi:
For what it's worth, I am attempting the same thing: developing a product catalog that will enable users to browse products and configure order for printing. As my product is using Framework 2, I will simply have an autorun install the program since I have to check for the existence of the framework anyway.
Please post back your findings.
|||If both .Net CF2 and SQL Server 2005 are installed on the target system, you should be able to deploy the DLLs for SQL CE on the DVD.|||I do not believe there is a dependancy on SQL Server/.NET CF2 for a runtime SQL Server CE application - believe that there is only a dependency on VB6 runtime/.Net 1/1.1 runtime of .Net2.0 runtime (according the language the app has been written in. Plus of course the SQL CE Dlls on the DVD|||Make connection string like this:"Data Source=".\MyDatabase.sdf";Password="MyPassword";mode="Read Only";SSCE:Temp File Directory = "C:\";"
This will use temporary database on c: disk if there's need to write temp data for queries.
On DVD/CD include these files in root:
Microsoft.SqlServerCe.Client.dll
sqlceca30.dll
sqlcecompact30.dll
sqlceer30EN.dll
sqlceme30.dll
sqlceoledb30.dll
sqlceqp30.dll
sqlcese30.dll
System.Data.SqlServerCe.dll
Now, this works for me, but I have requirement, not to write to C:, but to users temp folder.
Does somebody know how to change connection string to write into temp folder?
Friday, February 24, 2012
Communciation between MS SQL Server and client
1. Named Pipes over NetBIOS
2. Named Pipes over NetBEUI
3. Named Pipes over TCP/IP
4. NetBIOS over TCP/IP
5. SMB over NetBios
6. SMB over NetBEUI
7. SMB over TCP/IP
8. RPC over NetBIOS
9. RPC over NetBEUI
10. RPC over TCP/IP
I have a feeling that #1 and #5 actually means the same thing. Also, #3 and #7 means the same thing.
Is the following the correct order of the communication path?
Named Pipes
SMB
NetBIOS
TCP/IP or NetBEUI
I have the following understanding:
1. Named Pipes is a network library.
2. TCP/IP and NetBEUI are network transport protocols.
You have many things mixed together that are fundamentally different.
This can't easily be explained. I think your point is which ports must
be enabled based on what services are being used, as opposed to just
being active and unused. This is difficult to answer without alot of
experimentation and understanding of the interdependance of services.
I understood named pipes to be an app to app info exchange by files.
Named pipes can operate over TCP/IP, but are verbose and performance
becomes degraded over slow networks.
RPC stands for remote procedure call. These are transmitted over
TCP/IP RPC are means by whihc applications communicate and are at
least a level above TCP/IP..
SMB is also referred to as Samba - means of Windows and Linux file
sharing, and is again at a higher level than TCP/IP.
NetBios is a protocol that I understood was native to Novel networks,
and not TCP/IP, but apparanetly one can use NetBios over TCP/IP.
On Tue, 29 Jun 2004 13:03:02 -0700, "=?Utf-8?B?cGV0ZXI=?="
<peter@.discussions.microsoft.com> wrote:
>I'm trying to understand the client and server communication. But I have run into some terms which I need some help to understand:
>1. Named Pipes over NetBIOS
>2. Named Pipes over NetBEUI
>3. Named Pipes over TCP/IP
>4. NetBIOS over TCP/IP
>5. SMB over NetBios
>6. SMB over NetBEUI
>7. SMB over TCP/IP
>8. RPC over NetBIOS
>9. RPC over NetBEUI
>10. RPC over TCP/IP
>I have a feeling that #1 and #5 actually means the same thing. Also, #3 and #7 means the same thing.
>Is the following the correct order of the communication path?
>Named Pipes
>SMB
>NetBIOS
>TCP/IP or NetBEUI
>I have the following understanding:
>1. Named Pipes is a network library.
>2. TCP/IP and NetBEUI are network transport protocols.
>
|||Hi Lou,
Thank you for the explanation.
Are the followings correct?
1. #1 Named Pipes over NetBIOS already includes #5 SMB over NetBios.
2. #2 Named Pipes over NetBEUI already includes #1 Named Pipes over NetBIOS, #5 SMB over NetBios, and #6 SMB over NetBEUI.
3. #3 Named Pipes over TCP/IP already includes #4 NetBIOS over TCP/IP, #5 SMB over NetBios, and #7 SMB over TCP/IP.
Thank you for your help,
Peter
"Lou Arnold" wrote:
> You have many things mixed together that are fundamentally different.
> This can't easily be explained. I think your point is which ports must
> be enabled based on what services are being used, as opposed to just
> being active and unused. This is difficult to answer without alot of
> experimentation and understanding of the interdependance of services.
> I understood named pipes to be an app to app info exchange by files.
> Named pipes can operate over TCP/IP, but are verbose and performance
> becomes degraded over slow networks.
> RPC stands for remote procedure call. These are transmitted over
> TCP/IP RPC are means by whihc applications communicate and are at
> least a level above TCP/IP..
> SMB is also referred to as Samba - means of Windows and Linux file
> sharing, and is again at a higher level than TCP/IP.
> NetBios is a protocol that I understood was native to Novel networks,
> and not TCP/IP, but apparanetly one can use NetBios over TCP/IP.
> On Tue, 29 Jun 2004 13:03:02 -0700, "=?Utf-8?B?cGV0ZXI=?="
> <peter@.discussions.microsoft.com> wrote:
>
>
|||Sorry, i realy don't have enough experience to answer your questions
and I'm not sure anyone can in this forum. You'l need to browse the
internet or ask in networking groups.
On Wed, 30 Jun 2004 01:05:01 -0700, "=?Utf-8?B?UGV0ZXI=?="
<Peter@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Hi Lou,
>Thank you for the explanation.
>Are the followings correct?
>1. #1 Named Pipes over NetBIOS already includes #5 SMB over NetBios.
>2. #2 Named Pipes over NetBEUI already includes #1 Named Pipes over NetBIOS, #5 SMB over NetBios, and #6 SMB over NetBEUI.
>3. #3 Named Pipes over TCP/IP already includes #4 NetBIOS over TCP/IP, #5 SMB over NetBios, and #7 SMB over TCP/IP.
>Thank you for your help,
>Peter
>
>"Lou Arnold" wrote:
|||Lou,
Thank you for your help. I understand these questions are kind of beyond the scope of SQL Server.
Peter
"Lou Arnold" wrote:
> Sorry, i realy don't have enough experience to answer your questions
> and I'm not sure anyone can in this forum. You'l need to browse the
> internet or ask in networking groups.
>
> On Wed, 30 Jun 2004 01:05:01 -0700, "=?Utf-8?B?UGV0ZXI=?="
> <Peter@.discussions.microsoft.com> wrote:
>
>
Communciation between MS SQL Server and client
into some terms which I need some help to understand:
1. Named Pipes over NetBIOS
2. Named Pipes over NetBEUI
3. Named Pipes over TCP/IP
4. NetBIOS over TCP/IP
5. SMB over NetBios
6. SMB over NetBEUI
7. SMB over TCP/IP
8. RPC over NetBIOS
9. RPC over NetBEUI
10. RPC over TCP/IP
I have a feeling that #1 and #5 actually means the same thing. Also, #3 and
#7 means the same thing.
Is the following the correct order of the communication path?
Named Pipes
SMB
NetBIOS
TCP/IP or NetBEUI
I have the following understanding:
1. Named Pipes is a network library.
2. TCP/IP and NetBEUI are network transport protocols.You have many things mixed together that are fundamentally different.
This can't easily be explained. I think your point is which ports must
be enabled based on what services are being used, as opposed to just
being active and unused. This is difficult to answer without alot of
experimentation and understanding of the interdependance of services.
I understood named pipes to be an app to app info exchange by files.
Named pipes can operate over TCP/IP, but are verbose and performance
becomes degraded over slow networks.
RPC stands for remote procedure call. These are transmitted over
TCP/IP RPC are means by whihc applications communicate and are at
least a level above TCP/IP..
SMB is also referred to as Samba - means of Windows and Linux file
sharing, and is again at a higher level than TCP/IP.
NetBios is a protocol that I understood was native to Novel networks,
and not TCP/IP, but apparanetly one can use NetBios over TCP/IP.
On Tue, 29 Jun 2004 13:03:02 -0700, "examnotes"
<peter@.discussions.microsoft.com> wrote:
>I'm trying to understand the client and server communication. But I have ru
n into some terms which I need some help to understand:
>1. Named Pipes over NetBIOS
>2. Named Pipes over NetBEUI
>3. Named Pipes over TCP/IP
>4. NetBIOS over TCP/IP
>5. SMB over NetBios
>6. SMB over NetBEUI
>7. SMB over TCP/IP
>8. RPC over NetBIOS
>9. RPC over NetBEUI
>10. RPC over TCP/IP
>I have a feeling that #1 and #5 actually means the same thing. Also, #3 and
#7 means the same thing.
>Is the following the correct order of the communication path?
>Named Pipes
>SMB
>NetBIOS
>TCP/IP or NetBEUI
>I have the following understanding:
>1. Named Pipes is a network library.
>2. TCP/IP and NetBEUI are network transport protocols.
>|||Hi Lou,
Thank you for the explanation.
Are the followings correct?
1. #1 Named Pipes over NetBIOS already includes #5 SMB over NetBios.
2. #2 Named Pipes over NetBEUI already includes #1 Named Pipes over NetBIOS,
#5 SMB over NetBios, and #6 SMB over NetBEUI.
3. #3 Named Pipes over TCP/IP already includes #4 NetBIOS over TCP/IP, #5 SM
B over NetBios, and #7 SMB over TCP/IP.
Thank you for your help,
Peter
"Lou Arnold" wrote:
> You have many things mixed together that are fundamentally different.
> This can't easily be explained. I think your point is which ports must
> be enabled based on what services are being used, as opposed to just
> being active and unused. This is difficult to answer without alot of
> experimentation and understanding of the interdependance of services.
> I understood named pipes to be an app to app info exchange by files.
> Named pipes can operate over TCP/IP, but are verbose and performance
> becomes degraded over slow networks.
> RPC stands for remote procedure call. These are transmitted over
> TCP/IP RPC are means by whihc applications communicate and are at
> least a level above TCP/IP..
> SMB is also referred to as Samba - means of Windows and Linux file
> sharing, and is again at a higher level than TCP/IP.
> NetBios is a protocol that I understood was native to Novel networks,
> and not TCP/IP, but apparanetly one can use NetBios over TCP/IP.
> On Tue, 29 Jun 2004 13:03:02 -0700, "examnotes"
> <peter@.discussions.microsoft.com> wrote:
>
>|||Sorry, i realy don't have enough experience to answer your questions
and I'm not sure anyone can in this forum. You'l need to browse the
internet or ask in networking groups.
On Wed, 30 Jun 2004 01:05:01 -0700, "examnotes"
<Peter@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Hi Lou,
>Thank you for the explanation.
>Are the followings correct?
>1. #1 Named Pipes over NetBIOS already includes #5 SMB over NetBios.
>2. #2 Named Pipes over NetBEUI already includes #1 Named Pipes over NetBIOS
, #5 SMB over NetBios, and #6 SMB over NetBEUI.
>3. #3 Named Pipes over TCP/IP already includes #4 NetBIOS over TCP/IP, #5 S
MB over NetBios, and #7 SMB over TCP/IP.
>Thank you for your help,
>Peter
>
>"Lou Arnold" wrote:
>|||Lou,
Thank you for your help. I understand these questions are kind of beyond t
he scope of SQL Server.
Peter
"Lou Arnold" wrote:
> Sorry, i realy don't have enough experience to answer your questions
> and I'm not sure anyone can in this forum. You'l need to browse the
> internet or ask in networking groups.
>
> On Wed, 30 Jun 2004 01:05:01 -0700, "examnotes"
> <Peter@.discussions.microsoft.com> wrote:
>
>
common temp tables in procedures
job1:
EXEc sp1
EXEC sp2
EXEC sp3
Job2
EXEC abc1
EXEC abc2
EXEC abc3
EXEC abc4
EXEC abc5
Job3
EXEC xyz1
EXEC xyz2
EXEC xyz3
EXEC xyz4
But the issue is that the stored procedures in the job1 has temp tables with the same name as stored procedures in the job 2 have.
Eg:
procedure abc1 and procedure sp2 have the temp table #temp1.
procedure abc4 and procedure xyz2 have the temp table #temp3.
Like this i have some more common temp tables. So my question is that can I use the temp tables like that.If so does it degrade the perforamnce of the sps.You can and there is no performance penalty. You might get a performance increase by using table variables though, depending on how small the data is. Temp tables are local to a procedure, so having them named the same in two procs that call each other isn't a problem.
Common Image in Reports
I need to display the company logo on 100 odd reports that run from different folders on the report manager. Since the company logo has changed before and we had to change every report, I want the image stored on a server (with SSL on) and want the reports to point to the server. The server is going to be different in development and production environments.
When I try to add the image using "Image Wizard" I get the error "Invalid image.". The wizard wouldn't let me use a function to build the path based on the environment and select the image from the correct server. It doesn't accept anything that doesn't start with "http:" when I select "web" as the image source.
Please Help!!!
Don't serve the image over SSL (which requires https: as the protocol). Why can't the image come from a non secure web address? I assume you are just serving these reports over an intranet?
|||Yes, the reports are rendered on the intranet. Even if I have the image come from a non secure web address, I'd still need to get the image from different web addresses in development and production. Reporting services doesn't let me use a web image, unless I specify a valid web address and to switch between development production I need to have some kind of variable in the address.|||Hello,
Here's what you can do:
Create your report and add a string parameter (Environment) that you will set for development or production. Set this variable to Internal and give it 2 available values (D and P) with a default of D since this is where you will be testing. Add your image to your report via your web address for your development environment. Click on the image and in the properties window and change the Value property to an expression with something like this:
=Switch(Parameters!Environment.Value = "D", "http://www.DevServer.com/images/DevImage.jpg", Parameters!Environment.Value = "P", "http://www.ProdServer.com/images/ProdImage.jpg")
Now, when you deploy your report to production, go into the properties of your report in report manager and change the value of the Evironment parameter to P.
Jarret
|||Thanks Jarret, I'll try and let you know how it goes!!!Common DTS Source & Multiple Destinations
There is only one Data Source ..and multiple destinations.
When i write a code for this in VB ,for each Package i need to define the source connectioninividually. Can't i use the same Source connection which i used for the first package in the subsequent packages?http://www.sqldts.com/default.aspx?200
Sunday, February 19, 2012
Committed Trans Logs
databases should truncate all committed transaction logs but trans logs are
not being truncating and it just grows and grows. I heard that poorly
written applications sometimes don't commited SQL trans logs propely after
the full backup thus creating a huge trans log files. Is there a way to
check whether trans logs are committed or not?
Thanks in advance.Daniel wrote:
> hWe run full backup on our SQL2K databases everynight. After the backup, the
> databases should truncate all committed transaction logs but trans logs are
> not being truncating and it just grows and grows. I heard that poorly
> written applications sometimes don't commited SQL trans logs propely after
> the full backup thus creating a huge trans log files. Is there a way to
> check whether trans logs are committed or not?
> Thanks in advance.
You're doing full backups, but you're not doing transaction log backups,
thus the committed transactions never get flushed from the log. Either
put the database into Simple recovery mode, or schedule transaction log
backups throughout the day. I have a script that you can use to
automate this:
http://realsqlguy.com/twiki/bin/view/RealSQLGuy/AutomaticBackupOfAllDatabases
Tracy McKibben
MCDBA
http://www.realsqlguy.com
Committed Trans Logs
e
databases should truncate all committed transaction logs but trans logs are
not being truncating and it just grows and grows. I heard that poorly
written applications sometimes don't commited SQL trans logs propely after
the full backup thus creating a huge trans log files. Is there a way to
check whether trans logs are committed or not?
Thanks in advance.Daniel wrote:
> hWe run full backup on our SQL2K databases everynight. After the backup,
the
> databases should truncate all committed transaction logs but trans logs ar
e
> not being truncating and it just grows and grows. I heard that poorly
> written applications sometimes don't commited SQL trans logs propely after
> the full backup thus creating a huge trans log files. Is there a way to
> check whether trans logs are committed or not?
> Thanks in advance.
You're doing full backups, but you're not doing transaction log backups,
thus the committed transactions never get flushed from the log. Either
put the database into Simple recovery mode, or schedule transaction log
backups throughout the day. I have a script that you can use to
automate this:
http://realsqlguy.com/twiki/bin/vie...realsqlguy.com
Commit and rollback
different?
Example:
begin tran
delete
from enc
where epsid = '23232'
commit
I ran the above then ran the following to undo:
begin tran
rollback tran
That was it. I am not entirely sure how to put the transactions together to
enable the rollback if the data being changed it not correct.
Message posted via http://www.webservertalk.comTina,
Use the @.@.ERROR variable, like the following:
begin tran
delete from enc where epsid = '23232'
if @.@.ERROR = 0
commit tran
else
rollback tran
What this does is attempts to delete the record(s) from the enc table with
the given filter. If the query has a problem (fails, whatever), then the
@.@.ERROR variable will be set to some non-zero value. If the query completed
successfully, then the @.@.ERROR variable will be 0.
Hope that helps.
Richard
"tina miller via webservertalk.com" wrote:
> How are these placed exactly in the program. Do you run at 1 time or
> different?
> Example:
> begin tran
> delete
> from enc
> where epsid = '23232'
> commit
> I ran the above then ran the following to undo:
> begin tran
> rollback tran
> That was it. I am not entirely sure how to put the transactions together t
o
> enable the rollback if the data being changed it not correct.
> --
> Message posted via http://www.webservertalk.com
>|||I need something that I can do the rollback. This is in a training
environment and I need to be able to have it rollback.
Message posted via http://www.webservertalk.com
Thursday, February 16, 2012
comments in subscriptions
I have several comments in a subscription. The comments are running together. I put a break in when I format the comments but they still run together.
Has anyone else seen this occur? Does anyone have an idea of what I am doing wrong or a work-a-round?
RS 2005.
How about this one? Is it possible to change the text that is inserted along with the link? Currently the text below is inserted aling with the link to the report:
The report is accessible at the following address:
Commenets on Running Citrix on SQL Server? Anyone doing this?
Ram to run SQL Server 2000 and as a Citrix server?
Is this possible? What gotcha's should I be looking out for?
Any comments appreciated...
Thanks,
Rog
I am pretty sure you need to run them on seperate servers, or else, use a VM
solution such as VMware to run two seperate VM servers on your dual proc 4GB
server.
Sam
"Roger" wrote:
> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>
>
|||Well it certainly can be done, I run a SQL server on a Citrix box to host
the Citrix database.
Whether you'd want to do it for performance reasons is another matter, you'd
certainly want to limit the memory SQL will use.
Peter Lawton
"Roger" <davisro@.netins.net> wrote in message
news:uQ1CEizVFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>
|||As the others says, it's possible to run both on the same server. If it's a
good idea or not is hard to say when you don't say anythnig about database
sizes, number of users etc. Keep in mind that SQL server will grab a lot of
memory and so will Citrix. Citrix will allocate memory for every user
connected to the server and depending on what application the client is
running it will also try to grab more and more memory.
Regards
Steen
Roger wrote:
> Our work is currently looking at getting a dual processor machine
> with 4GB Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
Commenets on Running Citrix on SQL Server? Anyone doing this?
Ram to run SQL Server 2000 and as a Citrix server?
Is this possible? What gotcha's should I be looking out for?
Any comments appreciated...
Thanks,
RogI am pretty sure you need to run them on seperate servers, or else, use a VM
solution such as VMware to run two seperate VM servers on your dual proc 4GB
server.
Sam
"Roger" wrote:
> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>
>|||Well it certainly can be done, I run a SQL server on a Citrix box to host
the Citrix database.
Whether you'd want to do it for performance reasons is another matter, you'd
certainly want to limit the memory SQL will use.
Peter Lawton
"Roger" <davisro@.netins.net> wrote in message
news:uQ1CEizVFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>|||As the others says, it's possible to run both on the same server. If it's a
good idea or not is hard to say when you don't say anythnig about database
sizes, number of users etc. Keep in mind that SQL server will grab a lot of
memory and so will Citrix. Citrix will allocate memory for every user
connected to the server and depending on what application the client is
running it will also try to grab more and more memory.
Regards
Steen
Roger wrote:
> Our work is currently looking at getting a dual processor machine
> with 4GB Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
Commenets on Running Citrix on SQL Server? Anyone doing this?
Ram to run SQL Server 2000 and as a Citrix server?
Is this possible? What gotcha's should I be looking out for?
Any comments appreciated...
Thanks,
RogI am pretty sure you need to run them on seperate servers, or else, use a VM
solution such as VMware to run two seperate VM servers on your dual proc 4GB
server.
Sam
"Roger" wrote:
> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>
>|||Well it certainly can be done, I run a SQL server on a Citrix box to host
the Citrix database.
Whether you'd want to do it for performance reasons is another matter, you'd
certainly want to limit the memory SQL will use.
Peter Lawton
"Roger" <davisro@.netins.net> wrote in message
news:uQ1CEizVFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Our work is currently looking at getting a dual processor machine with 4GB
> Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
>|||As the others says, it's possible to run both on the same server. If it's a
good idea or not is hard to say when you don't say anythnig about database
sizes, number of users etc. Keep in mind that SQL server will grab a lot of
memory and so will Citrix. Citrix will allocate memory for every user
connected to the server and depending on what application the client is
running it will also try to grab more and more memory.
Regards
Steen
Roger wrote:
> Our work is currently looking at getting a dual processor machine
> with 4GB Ram to run SQL Server 2000 and as a Citrix server?
> Is this possible? What gotcha's should I be looking out for?
> Any comments appreciated...
>
> Thanks,
> Rog
CommandText Size Limit?
Hello, some of our users have some "canned" reports they want to run without the hassle of searching for members throughout a myriad of hierarchies in our OLAP cubes. Tools like ProClarity and Novaview are great for analysis, but when needing long lists of unrelated low lying members of a dimension, they're quite cumbersome.
We decided to use Reporting Services to save the reports' static layouts and pass the MDX strings programatically (SQL 2000/Analysis Services/ .NET Framework 1.1/Development Env 2003). The problem is, many of the named sets the users can build dynamically into the MDX to bounce of the cubes goes well past 65k, and our web services app keeps choking on this. Is there any way to bump this limit up?
Thanks in advance for any help!
Anyone? Sorry to push this up, but I was hoping someone had some insight. Thanks!Tuesday, February 14, 2012
Command to run for a query
and i was wondering if some couold tell me the command to do so. I have the
table selected but not sure what to type in the window
Thanks
If you want to return data from a table the "SELECT" command is used. Here
is the syntax for a SELECT command (from Books Online). To find out more
read Books Online.
SELECT select_list
[ INTO new_table ]
FROM table_source
[ WHERE search_condition ]
[ GROUP BY group_by_expression ]
[ HAVING search_condition ]
[ ORDER BY order_expression [ ASC | DESC ] ]
----
-
Need SQL Server Examples check out my website
http://www.geocities.com/sqlserverexamples
"rocker40" <rocker40@.discussions.microsoft.com> wrote in message
news:F0AA7C7E-56C0-457E-80ED-D9A76C9C80F7@.microsoft.com...
> I nee to query the passwordtxt table. I have never even made a query
before
> and i was wondering if some couold tell me the command to do so. I have
the
> table selected but not sure what to type in the window
> Thanks
Command to run for a query
and i was wondering if some couold tell me the command to do so. I have the
table selected but not sure what to type in the window
ThanksIf you want to return data from a table the "SELECT" command is used. Here
is the syntax for a SELECT command (from Books Online). To find out more
read Books Online.
SELECT select_list
[ INTO new_table ]
FROM table_source
[ WHERE search_condition ]
[ GROUP BY group_by_expression ]
[ HAVING search_condition ]
[ ORDER BY order_expression [ ASC | DESC ] ]
----
----
-
Need SQL Server Examples check out my website
http://www.geocities.com/sqlserverexamples
"rocker40" <rocker40@.discussions.microsoft.com> wrote in message
news:F0AA7C7E-56C0-457E-80ED-D9A76C9C80F7@.microsoft.com...
> I nee to query the passwordtxt table. I have never even made a query
before
> and i was wondering if some couold tell me the command to do so. I have
the
> table selected but not sure what to type in the window
> Thanks