Should We See Replication Filter Where Clause Text In Profiler TextData On SQL Server 2005?
We have Merge Replication publications for SQL Server 2005 Compact Edition subscribers.
Some articles have filter statements that send rows to multiple subscribers, based on the value of Host_Name() supplied at run-time.
Our publications work for most subscribers, but we have at least one subscriber who downloads too many rows from one of the filtered tables.
When we run the Select SQL from the article's Filter statement it returns the intended 4 rows for this subscriber.
We cut and pasted the filter statement into query analyzer, substituted the subscriber's value for Host_Name(), executed the statement, and got the proper 4 rows for this subscriber in the results.
But when this subscriber syncs her Compact Edition database it downloads 10 rows - the proper 4 rows that the filter statement should pass, plus 6 other rows that she should not download.
Our hypothesis is that the Filter statement is not properly applied to the article when this subscriber syncs.
Other subscribers get the proper rows when they sync, so the publication's filter statement works in some cases, for some values of Host_Name().
We'd like to see the application of the filter statement at run-time (sync-time), but we have not found the text of the filter statement in SQL Profiler output. Should we expect to see the text of the filter statement in SQL Profiler output?
Is there a better way to debug this error?
FYI, here's the text of the article filter statement:
SELECT <published_columns> FROM [dbo].[TBL_USER] WHERE user_sys_id in (
select u.user_sys_id
from tbl_user u
join tbl_territory t on u.territory_gid = t.territory_gid
where t.terr_no_id like (
select
case (select t.data_access_qnty from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = Host_Name())
when 2 then (select t.terr_no_id from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = Host_Name())
when 3 then (select left(t.terr_no_id,5)+'%' from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = Host_Name())
end
)
)
And here's the statement we ran from Query Analyzer:
declare @id varchar(10)
select @id = 'aultnc'
SELECT * FROM [dbo].[TBL_USER] WHERE user_sys_id in (
select u.user_sys_id
from tbl_user u
join tbl_territory t on u.territory_gid = t.territory_gid
where t.terr_no_id like (
select
case (select t.data_access_qnty from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = @id)
when 2 then (select t.terr_no_id from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = @id)
when 3 then (select left(t.terr_no_id,5)+'%' from tbl_user u join tbl_territory t on u.territory_gid = t.territory_gid where u.user_sys_id = @id)
end
)
)
Thanks
View Complete Forum Thread with Replies
Related Forum Messages:
Profiler TextData Truncation
I'm running SQL Profiler to analyze the queries being run against mySQL server. The problem is, that in the Profiler results, theTextData column, which contains the SQL statements executed, istruncated so I don't get to see the entire SQL statements. I've gonethrough all the documentation and menu options but I can't seem tofind a way to make it show me the entire SQL statement regardless oflength. Can anybody help?Thanks,Huey
View Replies !
How Can The Profiler Textdata Field Be Enlarged?
When running Profiler to save a trace to a table the field 'TextData' getstrunciated. The datatype for that field is as shown:Column name | Data Type | Length | Allow NullTextData ntext 16 yesI can not find a way to set the trace up to create a tablewith TextData oflength greater than 16. This really causes a problem when trying to capturelong running queries for tuning as the query itself maybe truncated. Isthere a way around this?
View Replies !
Profiler's TextData Column Has 'NULL' And Longest Durations
Is there a way to determine why the Textdata field has "NULL" for a value.The trace shows multiple "NULL" value records with the longest durations;many greater than 50,000ms. The {} indicate the TextData and Duration onthe line below:rownumber | textdata | Eventclass | ......| Duration |...966 | 15 | {NULL} | 24 smm5413 | 808 | Microsoft Office XP | misview012 | 78| {604636} | 2004-02-11 15:25:12.010 | 4747 | 0 | 469
View Replies !
Sql Replication Filter Clause
Hello, I am using the below sql to filter rows in sql transactional replication. I need to the EditionIds that I get from the filtering below to get all their article. How can I do that because it is not accepting joins in the replication filter window SELECT <published_columns> FROM <<TABLE>> WHERE <<TABLE>>.EditionDate = 2/2/2005 thanks
View Replies !
Profiler In SQL 2005 Filter On Host Name
How do you get sql2005 profiler to filter on host name, (computer name of the client) like you can in sql2000 profiler. 2005 Profiler column filter options seem to omit this, this makes the application virtually useless in most situations.
View Replies !
Profiler In SQL 2005 Filter On Host Name
How do you get sql2005 profiler to filter on host name, (computer name of the client) like you can in sql2000 profiler. 2005 Profiler column filter options seem to omit this, this makes the application virtually useless in most situations.
View Replies !
PDF Filter For MS SQL Server 2005 Full Text Search
Hello, I have read on the multiple places that filter for full text search of PDF files using FTS2005 is included in the Reader 8 etc. However, I have not found any document or instruction etc on adobe documents, microsoft documents or web that details on how to actually configure the filter. Please help. thanks Kumud
View Replies !
Profiler Filter
I have been running traces in SQL Profiler and have not been able to get the filtering to work correctly. I am interested in capturing only statements that use CPU and have setup the filter for CPU > 0. It still returns all of the rows that have Null. Is there any way of filtering out the rows that have nunll for CPU? Thanks, Ken Nicholson
View Replies !
SQl Profiler Filter
Hi every one, I want to filter application name in sql profiler, so I write SQL% (for every one who connects by sql qery analyzer) in "application name" filter box but it doesn't work correctly,and shows all applications. Why it works incorrect? Thank You Kini
View Replies !
Where Clause Filter
I have an sql script that has 2 main blocks of Where filter which I'd call as Filter1 and Filter2 as follows: Select DisplayColumns... From InterestingTables Where (Filter1) --W1 AND --W2 NOT --W3 (Filter2) --W4 Note that Filter1 and Filter2 are composite filters (inner filters nested; it shouldn't matter as long as I have the outer parenthesis as above, right?). Now, say SetF1ExF2 is the result set of the sql script above. Additionally, let's say I obtain the result set SetF1 by having W2 to W4 commented out and SetF1AndF2 comes from commenting out W3. Shouldn't the following hold: SetF1AndF2 = SetF1 - SetF1ExF2 I am having a discrepancy between the values with SetF1AndF2 < SetF1 - SetF1ExF2. TIA.
View Replies !
How To Include Variable In CURSOR SQL Filter Clause?
After trying every way I could come up with I can't get a filter clauseto work with a passed variable ...I have a cursor that pulls a filter string from a table (works OK),then I want to use that filter in a second cursor, but can't get thesyntax ...@bakfilter is equal to "MISV2_db_%.BAK" before I try to open and fetchfrom the second cursor. Here is the cursor declaration:DECLARE curFiles CURSOR FORSELECT FileName, FileDateFROM DataFileWHERE (((Active)=1) AND ((FileName) LIKE '@bak_filter'))ORDER BY FileDate DESCWhat do I need to do to get it to use the string contained in@bak_filter?Thanks in advance, Jim
View Replies !
Filter Criteria - Temp Table Join Or Where Clause?
I have a set of udf's dealing that return a one column table of valuesparsed from a comma delimeted string.For example:CREATE FUNCTION [dbo].[udf_filter_patient](@patient_list varchar(2000))RETURNS @patient TABLE(patient_id int)ASBEGINinsert into @patientselect patient_id from patient-- parse @patient_list stuff excludedRETURNENDI have come up with the following two schemes to use these udfs. Theseexamples are obviously simplified, and I have a handful of stored proceduresthat will use between 10 or more of these filters. If the two areequivalent, I prefer Method 2 because it makes for much neater SQL whenusing many filter criteria.So my question is, will one noticebly outperform the other? Or is there abetter way in which to filter on a list of criteria?Method 1 :CREATE PROC sp__filter_open_bills@patient_list varchar(2000)ASCREATE TABLE #patient(patient_id int)INSERT INTO #patientSELECTpatient_idFROMdbo.udf_filter_patient( @patient_list )SELECT*FROMopen_billsINNER JOIN #patient on #patient.patient_id = open_bills.patient_idGOMethod 2 :CREATE PROC sp__filter_open_bills@patient_list varchar(2000)ASSELECT*FROMopen_billsWHEREopen_bills.patient_id IN ( SELECT patient_id FROMdbo.udf_filter_patient( @patient_list ) )GOThanks for the help!Chris G
View Replies !
Sql Server 2005 Profiler
Dear friends, I got script for creation trace file on server drive. and it's work fine,when we migrate to sql server 2005 i take the same script for this trace and he create it successfully but the problem when i try to open this file for example today file: SQL-Server1 SQL Trace20080417000000847.trc I got the following message: Sql server profiler :failed to open a file ,access denied. old files created by sql server 2000 ,i can open it until now but the file created after migrate to sql 2005 ,i got that message above.
View Replies !
Sql Server 2005 Profiler
Guys/Girls Have a problem am currently running a sql trace on a database, have the normal options setup. Stored Procedures RPC:Completed RPC:Starting TSQL SQL:BatchCompleted SQL:BatchStarting But am also using the text data field but am trying to only bring back items that have a certain string like. Does anybody know how to use wild cards in the text data colounm Lee
View Replies !
About The SQL Server Profiler 2005
Hi everyone,I am steven. I have some questions about the SQL Server Profiler 2005. 1,haoI am using TransactionScope of .Net Frameworks 2.0 for DB query and update.I want to know the lock level(table,page,row,etc) and status of lock status(u,s,x,etc) by profiler tool when I run the query and update statement.How can I do? 2,I had got some traces when I run the DB query and update.But I cann't understand the meaning of the trace.such as Binary Data,ObjectID,Type,etc.How can I know the meaning of these? Whould anyone can help me?
View Replies !
Errors In SQL Server 2005 Profiler
I notice this running the SQL Server Profiler under the application name Report Server. Every time it runs, it reports an error (in the Error field of Profiler). Does anyone know what this is?declare @p1 nvarchar(64)set @p1=NULLexec GetDBVersion @DBVersion=@p1 outputselect @p1
View Replies !
Profiler For SQL Server Express 2005
Dear All, I need a tool to see what transactions and in what order are being issued against the SQL Server Express 2005 DB. Because of the SQL Server tools don't come with SQL Server Express 2005, then i run SQL Server 2000's Profiler with SQL Server Express 2005. But It prompt error "Failed to start a new trace". FYI, i don't want to use the backend sql trace .in command prompt.. Pls advise me on how to run the sql profiler to trace the transaction being executed in SQL Express 2005? Thank you.
View Replies !
Profiler In SQl Server 2005 Express Edition
Is it possible to install SQL server profiler in Express Edition. I know it can be installed in SQL server 2005. Once I tried installing in Express edition and it did not work. What is the main diofferenve between SQL Server 2005 and Express edition? Thanks
View Replies !
Profiler Trace With SSE 2005 (SQL Server Express)
Someone Please Help! How on earth can a Profile Trace be run where SSE 2005 is installed??? In the past, with MSDE, we always installed the 'tools' on a local workstation, so that we had EnterPrise Manager and its suite of tools...no problem. Yet, with Management Studio Express (err...Distress?), there's no way to do this! I've scoured the net, and I see threads where people have done it, yet, no one seems to be clear...including Microsoft...on how to obtain this MOST IMPORTANT of all tools for an SQL deployment. Please Help! Someone...Anyone!...Thank You!...Michael
View Replies !
SQL Server 2005 - Filter For This Month Only
Hi, I have done a quick search for a similar topic, but I don;t think they are what I need. What I want to do is (when creating a view in the database) I want to filter entries in my table that have only been created this month (the field I am looking at is called DateDB), I'm not sure how to do this, I have tried =MONTH(GETDATE()), but this doesn't return any values at all. Is there a way of doing this?
View Replies !
Stmt Text From Profiler
does anyone have a script that cleans up profiler traces by removing the variables from tsql. thereby giving you the procedure text as written. I saw this a few months ago and havent had any luck in finding it. anyone?
View Replies !
Replication With Filter
Hi All, I've done my replication successfully between SQL Server 2000 and SQL Server CE. But how if I want to filter my replication? For example :- At Table1 have 5 field which is UserID,Month,Year,Price,ItemCode I want to filter replication data with UserID and Month and Year. How can I do it? Thank you!!
View Replies !
Replication Filter Bug?
Im using SQL 2005 SP2 as the publisher and SQL Mobile subscribers and Im convinced I have found a replication bug .....but maybe Im just being stupid! I have an account manager table which links to companies and users. The organisation table use a nasty @subset_filterclause filter against the account management table to decide what records to retrieve for each subscriber. This works fine and updates either way are replicated as you would expect. However when an account manager is changed and the organisation no longer fulfils the filter criteria, it is not removed from the subscriber (unless I delete the db and download it from scratch) Surely this is a bug? Just to clarify the filter clause was ok, I added the account management table to the filtered tables using the exact same @subset_filterclause. Now when I change an account manager, the account management reocrd is correctly removed from the subscriber but the organisation record remains on the subscriber? Have I missed something obvious?
View Replies !
Setting Up Filter For RDA Replication
Hi! I have a WM5 device with Sql Server CE 3.0 and Sql Server 2005 on the serverside. I set up RDA and it works fine until I try do pull a little more advanced query. Instead of pulling a simple table with where clause I created a query that joined two tables returning values from only one. It doesn't seem to be possible, is it? If it's not, is it someway I work around this? /Magnus
View Replies !
How To Filter Condition While Transactional Replication
Hi All,I have a table with a column DeletedDate which stores a logical deleteof a record.I need to set up transactional replication for reporting purposes thatthis deleted records should not be replicated to the subscriber. Thatis, if i see a value on the DeletedDate, I don't want that record tobe picked up for replication.At the same time, when someone marks the record for deletion (byputting a date on the DeleteDate column), I want that record to bedeleted on the subscriber database. (I can also set up a job to do thedeletes on the subscriber but i'd rather let the replication take careof it).Can this scenario be implemented in Microsoft SQL 2000? I wouldappreciate any ideas / thoughts in this matter.Thanks in advance,Aravin Rajendra.
View Replies !
Filter Records During Transactional Replication.
Hi All,I have a table with a column DeletedDate which stores a logical deleteof a record.I need to set up transactional replication for reporting purposes thatthis deleted records should not be replicated to the subscriber. Thatis, if i see a value on the DeletedDate, I don't want that record tobe picked up for replication.At the same time, when someone marks the record for deletion (byputting a date on the DeleteDate column), I want that record to bedeleted on the subscriber database. (I can also set up a job to do thedeletes on the subscriber but i'd rather let the replication take careof it).Can this scenario be implemented in Microsoft SQL 2000? I wouldappreciate any ideas / thoughts in this matter.Thanks in advance,Aravin Rajendra.
View Replies !
Merge Replication And Filter Columns
Hi, I am trying to merge replicate two tables on two sql 2000 servers. I have got the merge replication working fine between the two servers, however when I remove a column in the "Publication Properties" --> "Filer Columns" it starts reporting errors. I have got the published to run the "Snapshot agent". The error is as follows: The process could not deliver the snapshot to the Subscriber. (Source: Merge Replication Provider (Agent); Error number: -2147201001) --------------------------------------------------------------------------------------------------------------- The process could not bulk copy into table '"dbo"."userdata"'. (Source: MYSERVER (Agent); Error number: 20037) --------------------------------------------------------------------------------------------------------------- Unexpected EOF encountered in BCP data-file (Source: ODBC SQL Server Driver (ODBC); Error number: 0) --------------------------------------------------------------------------------------------------------------- If I add the column back in the replication starts working fine again. The reason I am trying to put in a vertical filter is because the table at the subscriber contains columns which should remain independant of the replicated data. If I change the snapshot agent so that it recreates the table at the subscriber it drops the columns that I've defined in the vertical filter. In summary, what I'm trying to do is have two identical tables on two servers that have a few columns that do not get replicated. Is this possible or do I need to move these columns into other non-replicated tables? :rolleyes: Any thoughts or infomation will be gratefuly received. Matthew. matthew.cantillon@ymonda.co.uk
View Replies !
Row Filter Error In Snapshot Replication
I am having problems specifying a row filter for a snapshot replication. Since installing SQL Server 2000, I am unable to specify ANY row filter. No matter what I specify, I get the following error message: Error 170: Line 1: Incorrect syntax near '0' For example, trying to match the example given, I try to filter a state code table based on a single value, and supply the following filter: SELECT <published_columns> FROM <<table>> WHERE <<table>>.st_cd = 'WI' I get this same error whether the field is alpha or numeric, whether it is a new or existing publication, no matter which operators I use (=, >, <>). I am using SQL Server 2000 with Service Pack 1. If nothing else, I am interested to know: has anyone else been successful at specifying a row filter in SQL Server 2000? Is this just a problem at my installation or is this a bug in SQL 2000?
View Replies !
Merge Replication With Dynamic Filter
Brand new to SQL Server 2005 and replication, I was able to use online books info to get a replication topology set up (using wizards) and successfully replicate an article (a single table) to a SQL Server Express database. I then cleared the subscription table and added a simple dynamic filter (colx = SUSER_SNAME()), which I can't get to work. Based on what I read, I'm thinking that SUSER_SNAME() is not returning the proper value because the merge agent is set to connect to the publisher and distributor by 'impersonating the process account'. This is on the subscription merge agent security form. However, 'using a SQL Server login' is greyed out and nothing I tried will enable it, including setting up logins and SQL user ids on the publisher and playing with entries on the publication properties data partitions page, etc. I think that I have discovered only some of the pieces that I need and not enough details to find the rest and put them together. Any info on what to have set up where would be appreciated. Any suggestions for 'step by step' information that would help in addition to SQL Server 2005 Books Online would be great. Thanks in advance.
View Replies !
Is This A Known SQL Server 2005 T-SQL Bug With Sub-selects In An IN Clause
Try the following code in SQL Server 2005: Code Snippet CREATE DATABASE test_bug GO USE test_bug GO CREATE TABLE test1 ( a int ) CREATE TABLE test2 ( b int ) GO INSERT INTO test1 VALUES ( 1 ) INSERT INTO test2 VALUES ( 2 ) GO SELECT * FROM test1 SELECT * FROM test2 GO -- This should error but instead returns all rows from test1 SELECT * FROM test1 WHERE a IN ( SELECT a FROM test2 ) I've tried it onw three different boxes that I have access to.
View Replies !
Filter Dost Not Work In Merge Replication
Hello everyone, Can any one please help me out how to fix the following? I would greatly appreciate it. The filter in my merge replication does not work. I have create the mege replication using T-SQL not from enterprise manager. by specifiying the following filter clause. @subset_filterclause = N'UPDATE_DATE > CURRENT_TIMESTAMP - 30' SQL Server synchronizes the data how ever it does not deletes the records from the subscriber which is 30 days or older. Other details in the environments Subscriber is MS Access database with MDAC 2.8 installed on both server and PC Server does not have SQL Service pack 1 installed. O/S is Windows 2000 with service pack 4 installed. thanks Masanam
View Replies !
Merge Replication Using A Guid As A Dynamic Filter
Hi ... I am working on a project where the server version of application has vouchers from different entities. I have created a publication manually. My next step was to create a client subscription using rmo and to execute a pull. This part works fine. Code samples from http://msdn2.microsoft.com/en-us/library/ms147314.aspx My next step would be to implement dynamic filtering using the guid of the entity as a parameter. I dont want to use suser_sname() or host_name() as I want to use a fixed login for the replication for all users, and a client could have several host dbs (sql express, sql mobile) My goal would be to pass a guid-value to the HostName Property of the MergePullSubscription class and convert it to an uniquidentifier and use it as a filter as I have not found any other way to pass a guid as a filter. RMO-Code: subscription.HostName = "4bb0e468-c68a-4253-ba82-f71c3a6e302d" Filter: SELECT <published_columns> FROM [dbo].[voucher] WHERE [entity_ID] = dbo.fx_ConvertHostToEntity() Function: create function fx_ConvertHostToEntity() returns uniqueidentifier as Begin declare @host nvarchar(50) set @host = host_name() declare @entity uniqueidentifier set @entity = cast( @host as uniqueidentifier) return @entity End When trying to set the filter sql server complains that a character string cannot be casted to a uniqueidentifier - so i can not set this filter. Is there a way to pass a parameter other then the username or the hostname as a filter? SELECT <published_columns> FROM [dbo].[voucher] WHERE [entity_ID] =@entity, where @entity is a guid Thanks for your support Alex
View Replies !
SQL Server 2005 Is Rtrim Needed In Where Clause?
When is RTRIM needed in a Select ... where clause. I noticed that if I have a column named TEXT varchar(17) which is varchar and in the where clause I state where TEXT = 'This is the text' or I state TEXT = 'This is the text ' followed by 4 spaces The equate still works - so when do I need RTRIM? Do I need RTRIM for a host variable: ...where TEXT = RTRIM(:VAR_001) if the host variable is the same length as the TEXT column field in the SQL Server 2005 database?
View Replies !
Merge Replication- Update To Filter Table Times Out
I have a merge replication setup in MSSQL 2005. It has one main table which is filtered by host_name and a number of other tables are joined to this filtered table using a merge filters (ID of the main table is FK to the joined tables). The replication works and changes are propogated in both directions from the publisher to the subscriber and vice-versa. However, an update to the main table itself fails (times out) both in code and the SQL Mgmt Console. If the publication is dropped the update goes through without a problem. I suspect the merge article triggers are trying to change the snapshot even as the update is taking place and hence the update times out. If there was a way to defer the updating of the snapshot, there might be a solution. Any help would be greatly appreciated. Thanks Reggie
View Replies !
SQL Server 2005 Performance - Where Clause Range Retriaval
Everything is flowing smoothly for the SQL Server Database I have, except one type of retrieval and that is when the where clause has a range of data values to do the retrieval then the performance is terrible. I cannot anticipate every range. There are indexes on the table to try to help; however, nothing seems to help. Has anyone had a similiar problem? Any suggestions to improve performance? Thanks, Mary
View Replies !
INSERT INTO OPENROWSET Does Not Respect ORDER BY Clause On SQL Server 2005 EE
Hi, I need to pass data from a SQL Server data base to an Access data base. To do this I use the OPENROWSET as followed: FR INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'C:Aux.mdb'; 'Admin'; '',Test) (Id, Name, TypeId) SELECT Id,Name,TypeId FROM Test ORDER BY TypeId FR On SQL Server 2000 or MSDE the data is transfered as expected, respecting the specified order. But when I run the same clause on a SQL 2005 EE the data is transfered, but the order is not respected. So my question is if I have to activate an option for the order to be respected or if this is a bug. Best regards, Ângelo Vilela
View Replies !
Null Values In TextData For Events 41 And 42 Using Fn_trace_gettable
I tried to trace all sql statements performed on a database. I don't use Profiler because this is a SQL Server version distributed with Studio 2008 Express. So I made a trace in TSQL, but most columns in the trace file are nulls... Here is what I did to create this trace: Create a new trace: Code Block DECLARE @TraceID INT DECLARE @MaxSize bigint SET @MaxSize = 15 EXECUTE sp_trace_create @TraceID output, @options = 2, @tracefile = N'C:Tracefile', @maxfilesize = @MaxSize (here @TraceID == 2) Set up columns and events: Code BlockDECLARE @TraceID int DECLARE @On BIT DECLARE @Event1 int SET @On = 1 SET @TraceID = 2 SET @Event1 = 14 EXECUTE sp_trace_setevent @TraceID, @Event1, 1, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 2, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 4, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 6, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 8, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 9, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 11, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 14, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 15, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 18, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 22, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 27, @On EXECUTE sp_trace_setevent @TraceID, @Event1, 28, @On -- the same code for events 15, 40, 41, 42, 43, 50, 71, 72 END Activate the trace: Code BlockEXECUTE sp_trace_setstatus 2, 1 Then I entered some sql statements using both MS SQL Server Management Studio Express and my ADO.NET application written in Studio 2008 Express mainly by dragging and dropping (so it was autogenerated). I logged in and out. Disactivated the trace: Code BlockEXECUTE sp_trace_setstatus 2, 0 Finally the following statement: Code BlockSELECT TextData,BinaryData, TransactionID, NTUserName, HostName, ClientProcessID, LoginName, StartTime, EndTime, CPU, ObjectID, EventClass, ObjectType FROM fn_trace_gettable('c:Tracefile.trc',default) produced mostly null values, except StartTime and EventClass columns. The EventClass values were 65528, 65534, 65533. So, the question is, how to get the sql statements that are performed on the server? What is wrong with this procedure? I think I picked up correct events (41 and 42) to show the statements. Besides.. I think all other columns should not be null as well. Why almost everything is null ? Last question, what are these events 65528, 65534, 65533 ? There are no such numbers in tables sys.events and sys.trace_events and sys.trace_subclass_values. Also I couldn't find them in internet.
View Replies !
Full Text Search Indexing HTML - Does The Filter Expect Certain Tags To Be Present As Standard?
Hi, I was wondering if any SQL Server gurus out there could help me...I have a table which contains text resources for my application. The text resources are multi-lingual so I've read that if I add a html language indicator meta tag e.g.<META NAME="MS.LOCALE" CONTENT="ES">and store the text in a varbinary column with a supporting Document Type column containing ".html" of varchar(5) then the full text index service should be intelligent about the language word breakers it applies when indexing the text. (I hope this is correct technique for best multi-lingual support in a single table?)However, when I come to query this data the results always return 0 rows (no errors are encountered). e.g.DECLARE @SearchWord nvarchar(256)SET @SearchWord = 'search' -- Yes, this word is definitely present in my resources.SELECT * FROM Resource WHERE CONTAINS(Document, @SearchWord)I'm a little puzzled as Full Text search is working fine on another table that employs an nvarchar column (just plain text, no html).Does the filter used for full text indexing of html expect certain tags to be present as standard? E.g. <html> and <body> tags? At present the data I have stored might look like this (no html or body wrapping tags):Example record 1 data: <META NAME="MS.LOCALE" CONTENT="EN">Search for keywords:Example record 2 data: <META NAME="MS.LOCALE" CONTENT="EN">Sorry no results were found for your search.etc.Any pointers / suggestions would be greatly appreciated. Cheers,Gavin.UPDATE: I have tried wrapping the text in more usual html tags and re-built the full text index but I still never get any rows returned for my query results. Example of content wrapping tried - <HTML><HEAD><META NAME="MS.LOCALE" CONTENT="EN"></HEAD><BODY>Test text.</BODY></HTML>I've also tried stripping all html tags from the content and set the Document Type column = .txt but I still get no rows returned?!?
View Replies !
Full Text Search Indexing HTML - Does The Filter Expect Certain Tags To Be Present As Standard?
Hi, I was wondering if any SQL Server gurus out there could help me... I have a table which contains text resources for my application. The text resources are multi-lingual so I've read that if I add a html language indicator meta tag e.g. <META NAME="MS.LOCALE" CONTENT="ES"> and store the text in a varbinary column with a supporting Document Type column containing ".html" of varchar(5) then the full text index service should be intelligent about the language word breakers it applies when indexing the text. (I hope this is correct technique for best multi-lingual support in a single table?) However, when I come to query this data the results always return 0 rows (no errors are encountered). e.g. DECLARE @SearchWord nvarchar(256) SET @SearchWord = 'search' -- Yes, this word is definitely present in my resources. SELECT * FROM Resource WHERE CONTAINS(Document, @SearchWord) I'm a little puzzled as Full Text search is working fine on another table that employs an nvarchar column (just plain text, no html). Does the filter used for full text indexing of html expect certain tags to be present as standard? E.g. <html> and <body> tags? At present the data I have stored might look like this (no html or body wrapping tags): Example record 1 data: <META NAME="MS.LOCALE" CONTENT="EN">Search for keywords: Example record 2 data: <META NAME="MS.LOCALE" CONTENT="EN">Sorry no results were found for your search. etc. Any pointers / suggestions would be greatly appreciated. Cheers, Gavin. UPDATE: I have tried wrapping the text in more usual html tags and re-built the full text index but I still never get any rows returned for my query results. Example of content wrapping tried - <HTML><HEAD><META NAME="MS.LOCALE" CONTENT="EN"></HEAD><BODY>Test text.</BODY></HTML> I've also tried stripping all html tags from the content and set the Document Type column = .txt but I still get no rows returned?!?
View Replies !
Disappearing Parameterised Filters And Filter Joins In Publication Properties Page Of Replication Monitor
Hi, We have an issue with our replication configuration when viewed through replication monitor. Parameterised Filters and joined filters don't appear in the gui. However, when we script the publication all the filters are present. This issue only seems to occur when we have a remote distributor. I should also point out that we have a merge push topology that uses a custom RMO synchronisation component on a separate server to either the publisher or the distributor. Also all the databases in the topology are called the same name. This has caused us other issues relating to this topology in particular so I raise it here as well although I don't expect it to be the case in this instance. Any help would be greatly appreciated in clarifying this matter.
View Replies !
Dynamic Table & Contains Clause For Full Text Searches
I'm trying to create a stored proc that will pass in a table & a contain clause to execute a select statement using a full text index search. I tried: CREATE PROCEDURE dbo.sp_Select_Keywords @table varchar(50), @contains varchar(100) AS SELECT * FROM @table WHERE CONTAINS(@contains) The @contains is a valid contains clause: (column_name, '"search_criteria"') - the parenthesis aren't in the clause. The @table is an existing table. I also tried making it a table type, as well as declaring another table variable & assigning the parameter to the variable. Any ideas???
View Replies !
|