Showing posts with label inserts. Show all posts
Showing posts with label inserts. Show all posts

Wednesday, March 7, 2012

osql feedback

I have some long running scripts which I fire at my database using osql.
(These are big files and mostly doing inserts but some also do a few other
things.) It would be nice to have some activity indication (other than the
disk activity light) that these are running. When I used to use Oracle,
their equivalent to osql had an option to print a dot (without a carriage
return) for every "n" statements. This gave a nice "I'm alive" indicator. I
can simulate this by adding a few "print" statements in my sql, but print
always adds a carriage return. Does anyone know a way of doing a print but
without the addition of a CR (or CR/LF)? So that a second "print" sends its
output to the same line as the first?

I know this is a nicety and I can live without it, but it would be nice.

thanks in advance,

Brian

www.cryer.co.uk/brianSend your feature request to sqlwish@.microsoft.com.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Brian Cryer" <brianc@.127.0.0.1.activesol.co.uk> wrote in message
news:1108636507.5572.0@.ersa.uk.clara.net...
>I have some long running scripts which I fire at my database using osql.
>(These are big files and mostly doing inserts but some also do a few other
>things.) It would be nice to have some activity indication (other than the
>disk activity light) that these are running. When I used to use Oracle,
>their equivalent to osql had an option to print a dot (without a carriage
>return) for every "n" statements. This gave a nice "I'm alive" indicator. I
>can simulate this by adding a few "print" statements in my sql, but print
>always adds a carriage return. Does anyone know a way of doing a print but
>without the addition of a CR (or CR/LF)? So that a second "print" sends its
>output to the same line as the first?
> I know this is a nicety and I can live without it, but it would be nice.
> thanks in advance,
> Brian
> www.cryer.co.uk/brian|||Create a small table, then from your script insert/update it with
information that will help you understand where the code is. From
another window you can query this table to see what's going on.

Dave|||On Thu, 17 Feb 2005 10:34:51 -0000, Brian Cryer wrote:

> I have some long running scripts which I fire at my database using osql.
> (These are big files and mostly doing inserts but some also do a few other
> things.) It would be nice to have some activity indication (other than the
> disk activity light) that these are running. When I used to use Oracle,
> their equivalent to osql had an option to print a dot (without a carriage
> return) for every "n" statements. This gave a nice "I'm alive" indicator. I
> can simulate this by adding a few "print" statements in my sql, but print
> always adds a carriage return. Does anyone know a way of doing a print but
> without the addition of a CR (or CR/LF)? So that a second "print" sends its
> output to the same line as the first?
> I know this is a nicety and I can live without it, but it would be nice.

You could wrap your osql call in a vbscript that captures the output, waits
for newlines, and prints dots to the console.|||"Brian Cryer" <brianc@.127.0.0.1.activesol.co.uk> wrote in message
news:1108636507.5572.0@.ersa.uk.clara.net...
>I have some long running scripts which I fire at my database using osql.
>(These are big files and mostly doing inserts but some also do a few other
>things.) It would be nice to have some activity indication (other than the
>disk activity light) that these are running. When I used to use Oracle,
>their equivalent to osql had an option to print a dot (without a carriage
>return) for every "n" statements. This gave a nice "I'm alive" indicator. I
>can simulate this by adding a few "print" statements in my sql, but print
>always adds a carriage return. Does anyone know a way of doing a print but
>without the addition of a CR (or CR/LF)? So that a second "print" sends its
>output to the same line as the first?
> I know this is a nicety and I can live without it, but it would be nice.
> thanks in advance,
> Brian
> www.cryer.co.uk/brian

Thank you for all of your comments.

Brian.

Saturday, February 25, 2012

osql and unicode

Hi,
Is anybody aware of any problems with inserting unicode chars via osql. I've
got some unicode text and when it gets inserted it inserts not the character
I am expecting. It works fine from query analyser etc. My collation is set t
o
the generic collation no problems there. Thanks.
Panos.Just some extra information.
The string I have in the input file is:
WIENER B?RSE
and it becomes
WIENER BĂ­RSE
When the same script is run from query analyser then it insert WIENER B?RSE
which is correct. Thanks.
"Panos Stavroulis." wrote:

> Hi,
> Is anybody aware of any problems with inserting unicode chars via osql. I'
ve
> got some unicode text and when it gets inserted it inserts not the charact
er
> I am expecting. It works fine from query analyser etc. My collation is set
to
> the generic collation no problems there. Thanks.
> Panos.