Showing posts with label edition. Show all posts
Showing posts with label edition. Show all posts

Wednesday, March 28, 2012

Query Problem!

Hello!
I am using Visual Studio 2005 and Microsoft SQL Server 2005 Express Edition.
I have a table like this in my db:

-- MyTable ------------------------

id name
1 ??????????
?????????? ??? 2

-----------------------------

You can see non-english characters under name.
Now it is my query:
SELECT *
FROM MyTable
WHERE (name LIKE '%??????????%')

But it doesn't bring up any results... I have used = sign, but it doesn't do anything...

Why?

Sorry for my poor EnglishWhat is your data type andcollation setting for the Name column?|||

Try LIKE N'%....'

Sorry if it doesn't work, I don't usually work with foreign characters that way, I would use a parameter and let the user type whatever they needed.

|||It works! Thanks.

Wednesday, March 21, 2012

query performance issue of Sql server 2005 Mobile edition on device

Executing a select query with left outer joins etc takes .53 seconds to execute on sqlce 2.0.

Same query on sql 2005 mobile ed. takes 11 minutes .

on database having same data.

Sample query

SELECT routes.location,routes.equipment_type, routes.contract_type,

routes.maintenance_interval,routes.bank_description,routes.Unit_Des,

routes.Unit_no,max(task_last_completed.date_completed)as date1,min(case when

task_last_completed.due_date is NULL then getdate()-1 else due_date end) as

due_date FROM routes left outer join tasks on tasks.model = routes.model and

tasks.eqtyp = routes.equipment_type inner join task_by_contract_type on

tasks.task_id = task_by_contract_type.task_id and

task_by_contract_type.contract_type = routes.contract_type and

task_by_contract_type.model = routes.model left outer join

task_last_completed on routes.unit_no = task_last_completed.equipment_Id and

tasks.task_Id = task_last_completed.task_Id WHERE routes.location LIKE

'S153825-01%' group by

routes.location,routes.equipment_type,routes.contract_type,routes.maintenanc

e_interval,routes.bank_description,routes.unit_des,routes.unit_no ORDER BY

routes.location, routes.bank_description, routes.Unit_Des

WHY?

Hi Vijay,

Can you answer the following questions to help us understand your scenario better:

What is the configuration of the device (make/OS version/processor type/processor speed/total memory/available memory for use at the time query was run) on which the query was run against SQL Mobile database?|||

Hi Vijay,

Can you answer the following questions to help us understand your scenario better:

What is the configuration of the device (make/OS version/processor type/processor speed/total memory/available memory for use at the time query was run) on which the query was run against SQL Mobile database?|||

Answer as follows:

1- verizon/Windows Mobile 5.0/os5.1.1700(build 14354.0.1.1)/PXA270-416MHz/49.45MB/~23MB

2 - Yes

3 - Yes as existing schema of Sqlce 2.0 is upgraded to sql mobile 5.0 using upgrade.exe

4 - 9.66 MB sql ce 2.0 and 8.09 MB sql mobile

5 - Running the query through query analyser.

6. can we set buffer pool etc. for query analyser on device.

One thing i have identified later in our datbase it hase number of duplicate records but even then sql ce performance is comparative very high.

Even after deleting duplicate records difference and read that sql mobile deals with the outer joins differently as compared to sqlce 2.0 but even then performance is the issue,

Sql ce 2.0 takes 0.53 Minutes

Sql Mobile takes 1.40 Minutes

Thanks

vijay

Friday, March 9, 2012

Query optimisor out of stack space

Hi,

I have recently upgraded to SQL Server 2005 (SP1) Developer Edition from SQL Server 2000 (SP4). Since doing so, i have been unable to delete any records from a specific table.

I have found this is due to having approximately 340 foreign key constraints referencing the UserID column of the table.

This functionality worked in SQL Server 2000. Do Microsoft plan to release any fixes for this issue?

Kind Regards,
Martyn...

Wow, 340 FKs?!

I don't think there is going to be a fix for this. The cost for maintaining this constraint is quite large. You should consider simplifying the schema.

http://msdn2.microsoft.com/en-us/library/aa337357.aspx|||

Hello,

are you the Martyn Lawson from Taunus-Sparkasse?

Gru?

moh

|||

Hi,

Just to update you all with this issue. I have raised a formal support call with Microsoft who are currently investigating the issue. They recommend a maximum of 253 FK's on a single table but the absolute maximum is 2966.

The support engineer assigned to my case has told me that although i have exceeded the recommended maximum it should not cause an error and this is indeed a bug.

I am still waiting to here the outcome, but will update this thread as soon as i know anything.

Cheers,

Martyn...

|||No. I am not.

Query optimisor out of stack space

Hi,

I have recently upgraded to SQL Server 2005 (SP1) Developer Edition from SQL Server 2000 (SP4). Since doing so, i have been unable to delete any records from a specific table.

I have found this is due to having approximately 340 foreign key constraints referencing the UserID column of the table.

This functionality worked in SQL Server 2000. Do Microsoft plan to release any fixes for this issue?

Kind Regards,
Martyn...

Wow, 340 FKs?!

I don't think there is going to be a fix for this. The cost for maintaining this constraint is quite large. You should consider simplifying the schema.

http://msdn2.microsoft.com/en-us/library/aa337357.aspx|||

Hello,

are you the Martyn Lawson from Taunus-Sparkasse?

Gru?

moh

|||

Hi,

Just to update you all with this issue. I have raised a formal support call with Microsoft who are currently investigating the issue. They recommend a maximum of 253 FK's on a single table but the absolute maximum is 2966.

The support engineer assigned to my case has told me that although i have exceeded the recommended maximum it should not cause an error and this is indeed a bug.

I am still waiting to here the outcome, but will update this thread as soon as i know anything.

Cheers,

Martyn...

|||No. I am not.

Query optimisor out of stack space

Hi,

I have recently upgraded to SQL Server 2005 (SP1) Developer Edition from SQL Server 2000 (SP4). Since doing so, i have been unable to delete any records from a specific table.

I have found this is due to having approximately 340 foreign key constraints referencing the UserID column of the table.

This functionality worked in SQL Server 2000. Do Microsoft plan to release any fixes for this issue?

Kind Regards,
Martyn...

Wow, 340 FKs?!

I don't think there is going to be a fix for this. The cost for maintaining this constraint is quite large. You should consider simplifying the schema.

http://msdn2.microsoft.com/en-us/library/aa337357.aspx|||

Hello,

are you the Martyn Lawson from Taunus-Sparkasse?

Gru?

moh

|||

Hi,

Just to update you all with this issue. I have raised a formal support call with Microsoft who are currently investigating the issue. They recommend a maximum of 253 FK's on a single table but the absolute maximum is 2966.

The support engineer assigned to my case has told me that although i have exceeded the recommended maximum it should not cause an error and this is indeed a bug.

I am still waiting to here the outcome, but will update this thread as soon as i know anything.

Cheers,

Martyn...

|||No. I am not.

Saturday, February 25, 2012

Query Notifications

Hi there!
Which edition of SQL Server 2005 includes the Query Notifications?
Thanks
Klaus Aschenbrenner
www.csharp.at.www.anecon.com
http://weblogs.asp.net/klaus.aschenbrennerGood news ! Query Notification is available in SQL Server Express as
Service Broker is the underlying mechanism.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--

Query Not Collating correctly

I have restored an SQL 2000 database in to 2005 Standard edition.

I have several views that are displaying incorrect results though when viewed in SQL Management Studio, and hence back to Excel Word etc....

The view is as follows:

SELECT TOP (100) PERCENT DATEPART(mm, ARV_date) AS Month, COUNT(*) AS Count, SUM(DATEDIFF(mi, ARV_date, RES_date)) AS [Minutes Unresolved],
MAX(DATEDIFF(mi, ARV_date, RES_date)) AS [Max Dur(min)]
FROM dbo.ps_Remedy_Data
WHERE (DATEPART(yy, ARV_date) = DATEPART(yy, GETDATE())) AND (RMDY_Priority = 'Urgent')
GROUP BY DATEPART(mm, ARV_date), RMDY_Priority
ORDER BY Month

When I execute it from Word or Excel the returned data is NOT in Month order...

When I right click the view and say Open View it returns the same unsorted data...

When I right click the view and say MODIFY and do nothing else except EXECUTE the SQL the returned data is in the correct sequence.

This is extremely annoying and can only be described as a bug.

This is a new server running WIN 2003 SP1, with SQL Server 2005 SP1.

Thoughts appreciated, many thanks in advance

regards

Order in views make no sense, though the order by clause is only used within the use of the "TOP Something" clause to ensure that the data is ordered first to give the right data back, using TOP 100 Precent won′t have any effect on that. There is a new blog entry from Kimberly about that, perhaps you shoul have a look on that.

http://www.sqlskills.com/blogs/kimberly/PermaLink.aspx?guid=79de45cb-2da6-4510-ae43-7e5e42e4c02e

The best way would be to treat the view as a column definition and do the order on the view.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de