Dtexec /L Logging To Text File Is Not Working

Mar 15, 2007

I am looking to promote a SSIS package to various servers. The name and location of the text Log File setup in BIDS for the package is expected to change. The SSIS package will be executed through a 3rd party scheduler as a batch command file.


I am trying to use this command to change the location
dtexec /F DASD_Database_List_export.dtsx /L "DTS.LogProviderTextFile.1;E:Log.txt"

For which I am getting this error:

Description: The connection manager "E:log.txt" is not found. A component failed to find the connection manager in the Connections collection.


I tried Set command approach from
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72104

It did not work.


Has anyone been successful in using the dtexec log parameter DTS.LogProviderTextFile.1? Could you post how you got it to work? Thanks

View 5 Replies


ADVERTISEMENT

Saving SSIS Results To Log Or Text File Using Dtexec

Jun 5, 2006

Hi,

How to save the SSIS package results to log file using dtexec command............please help regaridng this...........



Thanks in advance,

View 5 Replies View Related

Excessive Dtexec Logging Post SP2

Jun 25, 2007

Since the other related topic is closed/answered...



The Short version:

SQL is now logging too much info with every package. The volume of the new "User: Diagnostic" event has caused some packages to fail and the command-line exclusion option appears to have no effect on the events logged to the SQL provider. Is this a bug in dtexec or am I using the wrong syntax to exclude log entries? I don't want to modify all of my SSIS packages...



More Info:

SQL SP2 introduced new logging events, most of which appear to get logged by default. So far, none of our packages have used any sort of explicit logging configuration; it's all been set at the command line using a syntax like shown below:



dtexec.exe /FILE "D:SSIS PackagesMyAppVendors.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REP E;Diagnostic /LOGGER "{6AA833A1-E4B2-4431-831B-DE695049DC61}";"MyDBConnName"



This does appear to correctly limit what gets logged to the console (and thereby the SQL Agent's job step log), but has no effect on what's logged to the database. Normally, I'd use /REP EWDCI, but I was attempting to limit the log entries to Errors only.



I first came across this error when a package failed, but it only logged the following to the console with nothing in sysdtslog90 (while not the "latest/greatest" server, this is a relatively low-utilized quad 2.8ghz xeon ProLiant DL580 G2):


Error: 2007-06-21 06:01:30.45
Code: 0xC0202009
Source: MYPACKAGENAME Log provider "{0C3CBE9B-D828-41C2-98D2-99BA498B314A}"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Connection is busy with results for another command".
End Error
Error: 2007-06-21 06:01:30.46
Code: 0xC0014010
Source: MYPACKAGESTEP Load
Description: The SSIS logging provider "{0C3CBE9B-D828-41C2-98D2-99BA498B314A}" failed with error code 0xC0202009 ((null)). This indicates a logging error attributable to the specified log provider.
End Error

I changed this one package to only log OnError events, but I'd rather not have to change every package to do the same, plus I'd like the ability to easily turn on verbose or any other logging level when needed.

View 1 Replies View Related

Suppress DTexec Windows Event Logging

Mar 27, 2007

When using Dtexec to run a package, is there a way to prevent/suppress the windows event log information messages:

- Package "Xyz" started.

- Package "Xyz" finished successfully.

View 6 Replies View Related

DTExec Is Not Working In Xp_cmdShell

Jul 9, 2007

Hi All,



When I was trying to execute an SSIS package from DTExec using xp_cmdShell, it is giving an error message saying "unrecognized command,...". This error I am getting only in my Staging Environment. But at the same time, it is working fine with Development and Production servers.



I suspect the issue should be with config or access issues. So if anyone of you faced the same problem or if anyone have any solution, please share with me.



Thanks in advance for your help.



Thanks & Regards,

Prakash Srinivasan

View 1 Replies View Related

Logging Not Working

Jan 17, 2008

Hi,

I have several packages where I set up logging to SQL Server.

Originally, I had my logging pointing to Server A, database A (the same server that stores the packages).

Later, I changed the logging to point to Server B, database B (but the packages still are on server A).

I granted execute on "sp_dts_addlogentry" to my OLE DB connection user on Server B. When I run a package, it created the logging table in the form: [OLE DB connection user].sysdtslog90.

Everything seems ok (although on Server A, the sysdtslog90 table belongs to "dbo", which doesn't make any sense to me, because I've only connected to the database through my OLE DB connection user in both cases - so why does one table belong to the "OLE DB connection user", and the other "dbo"?

However, when I run a select on user.sysdtslog90 on Server B after running my packages, there's no entries. I know that at minimum, there should be "start" and "end" package entries. So the point is, the logging is working when I point to Server A, but not Server B.

What's going on here?

Thanks


View 7 Replies View Related

Logging Isn't Working Properly

Oct 2, 2007

Hi,

I have several packages where I set up a SQL Server log provider. The packages are all called from jobs.

However, for some reason, only ONE of the packages is logging to the sysdtslog90 table in my specified database.

All of packages have the identical set up for the logging. Here are my settings under logging:

PROVIDERS AND LOGS:
Name: SSIS Log Provider for SQL Server (box is checked)
Configuration: ServerName.DBName (I use this same connection for all the packages)

DETAILS:
OnError is checked

CONTAINERS:
All items are checked

So what's going on here? I have successfully logged to this table using test cases in BIDS, and as I mentioned, ONE of the packages is actually logging to the table when it's called from the job.

Thanks



View 5 Replies View Related

Dtexec Vs Configuration File

Oct 9, 2007

Hello,

I have a package where I store connection managers in a configuration file (XML file). I updated manually the XML file to add the passwords.

When I launch the command line generated by dtexecui, everything is good:
"dtexecui /FILE "E:mssql90DTSPackagesBVOMDWRefreshStage Refresh EUR 1.dtsx" /CONFIGFILE "E:mssql90DTSPackagesBVOMDWRefreshEnv_Prod.dtsconfig" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW "

When I launch the command line with dtexec:
"dtexec /FILE "E:mssql90DTSPackagesBVOMDWRefreshStage Refresh EUR 1.dtsx" /CONFIGFILE "E:mssql90DTSPackagesBVOMDWRefreshEnv_Prod.dtsconfig" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW ",
I have the familiar error: "Failed to decrypt protected XML node "DTSassword""

I have the package level set to "EncryptSensitiveWithUserKey", but I think I don't need to update it to "EncryptSensitiveWithPassword" because it works with dtexecui.

I don't understand... What I should do?

Thanks,
Guillaume




View 7 Replies View Related

Problem: SSIS Package Failure Using 32-bit DTExec And 64-bit DTExec

Apr 17, 2008

Hi all,


I have a serious problem with my SSIS Package while executing using 32-bit DTExec and 64-bit DTExec.


Here are the details:

Environment:

Windows Server 2003 64-bit (Build 3790: Service Pack 2)
SSIS 32-bit & 64-bit installed
SQL Server 2005 (Microsoft SQL Server 2005 - 9.00.1399.06 (X64) - RTM)

SSIS Package details (compiled in 64 bit)

Script tasks only
Microsoft Visual Basic .NET (using TRY...CATCH block)
PreCompileScriptIntoBinaryCode = TRUE
Run64BitRunTime = TRUE

Execution

Batch file that uses DTExec to execute the Package.

SCENARIO
I am trying to exeucte the above SSIS package using both 32-bit and 64-bit DTExec to make it failure by providing invalid connection string. Here are the details,


Wrong connection String using 32-bit Execution

While establishing the connection the error message has been nicely captured in to my Exception block and writes into the log file.

Wrong connection String using 64-bit Execution

While establishing the connection the error has not been catpured anywhere (although I have TRY CATCH block) and it haults there itself with the message "Process is terminated due to StackOverflowException". Later I found that the error is due to the connection string along with the unhandled exception.

Please suggest any one of the following my findings, also if you have any other advice would be very much appreciated.

1. Shall I go ahead and fix the issue by handling those unhandled errors? (e.g Appdomain, application). I tried several but still not working using 64-bit DTExec.

2. Shall I go ahead and use 32-bit DTExec to execute the package? If so, is there any other major issue...like performance or anyother bug?


P.S: We cannot apply any service pack for SQL Server 2005 at the moment. Sorry abt it. If you have any specific hotfix for DTExec (without affecting SQL Server) then we can decide.

Sorry for the lengthy one and Thanks very much for you help in advance .



Thanks again!

Suresh






View 13 Replies View Related

How To Add Error Logging File In SSIS

Jun 6, 2008

Just like in DTS where we can add error file so that if the DTS package fails we can see what caused the DTS to fail, likewise do we have anything like error logging file in SSIS. I greatly appreciate your help on this. thanks!!

View 1 Replies View Related

Write IS Logging In Flat File

May 2, 2007

Hi,


I've created SQL Server job that executes my IS package in regular schedule, is there a way to redirect IS logging (Progress tab when the package is executed from VS) to flat file in same path as my packge.

When my job fails I want to know wich particular step fail and progress tab olso contain usefull info like the duration for each step.



Thank very much for your help

View 1 Replies View Related

Logging Inserts From Flat File

Apr 25, 2007

Can someone tell me if SQL server logs individual inserts when copying from Flat File to OLE DB Destination? If so, can this be turned off?



ULTIMATELY, I would like to use a Bulk Insert task, but it looks like it is pretty specific to a single DB and a single table in the DB. I would like the Bulk Insert task to be generic enough to where I can specify (via Parameters) the DB and table for the Bulk Insert because this task will be performed in an iteration of many different flat files.



Sorry I never seem to have a "simple" question. My DBA is breathing down my neck here..


View 18 Replies View Related

SSIS Logging -- How To Overwrite Old Log File.

Jul 28, 2006

After logging is configured in SSIS package, it seems that after each execution the output is appended to the log file (we are talking about log provider for text files in this case). As a result the file just keeps on growing. I would like to overwrite old information with each run, but I can't find where to configure this. Anybody knows?

Thank you!

View 4 Replies View Related

Logging Stored Procedure Changes Into File

Jul 25, 2007

Hello all,

I have a big stored procedure which is going to alter many tables,insert data, basically lot of changes.

So, i want to have a text file (or) any log file which will display, what all the changes does the stored procedure has done ( They dont want profiler output )

Can anybody know how to log the results of execution of stored procedure to a text file.

Thanks.

View 2 Replies View Related

Turning Off Logging / Avoiding Huge Log File

Nov 15, 1999

Help,

Have a user who needs many data changes to a huge table with over 2 million rows.
He hopes to do this by running a series of queries.

Last time our log grew gargantuan. I know 7.0 is wonderful & dynamic, but after
an hour of rambling through books online I'm more confused than ever.

Is there a way we can code into his query at intervals any hard coded checkpoints
or log backups? Do we need to dbcc shrinkfile the logfile?

Thanks,

Mark Blackburn
mark@mbari.org

View 1 Replies View Related

SSIS Logging To Flat File Destination

Jul 24, 2006

Hi

I am trying to use a conditional split task so that I can check for specific fields. If the value doesn't exist I am piping the records to a derived field task, where I add an error. I then try to send these records to a flat file destination so that I can keep track of them. However, when I execute the SSIS data flow task I get the following error

[Log Invalid Records [5496]] Warning: The process cannot access the file because it is being used by another process.

This file isn't being used by any other process as far as I can tell, and the only process using it is the SSIS task trying to write to it.

If anyone has any ideas, then I would really really appreciate it

Thanks

Darrell

View 12 Replies View Related

What Is The Best Way To Combine Two Text File Into One Text File In SSIS

Mar 20, 2008



Hi,

I am looking for a way to combine two text files into one file. I am thinking of using a batch file (DOS command ) to do it. Any suggestion please?

View 6 Replies View Related

Text Qualifier {} Not Working

Apr 10, 2006

I have installed Standard SQL 2005. I have a problem to import text file in db because of text qualifier {"} not working.

Does anyone have the same problem? Is it a problem in my installation?

Thanks for ant comments.



Jian

View 9 Replies View Related

Full Text Is Not Working For Me

Nov 28, 2006

Hi all,



I havent found any time difference between the FTS and normal search.

I have created Full text search successfully in wrk_contact table.



CREATE UNIQUE INDEX UI_UKContact ON wrk_contact(id_contact)

CREATE FULLTEXT CATALOG contact_cat AS DEFAULT;

CREATE FULLTEXT INDEX ON wrk_contact(lastname) KEY INDEX UI_UKContact;



I have inserted 1.5 lac of records in that wrk_contact table.



I am trying to do following query



SELECT distinct *
FROM wrk_contact
WHERE CONTAINS(
lastname, '"g*"'
)



Same set of records i have inserted in wrk_contact_tmp table without creating full text search.

I was doing the following query




SELECT distinct *

FROM wrk_contact_tmp

WHERE lastname like 'g%'



I ran both queries seperatly but the execution time for the both queries are same..



Any mistake i made please help me.



Regards

gomaz

View 3 Replies View Related

Logging To Event Viewer Fails But SQL Server Logging Works OK - Why?

Jun 18, 2007

Greetings,



I am developing a package on my local workstation. I have defined two logging service providers. One is for SQL Server and the other is for the Windows Event Log. I am using the Dts.Log method in a script task to write log entries.



Logging is working properly with the SQL Server provider and rows are being inserted into the sysdtslog90 table. However, the only events that are being logged in the Windows Event Log are the package start and end events which I believe SSIS is doing automatically anyway.



Is there something I need to do to enable WIndows Event Log logging other than defining a log provider and making sure it is checked active? Won't SSIS write to two different logs with one Dts.Log call? Any ideas on what might be going wrong with my approach?



Thanks,

BCB

View 3 Replies View Related

Integration Services :: Logging To File System When Package Run From Catalog

Apr 20, 2015

We run std 2008 r2.  When I deploy and run a pkg from the catalog, how can I get that flat file system log we always instructed ssis to write to when we ran from the command line? I believe it was the /L param . Not sure at this point if i'll use sql agent or somehow employ task scheduler to kick off the pkg.

View 2 Replies View Related

Synchronization With Verbose History Logging And Specify An Output File To Write....

Feb 1, 2007

i had setup the merge replication across the server but each next morning i find that replication syncronization has stop with following error

The merge process was unable to access row metadata at the 'Subscriber'. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to write to, or use SQL Profiler to determine the source of the failure. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200996)



for this i manually restrat the syn. agent by stopping and then starting agent.

plz tell me how can i fix this hell of message or tell me how i call start/stop merge agent on command line so that i make script starting and stoping agent as job and will configure to run every morning.



regards

Ahmad Drshen

View 1 Replies View Related

Logging Package Name For Any Event In Sysdtslog90 Logging Table

Oct 17, 2007



Hi,
I decided to use the SQL Server log provider to store logging data of all my Integration Services packages. I also created some reports about this data for operating purposes.
I have a problem occurs the name of the executing package is not always written to the log,but the name of the single task which failed. But that is not very useful information for operating, because I do not see any chance to get the name of the package by the information which is logged in the sysdtslog90 table in the database which I defined for SSIS Logging.

How do I configure the package to always log the package information into the table, too?


Best regards,
Stefoon

View 5 Replies View Related

T-SQL (SS2K8) :: CLR / RTF To Plain Text Not Working?

Sep 23, 2014

Trying to troubleshoot an CLR/ RTF to Plain Text issue I am having.

I have 3 instances on one SQL server. Only one of the Instances is not working. Even tried deleting everything and resetting it up.

Here is the code I am testing with:

USE Test_Database
GO
DECLARE @RTF varchar(max)
SET @RTF = '{
tfansiansicpg1252uc1deff0deflang1033{fonttbl{f0 Calibri;}{f1 Arial;}}{colortbl
ed0green0blue0 ;
ed255green255blue255 ;}viewkind4paperw12240paperh15840margl1425margr1425margt1425margb1425sectdpgwsxn12240pghsxn15840
marglsxn1425margrsxn1425margtsxn1425margbsxn1425pardfs21sl276slmult1sa180{f1fs21
Test New Progress Notes - Praveen}par}';
SELECT dbo.clr_fn_ConvertRTF2PlainText(@RTF)

Here is what I am getting back:

The operation completed successfully

Not sure what to check as the other two instances are working fine.

I have CLR enabled in sp_Configure

clr enabled 0 1 11

View 2 Replies View Related

INSERT Using Text From Different Textboxes And Trying To Get It Into SQL Database (NOT WORKING)

Mar 27, 2004

If anyone has examples of pulling the text out of textboxes and passing it to a INSERT statement which then puts the data into a SQL database table please if you could pass this on that would be great.

Regards and thanks in advance.

Ryan J. Boyle

View 1 Replies View Related

Sql Function Not Working For TEXT Size More Than 8000

Feb 24, 2005

Hi,

I wrote this sql function which takes a comma seperated string of numbers, splits the numbers seperately and stores it in a table. I have specified the input parameter type as text instead of varchar, the size of the string can get more than 8000.

But the function is not working properly if the input size is more than 8000. For example if the input string is of length 8005 and this is the input string from 7995 to 8005 - '123,124,125'. It works fine till 123 and after that it throws an error, Syntax error converting the varchar value '124,125' to a column of data type int. Can anyone tell me what is wrong with this. I am using string functions like charindex, substring. I can post the full function if you want.

Thanks.

View 2 Replies View Related

Full Text Search Not Working For Sql2k

Dec 7, 2007

Hi

Issue1:
I have a sql 2k machine. I hav enabled full text indexing on this machine. There after, i inserted and updated so many records. When i do a search using the below query:
It gaves me nothing

select *
from table1
where contains
(
col1,'"keyword"'
)

Issue 2: Another issue is when i gives multiple columns in the below query for search, it throws up a syntax error message at (

select *
from table1
where contains
(
(col1,col2,col3),'"keyword"')
)


Do sql 2k does not allow this format of query(above). But, the same is working fine with one column.

Any inputs on this is highly appreciated.
Thanks!
Santhosh

View 1 Replies View Related

Full Text Substring Search Not Working

Jul 12, 2007

I have Sql server 2005 SP2.
I enabled it for Full Text search. Substring search where i enter *word* doesn't return any row.
I have a table testtable where description has word Extinguisher.

If i run a query with *ting* it doesn't return any row.
select * from testtable where contains(description,'"*xting*"') ;

But it works if i do
select * from testtable where contains(description,'"Exting*"') ;

The Full text search document says it supports substring search.
Is it an issue with sql server 2005?Please help.

View 2 Replies View Related

Flat File Loading Problem -&&> Messed Up Delimiters And Error Logging Issue

Aug 31, 2007

Hey Everyone,

I have a Data-Flow task embedded in a Sequence Container (does not fail component on error) on the Control Flow panel of the SSIS designer. This data flow task contains a connection to a Flat File Source -> A Data Transformation -> Into an OLE Db Destination.

The problem is that the Flat File isn't always delimited properly -> the client cannot be relied on to do this.

My question is when the delimiters are messed up, how can I capture the offending error row(s) from the Flat File Source?

What I've tried:
1) Set every column in the source flat file on error to: Redirect Row
2) Added a Script Transformation to pull the description and the record id out of the offending row
3) Added an Error file flat file destination to the end of the flow.

The package always fails on the Flat File Source and never Redirects the offending Row to the error output - I never see my onError Script Transformation go Green, Red, or Yellow - SSIS doesn't let it get there.

I'm really new to SSIS so sorry if this is a super basic question.

Here is the Error Text:

[Source - InventTable_csv [1]] Error: The column delimiter for column "RECID" was not found.
[Source - InventTable_csv [1]] Error: An error occurred while processing file "C:------InventTable.csv" on data row 15228.
[DTS.Pipeline] Error: The PrimeOutput method on component "Source - InventTable_csv" (1) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.
[DTS.Pipeline] Error: Thread "SourceThread0" has exited with error code 0xC0047038.

I do have the MaxErrorCount set to 1 on the Data Flow Task but still think I should see my script task execute and a log entry be generated.

Any Ideas?

Matt

View 15 Replies View Related

Error Msg 6522, Level 16, State 1 Receives When Call The Assembly From Store Procedure To Create A Text File And To Write Text

Jun 21, 2006

Hi,
I want to create a text file and write to text it by calling its assembly from Stored Procedure. Full Detail is given below

I write a code in class to create a text file and write text in it.
1) I creat a class in Visual Basic.Net 2005, whose code is given below:
Imports System
Imports System.IO
Imports Microsoft.VisualBasic
Imports System.Diagnostics
Public Class WLog
Public Shared Sub LogToTextFile(ByVal LogName As String, ByVal newMessage As String)
Dim w As StreamWriter = File.AppendText(LogName)
LogIt(newMessage, w)
w.Close()
End Sub
Public Shared Sub LogIt(ByVal logMessage As String, ByVal wr As StreamWriter)
wr.Write(ControlChars.CrLf & "Log Entry:")
wr.WriteLine("(0) {1}", DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString())
wr.WriteLine(" :")
wr.WriteLine(" :{0}", logMessage)
wr.WriteLine("---------------------------")
wr.Flush()
End Sub
Public Shared Sub LotToEventLog(ByVal errorMessage As String)
Dim log As System.Diagnostics.EventLog = New System.Diagnostics.EventLog
log.Source = "My Application"
log.WriteEntry(errorMessage)
End Sub
End Class

2) Make & register its assembly, in SQL Server 2005.
3)Create Stored Procedure as given below:

CREATE PROCEDURE dbo.SP_LogTextFile
(
@LogName nvarchar(255), @NewMessage nvarchar(255)
)
AS EXTERNAL NAME
[asmLog].[WriteLog.WLog].[LogToTextFile]

4) When i execute this stored procedure as
Execute SP_LogTextFile 'C:Test.txt','Message1'

5) Then i got the following error
Msg 6522, Level 16, State 1, Procedure SP_LogTextFile, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'SP_LogTextFile':
System.UnauthorizedAccessException: Access to the path 'C:Test.txt' is denied.
System.UnauthorizedAccessException:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, ileOptions options)
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at System.IO.File.AppendText(String path)
at WriteLog.WLog.LogToTextFile(String LogName, String newMessage)

View 13 Replies View Related

Full Text Index Not Working When Populated From Nvarchar. Bug?

Jul 11, 2007

Hi, I was wondering if any SQL Server gurus out there could help me...

I have a table I'm trying to apply a full text catalog to, however no results are ever returned due to the text column being cataloged being of varbinary(max) that's being populated from a converted nvarchar(max) value.

To re-create the problem quickly...

If I populate the column via
CONVERT(varbinary(max), 'test text')
then there is no problem, I get results as expected.

However if I populate the column via
CONVERT(varbinary(max), CAST('test text' as nvarchar(max)))
no results are ever returned.

Is this a bug with SQL Server 2005 Full Text Indexing? I'm happily creating full text catalogs when an nvarchar is not getting converted into a varbinary.

I'm setting the Document Type column to '.html' (I've tried changing this to '.txt' in case it was a fault with the html ifilter but the problem persists so I believe I can rule this out).

The reason I need to convert an nvarchar to varbinary is that the table holds multi-lingual text and I'm adding a html meta tag <META NAME="MS.LOCALE" CONTENT="ES"> to the beginning in order for the full text indexing word breaker to select the correct language to catalog the text with. The aim being to provide more relevant searches in users native languages (I've read a few articles that describe this technique, but it's the first time I've tried to apply it).

Any pointers / suggestions would be greatly appreciated. Cheers,
Gavin.

Below is a T-SQL script you can run to demonstrate the effect I'm experiencing...

-- Create test database
CREATE DATABASE FullTextTest
GO
USE FullTextTest
GO

-- Create test data table
CREATE TABLE TestTable
(
pk UNIQUEIDENTIFIER NOT NULL CONSTRAINT tablePK PRIMARY KEY,
varbinarycol VARBINARY(MAX),
documentExtension VARCHAR(5),
)
GO

-- The below single entry WILL BE FOUND (the text source is being entered directly)
INSERT INTO TestTable (pk, varbinarycol, documentExtension) VALUES (NEWID(), CONVERT(VARBINARY(MAX),'<META NAME="MS.LOCALE" CONTENT="EN">test entry 1'), '.html')

-- The bellow two entries below WILL NOT BE FOUND (the text source is taken from an NVARCHAR(MAX) value)
INSERT INTO TestTable (pk, varbinarycol, documentExtension) VALUES (NEWID(), CONVERT(VARBINARY(MAX), CAST('<META NAME="MS.LOCALE" CONTENT="EN">test entry 2' AS NVARCHAR(MAX))), '.html')
INSERT INTO TestTable (pk, varbinarycol, documentExtension) VALUES (NEWID(), CONVERT(VARBINARY(MAX), CAST('<META NAME="MS.LOCALE" CONTENT="EN">test entry 3' AS NVARCHAR(MAX))), '.html')
GO

-- Create the full text catalog
sp_fulltext_database 'enable'
GO
CREATE FULLTEXT CATALOG TEST AS DEFAULT
GO
CREATE FULLTEXT INDEX ON TestTable (varbinarycol TYPE COLUMN documentExtension LANGUAGE 1033)
KEY INDEX tablePK
GO

-- NOTE: You might need to give the catalog a chance to build before running the script below.

-- Now do a search that SHOULD RETURN 3 ROWS of data, but ONLY 1 ROW IS RETURNED
SELECT CAST(varbinarycol AS NVARCHAR(MAX)) FROM TestTable WHERE CONTAINS(varbinarycol, 'test')

View 3 Replies View Related

Full Text Index Not Working With Nvarchar Source

Jul 11, 2007

Hi, I was wondering if any SQL Server gurus out there could help me...

I have a table I'm trying to apply a full text catalog to, however no results are ever returned due to the text column being cataloged being of varbinary(max) that's being populated from a converted nvarchar(max) value.

To re-create the problem quickly...

If I populate the column via
CONVERT(varbinary(max), 'test text')
then there is no problem, I get results as expected.

However if I populate the column via
CONVERT(varbinary(max), CAST('test text' as nvarchar(max)))
no results are ever returned.

Is this a bug with SQL Server 2005 Full Text Indexing? I'm happily creating full text catalogs when an nvarchar is not getting converted into a varbinary.

I'm setting the Document Type column to '.html' (I've tried changing this to '.txt' in case it was a fault with the html ifilter but the problem persists so I believe I can rule this out).

The reason I need to convert an nvarchar to varbinary is that the table holds multi-lingual text and I'm adding a html meta tag <META NAME="MS.LOCALE" CONTENT="ES"> to the beginning in order for the full text indexing word breaker to select the correct language to catalog the text with. The aim being to provide more relevant searches in users native languages (I've read a few articles that describe this technique, but it's the first time I've tried to apply it).

Any pointers / suggestions would be greatly appreciated. Cheers,
Gavin.

Below is a T-SQL script you can run to demonstrate the effect I'm
experiencing...

-- Create test database
CREATE DATABASE FullTextTest
GO
USE FullTextTest
GO

-- Create test data table
CREATE TABLE TestTable
(
pk UNIQUEIDENTIFIER NOT NULL CONSTRAINT tablePK PRIMARY KEY,
varbinarycol VARBINARY(MAX),
documentExtension VARCHAR(5),
)
GO

-- The below single entry WILL BE FOUND (the text source is being entered
directly)
INSERT INTO TestTable (pk, varbinarycol, documentExtension) VALUES (NEWID(),
CONVERT(VARBINARY(MAX),'<META NAME="MS.LOCALE" CONTENT="EN">test entry 1'),
'.html')

-- The bellow two entries below WILL NOT BE FOUND (the text source is taken
from an NVARCHAR(MAX) value)
INSERT INTO TestTable (pk, varbinarycol, documentExtension) VALUES (NEWID(),
CONVERT(VARBINARY(MAX), CAST('<META NAME="MS.LOCALE" CONTENT="EN">test entry
2' AS NVARCHAR(MAX))), '.html')
INSERT INTO TestTable (pk, varbinarycol, documentExtension) VALUES (NEWID(),
CONVERT(VARBINARY(MAX), CAST('<META NAME="MS.LOCALE" CONTENT="EN">test entry
3' AS NVARCHAR(MAX))), '.html')
GO

-- Create the full text catalog
sp_fulltext_database 'enable'
GO
CREATE FULLTEXT CATALOG TEST AS DEFAULT
GO
CREATE FULLTEXT INDEX ON TestTable (varbinarycol TYPE COLUMN
documentExtension LANGUAGE 1033)
KEY INDEX tablePK
GO

-- NOTE: You might need to give the catalog a chance to build before running
the script below.

-- Now do a search that SHOULD RETURN 3 ROWS of data, but ONLY 1 ROW IS
RETURNED
SELECT CAST(varbinarycol AS NVARCHAR(MAX)) FROM TestTable WHERE
CONTAINS(varbinarycol, 'test')

www.gavinharriss.com

View 1 Replies View Related

Upgrade To Advanced Services; Full-text Indexing Not Working

May 8, 2006

I upgraded to Sql Server Express 2005 w/Advanced Services, chose to install full-text indexing, rebooted, but appear to be unable to set up full-text indexing for a column.  After attaching the old mdf file and opening any table in either Management Studio Express or Visual C# Express, I don't get anything but a disabled (Is Full-text Indexed) property for the fields I want to set up.  I have verified that FullText Search service is running, and have tried restarting the service.  I have also checked that full-text indexing is enabled on the database.

I just feel like I am missing some simple step.  Any info would be welcome.

View 15 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved