Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

Friday, March 30, 2012

long SQL lines for osql

We have a very long and complicated SQL script which we run to upgrade
a version of our software from old to new. It works great in Query
Analyzer, but when run through osql it takes errors on lines that are
very long and (I think) stops reading after a certain amount of
characters. I've searched the net but haven't found anyone mentioning
this before. I have tried the -w 5000 parm to no avail.

Any suggestions?pb648174 (google@.webpaul.net) writes:
> We have a very long and complicated SQL script which we run to upgrade
> a version of our software from old to new. It works great in Query
> Analyzer, but when run through osql it takes errors on lines that are
> very long and (I think) stops reading after a certain amount of
> characters. I've searched the net but haven't found anyone mentioning
> this before. I have tried the -w 5000 parm to no avail.

-w controls the width of the output. As I understand it, you have
problems with the input.

One thing to keep in mind, is by default OSQL runs with QUOTED_IDENTIFIER
off, which is different from Query Analyzer. Run with -I to change this.

It would have helped if you had included any error messages.

--
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|||The error messages are bogus, i.e. it is stopping processing in the
middle of a line, i.e. "Ad" is not a column, when the line is doing
something with "Address". I'll try the -l option and see if that makes
a difference, but it doesn't seem like it would make a difference since
I am using standard name, i.e. nothing with brackets, quotes or spaces
in the names.|||pb648174 (google@.webpaul.net) writes:
> The error messages are bogus, i.e. it is stopping processing in the
> middle of a line, i.e. "Ad" is not a column, when the line is doing
> something with "Address". I'll try the -l option and see if that makes
> a difference, but it doesn't seem like it would make a difference since
> I am using standard name, i.e. nothing with brackets, quotes or spaces
> in the names.

OK, it sounds like it chokes on something.

It could be the file size, but it could also be the batch size.

If it is the file size, you can split the file into several and then
include the files with ~r. (Well, maybe. It could choke on the total.
But you could try.)

If it is the batch size, maybe you can throw in more "go" of you have
very long batches.

I recall that we had an issue with INSERT-files that we generate
from Excel. I had to fix the tool, so that it added a "go" after
each 40th EXEC or so. But if memory serves, it was the ISQL/W 6.5
that had this problems.

--
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 haven't been able to reproduce it locally - it always happens during
our production push... Then I have to execute it in QA for every
database we have which is a pain. The total file size is about 2 MB and
there is a go after pretty much each statement.

Erland Sommarskog wrote:
> pb648174 (google@.webpaul.net) writes:
> > The error messages are bogus, i.e. it is stopping processing in the
> > middle of a line, i.e. "Ad" is not a column, when the line is doing
> > something with "Address". I'll try the -l option and see if that makes
> > a difference, but it doesn't seem like it would make a difference since
> > I am using standard name, i.e. nothing with brackets, quotes or spaces
> > in the names.
> OK, it sounds like it chokes on something.
> It could be the file size, but it could also be the batch size.
> If it is the file size, you can split the file into several and then
> include the files with ~r. (Well, maybe. It could choke on the total.
> But you could try.)
> If it is the batch size, maybe you can throw in more "go" of you have
> very long batches.
> I recall that we had an issue with INSERT-files that we generate
> from Excel. I had to fix the tool, so that it added a "go" after
> each 40th EXEC or so. But if memory serves, it was the ISQL/W 6.5
> that had this problems.
>
> --
> 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

Monday, March 12, 2012

Logins from SQL7 to SQL2000

We are upgraded our vendor software (Jenzabar EX) from SQL7 to SQL2000. In the process, we are also moving the databases to a new server. Everything seemed to go fine until we tried to log on to one of Jenzabar EX modules. We have tried several differe
nt things, including the sp_change_users (which failed because of the @.action clause). We've tried running that huge script included in the Knowledge Base article. We also have tried using the transfer login wizard. Which, report success, but the login
s still do not work.
Could we have possibly missed a step somewhere? Is there something else we can try? I sure would greatly appreciate any advice or assistance.
Thanks!
Karma
What is the exact problem you are having when you login from this
application?
Rand
This posting is provided "as is" with no warranties and confers no rights.

Logins from SQL7 to SQL2000

We are upgraded our vendor software (Jenzabar EX) from SQL7 to SQL2000. In
the process, we are also moving the databases to a new server. Everything s
eemed to go fine until we tried to log on to one of Jenzabar EX modules. We
have tried several differe
nt things, including the sp_change_users (which failed because of the @.actio
n clause). We've tried running that huge script included in the Knowledge B
ase article. We also have tried using the transfer login wizard. Which, re
port success, but the login
s still do not work.
Could we have possibly missed a step somewhere? Is there something else we
can try? I sure would greatly appreciate any advice or assistance.
Thanks!
KarmaWhat is the exact problem you are having when you login from this
application?
Rand
This posting is provided "as is" with no warranties and confers no rights.

Monday, February 20, 2012

Login not working anymore

I am running an Express 2005 server, using the Management software included. I was attempting to view server settings when it locked me out. I could not access the properties of the server, and after that, anything. I tried logging out, but it would not let me log back in. It said that the server may not allow remote connections, but this was the same login that I had been using previously with Windows authentication without a problem.

So, now I'm locked out of my database with no way to access anything. Does anyone know how I can get around this or make the login work again?
Hi,

is the service started properly ? Perhaps you switch the RemoteConnections Setting for some reason ? http://www.sqlserver2005.de/SharedFiles/RemoteConnection.jpg

Or you have a different port than the default one associated with the Service and the SQL Browser which does the dynamic directing doesnt work anymore ? In this case start the SQL Browser or use the direct syntax to contact your SQL Server : machineName\InstanceName,Portnumber . There could be various issues why you can′t connect anymore, try to find out if something changed on the system first by looking in the event logs.

One possible reason *could* be that you assigned the service a specific account and changed the password for that account, but this could be clearly seen in the event log.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de