Showing posts with label script. Show all posts
Showing posts with label script. Show all posts

Thursday, March 29, 2012

FTP Task Completes but No File

I have an FTP task that once the file is loaded a script task is activated and then a data flow process starts. I can connect to the FTP server with the Test connection and I can see the file in the remote directory "/HRData.txt" however even with the Delay validation set to true it does not download the file.the only thing i can think of is to try re-creating the task.|||I have already tried this with no affect. I guess I am going to try to write a FTP download into my script that I am executing.

FTP task - StopOnFailure not working as I expect?

Hi

I'm using an FTP task in a loop to download files from a WAN based FTP server. I've got a script to generate the name of the file I require and place into a variable. Problem is sometimes some of the remote files haven't been published so the FTP component errors and the package fails.

I tried setting StopOnFailure to False - all I get is the following errors

[FTP Task] Error: File represented by "User::RemotePath" does not exist.
[FTP Task] Error: Attempt to read message string for 0x80020918 failed with error 0xc02090f3. Make sure all message related files are registered.

What I want to do is ignore the error and perform the next loop iteration

Is this a bug, or am I missing something

Dave

To ignore the ftp task error within a loop, put an OnError event handler on the FTP task. In the handler, set the System::Propagate variable to false. This setting will keep the error(s) in the ftp task from bubbling up the container hierarchy, and thus keep the loop from failing on a missing file.

For example:

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System::Propagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System::Propagate").Value = False
vars.Unlock()
End Sub
End Class

P.S. Another way to ignore the ftp error is by configuring the MaximumErrorCount property on the loop executable to some relatively high number.
|||Excellent thanks, I initially set the MaximumErrorCount as a quick hack but thanks for the first suggestion - I've been meaning to figure out how OnError works.

|||

This sounds like the perfect solution for what I'm trying to do... but one question:

How do you "put an OnEvent handler on the ftp task"?

Not sure what this means.

Thanks much!!

|||

Ok, I figured out the event handler tab functionality.

So, for my FTP task, I created an OnError event handler. I put a script task in the event handler.

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System:Stick out tongueropagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System:Stick out tongueropagate").Value = False
vars.Unlock()
End Sub
End Class

However, the FTP task is still failing as before, and failing the ForLoop container with it.

What am I doing wrong?

Thanks

|||

Hello,

I am still trying to figure out why FTP the error is still "bubbling up" to the ForLoop container?

This is what I have:

ForLoop [ FTP task --> script task ]

In the FTP task Event Handler tab, I created an "On Error" event handler. It is a script task with the above poster's code that is supposed to turn off the System propogate variable. However, it isn't working. What am I doing wrong?

I need to turn off error handers in the FTP task, so that when I get a file not found error, it doesn't cause the ForLoop container to fail also. It needs to keep looping, even if the file isn't there yet.

Thanks much!

|||

The system variable System:Stick out tongueropagate effects propagation of execution errors. Validation errors will always propagate at least one level up the container hierarchy, probably because the validation error of a task becomes an execution error of the for loop container.

So if an error occurs in the validation phase of the ftp task, the first time a System:Stick out tongueropagate=false error handler could catch it would be in the for each loop. Execution errors, on the other hand, can be caught be an error handler on the ftp task itself.

The two properties which also account for validation errors (which always bubble up at least one level) are ForceExecutionResult and MaximumErrorCount. By setting ForceExecutionResult=Sucess on the for each loop container or by setting MaximumErrorCount on the for each loop container to a large number, the loop will continue.

You can determine in which phase the the error(s) occur by observing if the error events fall exclusively between the OnPrevalidate / OnPostValidate events of the ftp task.

FTP task - StopOnFailure not working as I expect?

Hi

I'm using an FTP task in a loop to download files from a WAN based FTP server. I've got a script to generate the name of the file I require and place into a variable. Problem is sometimes some of the remote files haven't been published so the FTP component errors and the package fails.

I tried setting StopOnFailure to False - all I get is the following errors

[FTP Task] Error: File represented by "User::RemotePath" does not exist.
[FTP Task] Error: Attempt to read message string for 0x80020918 failed with error 0xc02090f3. Make sure all message related files are registered.

What I want to do is ignore the error and perform the next loop iteration

Is this a bug, or am I missing something

Dave

To ignore the ftp task error within a loop, put an OnError event handler on the FTP task. In the handler, set the System::Propagate variable to false. This setting will keep the error(s) in the ftp task from bubbling up the container hierarchy, and thus keep the loop from failing on a missing file.

For example:

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System::Propagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System::Propagate").Value = False
vars.Unlock()
End Sub
End Class

P.S. Another way to ignore the ftp error is by configuring the MaximumErrorCount property on the loop executable to some relatively high number.
|||Excellent thanks, I initially set the MaximumErrorCount as a quick hack but thanks for the first suggestion - I've been meaning to figure out how OnError works.|||

This sounds like the perfect solution for what I'm trying to do... but one question:

How do you "put an OnEvent handler on the ftp task"?

Not sure what this means.

Thanks much!!

|||

Ok, I figured out the event handler tab functionality.

So, for my FTP task, I created an OnError event handler. I put a script task in the event handler.

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System:Stick out tongueropagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System:Stick out tongueropagate").Value = False
vars.Unlock()
End Sub
End Class

However, the FTP task is still failing as before, and failing the ForLoop container with it.

What am I doing wrong?

Thanks

|||

Hello,

I am still trying to figure out why FTP the error is still "bubbling up" to the ForLoop container?

This is what I have:

ForLoop [ FTP task --> script task ]

In the FTP task Event Handler tab, I created an "On Error" event handler. It is a script task with the above poster's code that is supposed to turn off the System propogate variable. However, it isn't working. What am I doing wrong?

I need to turn off error handers in the FTP task, so that when I get a file not found error, it doesn't cause the ForLoop container to fail also. It needs to keep looping, even if the file isn't there yet.

Thanks much!

|||

The system variable System:Stick out tongueropagate effects propagation of execution errors. Validation errors will always propagate at least one level up the container hierarchy, probably because the validation error of a task becomes an execution error of the for loop container.

So if an error occurs in the validation phase of the ftp task, the first time a System:Stick out tongueropagate=false error handler could catch it would be in the for each loop. Execution errors, on the other hand, can be caught be an error handler on the ftp task itself.

The two properties which also account for validation errors (which always bubble up at least one level) are ForceExecutionResult and MaximumErrorCount. By setting ForceExecutionResult=Sucess on the for each loop container or by setting MaximumErrorCount on the for each loop container to a large number, the loop will continue.

You can determine in which phase the the error(s) occur by observing if the error events fall exclusively between the OnPrevalidate / OnPostValidate events of the ftp task.

FTP task - StopOnFailure not working as I expect?

Hi

I'm using an FTP task in a loop to download files from a WAN based FTP server. I've got a script to generate the name of the file I require and place into a variable. Problem is sometimes some of the remote files haven't been published so the FTP component errors and the package fails.

I tried setting StopOnFailure to False - all I get is the following errors

[FTP Task] Error: File represented by "User::RemotePath" does not exist.
[FTP Task] Error: Attempt to read message string for 0x80020918 failed with error 0xc02090f3. Make sure all message related files are registered.

What I want to do is ignore the error and perform the next loop iteration

Is this a bug, or am I missing something

Dave

To ignore the ftp task error within a loop, put an OnError event handler on the FTP task. In the handler, set the System::Propagate variable to false. This setting will keep the error(s) in the ftp task from bubbling up the container hierarchy, and thus keep the loop from failing on a missing file.

For example:

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System::Propagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System::Propagate").Value = False
vars.Unlock()
End Sub
End Class

P.S. Another way to ignore the ftp error is by configuring the MaximumErrorCount property on the loop executable to some relatively high number.
|||Excellent thanks, I initially set the MaximumErrorCount as a quick hack but thanks for the first suggestion - I've been meaning to figure out how OnError works.

|||

This sounds like the perfect solution for what I'm trying to do... but one question:

How do you "put an OnEvent handler on the ftp task"?

Not sure what this means.

Thanks much!!

|||

Ok, I figured out the event handler tab functionality.

So, for my FTP task, I created an OnError event handler. I put a script task in the event handler.

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Private vars As Variables
Public Sub Main()
Dts.TaskResult = Dts.Results.Success
Dts.VariableDispenser.LockForWrite("System:Stick out tongueropagate")
Dts.VariableDispenser.GetVariables(vars)
vars("System:Stick out tongueropagate").Value = False
vars.Unlock()
End Sub
End Class

However, the FTP task is still failing as before, and failing the ForLoop container with it.

What am I doing wrong?

Thanks

|||

Hello,

I am still trying to figure out why FTP the error is still "bubbling up" to the ForLoop container?

This is what I have:

ForLoop [ FTP task --> script task ]

In the FTP task Event Handler tab, I created an "On Error" event handler. It is a script task with the above poster's code that is supposed to turn off the System propogate variable. However, it isn't working. What am I doing wrong?

I need to turn off error handers in the FTP task, so that when I get a file not found error, it doesn't cause the ForLoop container to fail also. It needs to keep looping, even if the file isn't there yet.

Thanks much!

|||

The system variable System:Stick out tongueropagate effects propagation of execution errors. Validation errors will always propagate at least one level up the container hierarchy, probably because the validation error of a task becomes an execution error of the for loop container.

So if an error occurs in the validation phase of the ftp task, the first time a System:Stick out tongueropagate=false error handler could catch it would be in the for each loop. Execution errors, on the other hand, can be caught be an error handler on the ftp task itself.

The two properties which also account for validation errors (which always bubble up at least one level) are ForceExecutionResult and MaximumErrorCount. By setting ForceExecutionResult=Sucess on the for each loop container or by setting MaximumErrorCount on the for each loop container to a large number, the loop will continue.

You can determine in which phase the the error(s) occur by observing if the error events fall exclusively between the OnPrevalidate / OnPostValidate events of the ftp task.

sql

Friday, March 23, 2012

Frustrating Visual Studio crashes when adding Script step

I have two similar packages that are both experiencing this issue.

I need to add a script step to generate an incrementing id for the packages.

Once I add the script step, and then save the package, next time I open the package I get a "Microsoft Visual Studio has encountered a problem and needs to close" error which kills off Visual Studio.

The error signature is:

EventType: clr20r3

P1: devenv.exe

P2: 8.0.50727.762

P3: 45716759

P4: microsoft.sqlserver.txscript

P5: 9.0.242.0

P6: 443f5ab8

P7: 67

P8: d

P9: bbp0yyyc15o2dbouwcacz2m0bodqkotn

If I move the error window to one side, delete the whole Script step, and save the Package, then I can reopen the package again without the error occurring.

Here is the actual code in my script step (in case its of any assistance...)

(I have retyped it from a printout, so it may not be 100%. DOCID is supposed to increment from 1. DREF1 is a system-unique id, that takes up from where the last batch left off, and is a string prefixed by "MP")

Code Snippet

Imports System

Imports System.Data

Imports System.math

Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

Imports Microsoft.SqlServer.Dta.Runtime.Wrapper

Public Class ScriptMain

Inherits UserComponent

Dim ndx as Int32 = 0

Public Overrides Sub Input0_ProcessInputRow(Byval Row as Input0Buffer)

'

' Add your code here

'

Dim dref as String

ndx = ndx + 1

Row.DOCID = ndx

dref = "MP" + Ctype(ndx + Variables.MPIDOrig, String)

Row.DREF1 = dref

End Sub

Protected Overrides Sub finalize()

Variables.MPID = ndx + Variables.MPIDOrig

MyBase.Finalize()

End Sub

End Class

I have found that when I take out the finalize() function, Visual Studio no longer crashes.

Can anyone suggest a different way to achieve what I am trying to achieve?

|||

Could you to put it into PostExecute()?

Thanks,

Bob

|||

Thanks, yes this was the answer.

It was a bit frustrating, as a relative newbie to SSIS, to find that the Finalize method caused this sort of behaviour, and it wasn't immediately obvious that PostExecute should be used instead.

(By which I mean I actually had to read deeper than jsut fiddling about in the IDE.)

Frustrating Visual Studio crashes when adding Script step

I have two similar packages that are both experiencing this issue.

I need to add a script step to generate an incrementing id for the packages.

Once I add the script step, and then save the package, next time I open the package I get a "Microsoft Visual Studio has encountered a problem and needs to close" error which kills off Visual Studio.

The error signature is:

EventType: clr20r3

P1: devenv.exe

P2: 8.0.50727.762

P3: 45716759

P4: microsoft.sqlserver.txscript

P5: 9.0.242.0

P6: 443f5ab8

P7: 67

P8: d

P9: bbp0yyyc15o2dbouwcacz2m0bodqkotn

If I move the error window to one side, delete the whole Script step, and save the Package, then I can reopen the package again without the error occurring.

Here is the actual code in my script step (in case its of any assistance...)

(I have retyped it from a printout, so it may not be 100%. DOCID is supposed to increment from 1. DREF1 is a system-unique id, that takes up from where the last batch left off, and is a string prefixed by "MP")

Code Snippet

Imports System

Imports System.Data

Imports System.math

Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

Imports Microsoft.SqlServer.Dta.Runtime.Wrapper

Public Class ScriptMain

Inherits UserComponent

Dim ndx as Int32 = 0

Public Overrides Sub Input0_ProcessInputRow(Byval Row as Input0Buffer)

'

' Add your code here

'

Dim dref as String

ndx = ndx + 1

Row.DOCID = ndx

dref = "MP" + Ctype(ndx + Variables.MPIDOrig, String)

Row.DREF1 = dref

End Sub

Protected Overrides Sub finalize()

Variables.MPID = ndx + Variables.MPIDOrig

MyBase.Finalize()

End Sub

End Class

I have found that when I take out the finalize() function, Visual Studio no longer crashes.

Can anyone suggest a different way to achieve what I am trying to achieve?

|||

Could you to put it into PostExecute()?

Thanks,

Bob

|||

Thanks, yes this was the answer.

It was a bit frustrating, as a relative newbie to SSIS, to find that the Finalize method caused this sort of behaviour, and it wasn't immediately obvious that PostExecute should be used instead.

(By which I mean I actually had to read deeper than jsut fiddling about in the IDE.)

sql

Frustrating Visual Studio crashes when adding Script step

I have two similar packages that are both experiencing this issue.

I need to add a script step to generate an incrementing id for the packages.

Once I add the script step, and then save the package, next time I open the package I get a "Microsoft Visual Studio has encountered a problem and needs to close" error which kills off Visual Studio.

The error signature is:

EventType: clr20r3

P1: devenv.exe

P2: 8.0.50727.762

P3: 45716759

P4: microsoft.sqlserver.txscript

P5: 9.0.242.0

P6: 443f5ab8

P7: 67

P8: d

P9: bbp0yyyc15o2dbouwcacz2m0bodqkotn

If I move the error window to one side, delete the whole Script step, and save the Package, then I can reopen the package again without the error occurring.

Here is the actual code in my script step (in case its of any assistance...)

(I have retyped it from a printout, so it may not be 100%. DOCID is supposed to increment from 1. DREF1 is a system-unique id, that takes up from where the last batch left off, and is a string prefixed by "MP")

Code Snippet

Imports System

Imports System.Data

Imports System.math

Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

Imports Microsoft.SqlServer.Dta.Runtime.Wrapper

Public Class ScriptMain

Inherits UserComponent

Dim ndx as Int32 = 0

Public Overrides Sub Input0_ProcessInputRow(Byval Row as Input0Buffer)

'

' Add your code here

'

Dim dref as String

ndx = ndx + 1

Row.DOCID = ndx

dref = "MP" + Ctype(ndx + Variables.MPIDOrig, String)

Row.DREF1 = dref

End Sub

Protected Overrides Sub finalize()

Variables.MPID = ndx + Variables.MPIDOrig

MyBase.Finalize()

End Sub

End Class

I have found that when I take out the finalize() function, Visual Studio no longer crashes.

Can anyone suggest a different way to achieve what I am trying to achieve?

|||

Could you to put it into PostExecute()?

Thanks,

Bob

|||

Thanks, yes this was the answer.

It was a bit frustrating, as a relative newbie to SSIS, to find that the Finalize method caused this sort of behaviour, and it wasn't immediately obvious that PostExecute should be used instead.

(By which I mean I actually had to read deeper than jsut fiddling about in the IDE.)

Friday, March 9, 2012

French characters are not imported properly with bcp

Hi
I have a script that uses bcp to import data from an ascii text file
into SQL tables. The french characters are not copied properly. They
are converted to letters of the alphabet. I tried to change all the
fields to nvarchar instead of varchar and nchar instead of char, but I
got Greek characters instead.

How can I fix this?

Here is some code:
--------
CREATE TABLE [dbo].[1_HLGT_HLT_COMP_f9.0] (
[hlgt_code] [int] NOT NULL ,
[hlt_code] [int] NOT NULL
) ON [PRIMARY]
GO

PRINT 'HLGT_HLT'
DECLARE @.s as nvarchar(300)
SET @.s='bcp MedDRA..[1_hlgt_hlt_comp_f9.0] in ' + char(34) +
'F:\MedDRA\9.0French\MedAscii\hlgt_hlt.asc' + char(34) + ' -c -t' +
char(34) + '$' + char(34) + ' -r$\n -e' + char(34) +
'F:\MedDRA\9.0French\logs\hlgt_hlt.err.txt' + char(34) + ' -b250 -m50
-SDEV -Usa -Ppassword -h' + char(34) + 'TABLOCK' + char(34)
EXEC master..xp_cmdshell @.sWael (sedky@.rocketmail.com) writes:
> I have a script that uses bcp to import data from an ascii text file
> into SQL tables. The french characters are not copied properly. They
> are converted to letters of the alphabet. I tried to change all the
> fields to nvarchar instead of varchar and nchar instead of char, but I
> got Greek characters instead.

Add -C RAW to the list of BCP options. By default, BCP assumes that
characters are in the OEM code page and will convert them to the ANSI
code page. Which results in a mess when data is already in the ANSI
code page.

> How can I fix this?
> Here is some code:
> --------
> CREATE TABLE [dbo].[1_HLGT_HLT_COMP_f9.0] (
> [hlgt_code] [int] NOT NULL ,
> [hlt_code] [int] NOT NULL
> ) ON [PRIMARY]
> GO

Eh, there are character columns in that table?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Does this require any special install on the server? I tried -C863 for
Canadian French, but the server does not recognize that code page.|||Wael (sedky@.rocketmail.com) writes:
> Does this require any special install on the server? I tried -C863 for
> Canadian French, but the server does not recognize that code page.

I have not heard of 863 before, but it sounds like an OEM code page.

Playing around a little, it appears that you can only use code pages
for which there are one or more collations. For instace, I tried CP852
which is Eastern Europe, but this gave me an error. On the the other
hand, 874 worked. (There are a number of Thai collations with that code
page.)

But is your file really in code page 863? And in such case how different
would it be from code page 850? (My standard source for checking out
code pages is down, so I can't check right now.)

Did you try -C RAW?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||I tried -C RAW but i got an error. If you check the windows regional
settings, you'll see 863 is the code page for Canadian French.

Regional and Language Options\Advanced|||Wael (sedky@.rocketmail.com) writes:
> I tried -C RAW but i got an error.

An error? Care to specify what? It's difficult to assist without knowing
the error message.

> If you check the windows regional
> settings, you'll see 863 is the code page for Canadian French.
> Regional and Language Options\Advanced

Yes, I also see that it is an OEM code page. Is the data file in this
code page?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||For question number 1, the error is pasted below.
For the second one I am not sure. The original text is a plain text
file.

NULL
Starting copy...
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Code page 863 is
not supported by SQL Server
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Unable to resolve column
level collations
NULL
BCP copy in failed
NULL

(9 row(s) affected)|||Wael (sedky@.rocketmail.com) writes:
> For question number 1, the error is pasted below.
> For the second one I am not sure. The original text is a plain text
> file.

If you the open file in Notepad, does it look good then? If it does,
it is not an OEM file. If the French characters are replaced with
other single characters, it could be CP863.

If the file looks bad in Notepad, does it look good when you type it
from a command-line window.

I'm a little surprised of the message you got with -C RAW. I was under
the impression that this would suppress all code-page conversion.

Anyway, if the file looks good in Notepad, use -C ACP or -C 1252.

If it looks goot in the command-line window, try -C 850. I don't know
about CP 863, but I would expected to be a version of CP 850.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||It worked. ACP worked.

THank you very much.

French Accent

Using MSDE 2000

I made a script to create my database and insert default values in some tables. The problem is that all the accent are replace by junk ("Unitús instead of Units"). But if I insert values with Server Explorer, ADO.Net or oSql it work fine...

Anyone as an idea on why accent are replace by junk only when insertion are made by a script.

Thanks

What is the collation and system locale when used this script?

I think there used to be problem with French collation in SQL 2000, You either have to support all collations or force your clients to reinstall SQL Server with the collation you chose. It is not quite clear why French data in French_CI_AS collation and Latin1_General_CI_AS collation are incompatible.

|||

I use the collation "SQL_Latin1_General_CP1_CI_AS". I also tried with the collation "French_CI_AS" but I had the same result.

|||

I've just installed Sql Server 2005 Express and I have the same problem. So this is not a Sql Server 2000 issue.

Here's a part of the database creation script:

Code Snippet

-- SQL Manager 2005 Lite for SQL Server (2.4.0.1)
--
-- Host : MyHost
-- Database : MyDatabase
-- Version: : Microsoft SQL Server 9.00.1399.06

DROP DATABASE MyDatabase
GO

CREATE DATABASE [MyDatabase]
COLLATE SQL_Latin1_General_CP1_CI_AS
GO

USE [MyDatabase]
GO

--
-- Structure for table Langues :
--

CREATE TABLE [dbo].[Langues] (
[id] int NOT NULL,
[langue] varchar(2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[description] varchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)
ON [PRIMARY]
GO

--
-- Data for table Langues (LIMIT 0,500)
--

INSERT INTO [dbo].[Langues] ([id], [langue], [description])
VALUES
(1, 'En', 'Rules')
GO

INSERT INTO [dbo].[Langues] ([id], [langue], [description])
VALUES
(1, 'Fr', 'Règlementations')
GO

INSERT INTO [dbo].[Langues] ([id], [langue], [description])
VALUES
(2, 'En', 'Repairs')
GO

INSERT INTO [dbo].[Langues] ([id], [langue], [description])
VALUES
(2, 'Fr', 'Rparations')
GO


ALTER TABLE [dbo].[Langues]
ADD CONSTRAINT [PK_Langues]
PRIMARY KEY CLUSTERED ([id], [langue])
WITH (
PAD_INDEX = OFF,
IGNORE_DUP_KEY = OFF,
STATISTICS_NORECOMPUTE = OFF,
ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

-- END OF THE SCRIPT

When I open server explorer to view the data I get

- "Rúparations" instead of "Rparations"

- "RTglementations" instead of "Règlementations"

I haven't figure out why so far...

Thanks

|||

I finally found the problem. It had nothing to do with sql server... my script file was save under the ANSI encoding instead of UNICODE. Dumb problem

Thanks for your time.

Sunday, February 26, 2012

free tools for creating sql script with records?

is there some freeware tools for that?
thanks!
On Thu, 9 Dec 2004 11:13:35 +0100, green_eye wrote:

>is there some freeware tools for that?
Hi green_eye,
http://vyaskn.tripod.com/code.htm#inserts
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Innovartis do a free data and schema scripter
http://www.innovartis.co.uk/Evaluation.aspx
"green_eye" wrote:

> is there some freeware tools for that?
> thanks!
>
>

free tools for creating sql script with records?

is there some freeware tools for that'
thanks!On Thu, 9 Dec 2004 11:13:35 +0100, green_eye wrote:
>is there some freeware tools for that'
Hi green_eye,
http://vyaskn.tripod.com/code.htm#inserts
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Innovartis do a free data and schema scripter
http://www.innovartis.co.uk/Evaluation.aspx
"green_eye" wrote:
> is there some freeware tools for that'
> thanks!
>
>

Free space of my filegroup

Hi:
How can i get the Total and Free space of my filegroups, do you have some script for that?
Thnaks :eek:What DBMS are you talking about?|||Hi:

SQL Server 2000, thank's for your answer.|||You posted in wrong forum then. I will move you...|||Thank you :o