Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Thursday, March 22, 2012

ASP pages stopped working

Our website uses asp and asp.net pages. Yesteray we started having problems
with the asp pages. The asp pages are unable to connect to the database.
The asp.net pages work fine. We receive the generic sql server error message
that it can't find the stored procedure. However, when we go into SQL
Manager we can view the stored procedure and run it.
Any ideas?
You might want to try running SQL Profiler while your application is
running. Set it to include Errors and Warnings. You should be able to see
which database it is going to.
If your stored procedures start with a sp_, SQL will look in the database it
is connected to, then in the master database for the stored procedure.
************************************************** *****************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
************************************************** *****************
"BD" <BD@.discussions.microsoft.com> wrote in message
news:BA31F094-7AF7-44CE-8906-964FE5F8110C@.microsoft.com...
> Our website uses asp and asp.net pages. Yesteray we started having
problems
> with the asp pages. The asp pages are unable to connect to the database.
> The asp.net pages work fine. We receive the generic sql server error
message
> that it can't find the stored procedure. However, when we go into SQL
> Manager we can view the stored procedure and run it.
> Any ideas?

ASP pages stopped working

Our website uses asp and asp.net pages. Yesteray we started having problems
with the asp pages. The asp pages are unable to connect to the database.
The asp.net pages work fine. We receive the generic sql server error messag
e
that it can't find the stored procedure. However, when we go into SQL
Manager we can view the stored procedure and run it.
Any ideas?You might want to try running SQL Profiler while your application is
running. Set it to include Errors and Warnings. You should be able to see
which database it is going to.
If your stored procedures start with a sp_, SQL will look in the database it
is connected to, then in the master database for the stored procedure.
****************************************
***************************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
****************************************
***************************
"BD" <BD@.discussions.microsoft.com> wrote in message
news:BA31F094-7AF7-44CE-8906-964FE5F8110C@.microsoft.com...
> Our website uses asp and asp.net pages. Yesteray we started having
problems
> with the asp pages. The asp pages are unable to connect to the database.
> The asp.net pages work fine. We receive the generic sql server error
message
> that it can't find the stored procedure. However, when we go into SQL
> Manager we can view the stored procedure and run it.
> Any ideas?sql

ASP cannot run stored proc until the web user has run the proc in Query Analyzer

I have an ASP that has been working fine for several months, but it
suddenly broke. I wonder if windows update has installed some security
patch that is causing it.

The problem is that I am calling a stored procedure via an ASP
(classic, not .NET) , but nothing happens. The procedure doesn't work,
and I don't get any error messages.

I've tried dropping and re-creating the user and permissions, to no
avail. If it was a permissions problem, there would be an error
message. I trace the calls in Profiler, and it has no complaints. The
database is getting the stored proc call.

I finally got it to work again, but this is not a viable solution for
our production environment:

1. response.write the SQL call to the stored procedure from the ASP
and copy the text to the clipboard.
2. log in to QueryAnalyzer using the same user as used by the ASP.
3. paste and run the SQL call to the stored proc in query analyzer.

After I have done this, it not only works in Query Analyzer, but then
the ASP works too. It continues to work, even after I reboot the
machine. This is truly bizzare and has us stumped. My hunch is that
windows update installed something that has created this issue, but I
have not been able to track it down.central_scrutinizer,

Does the ASP page hang, timeout or just return with no results? If it hangs
or times out, this may be happening:

1. The command is executed from the ASP page.
2. SQL Server needs to allocate more disk space (data or log) and performs
an autogrow of a large amount of disk space. This could take an extended
period of time.
3. The user cancels the ASP page or the page times out.
4. SQL Server cancels the transaction and also cancels the need for
additional disk space.
5. If steps 1-4 are repeated, you get the same result.
6. A user runs the stored procedure in QA allowing it to finish.
7. SQL Server allocates the addional space.
8. The ASP page now runs fine because the space has been allocated (until
the next time the database needs to allocate more space).

-- Bill

1. We would run the stored
"central_scrutinizer" <cbellur@.hotmail.comwrote in message
news:1172185833.914945.318670@.m58g2000cwm.googlegr oups.com...

Quote:

Originally Posted by

>I have an ASP that has been working fine for several months, but it
suddenly broke. I wonder if windows update has installed some security
patch that is causing it.
>
The problem is that I am calling a stored procedure via an ASP
(classic, not .NET) , but nothing happens. The procedure doesn't work,
and I don't get any error messages.
>
I've tried dropping and re-creating the user and permissions, to no
avail. If it was a permissions problem, there would be an error
message. I trace the calls in Profiler, and it has no complaints. The
database is getting the stored proc call.
>
I finally got it to work again, but this is not a viable solution for
our production environment:
>
1. response.write the SQL call to the stored procedure from the ASP
and copy the text to the clipboard.
2. log in to QueryAnalyzer using the same user as used by the ASP.
3. paste and run the SQL call to the stored proc in query analyzer.
>
After I have done this, it not only works in Query Analyzer, but then
the ASP works too. It continues to work, even after I reboot the
machine. This is truly bizzare and has us stumped. My hunch is that
windows update installed something that has created this issue, but I
have not been able to track it down.
>

Monday, March 19, 2012

Ascending and count help

Below is the statement i am working with and i am trying to figure out
how to have the count in ascending order...is this possible? Right now
it groups by FP in alphabetical order but i dont want that i want the
whatever the FP1 count is to be ascending but i am not sure how to go
about doing this...so any help or ideas?

SELECT FP1 AS FP, COUNT(FP1) AS Expr1
FROM dbo.FP1
WHERE (FP1 IS NOT NULL) AND (LTRIM(RTRIM(FP1)) <> '')
GROUP BY FP1ORDER BY is the way (the only way) to sort the result of a query.

Just add

ORDER BY expr1

--
David Portas
SQL Server MVP
--|||Thank you...that worked :)

David Portas wrote:
> ORDER BY is the way (the only way) to sort the result of a query.
> Just add
> ORDER BY expr1
> --
> David Portas
> SQL Server MVP
> --|||Thank you...that worked :)

David Portas wrote:
> ORDER BY is the way (the only way) to sort the result of a query.
> Just add
> ORDER BY expr1
> --
> David Portas
> SQL Server MVP
> --

Sunday, March 11, 2012

AS400 password request

Hi all,

I'm loading a working SSIS package in VB.NET and executing it programmatically. As the 'Persist Security Info' is set, it executes fine, presumably because I executed it previously with valid login info. But, when I update the connection info (programmatically) it prompts me for a password at runtime. The connection string will be provided by the user (DB Admin) and this is running as a Windows service, so what I want to do is, in the case of invalid login info, just receive a rejection, that I can respond to in the code. I'm using the IBMDA400 data provider to connect to an iSeries. Ideally, I need a generic solution that will apply to all connection strings and providers, if possible, but provider specific would be fine for now. Hope you can help....

Mazmo

i ran into this using 3 different AS400 connectors. Try making the Connection componments connection string a variable, and setting the connection string there. Fixed it for me, though security freaks would say this is bad. You could always encrypt your config file .|||

I'm pretty sure this won't solve my problem.

Regardless of the 'Persist Security Info' flag and whether it has connected previously, my customers will be creating the SSIS packages for my program to deal with. Wherever the connection string is stored, there will always be cases where it cannot authenticate. This is acceptable, as long as I can respond to the rejection by telling the user to edit their SSIS package and try again, instead of it automatically throwing up the login box.

So, basically, I want to supress the login box.

Any ideas?

|||We used a program called Macro Express that could track dialog boxes (amongst other things). This was our "Automation Process" before we got an open standards DMS. You could read the form title of the CLAE prompt, do a macro to email the person resonsible. Crummy workaround, but you are dealing with a 3rd party driver pop-up. So however else you do this in .net i don't know. Basically you will be screen scraping the environment, which menas you will also have to have the ssis running in a logged in user context, whcih goes over real well with sys admins (I hate it). Otherwise, maybe a windows programmer can shed some light on this using a pre-execute event or something.|||

maybe you could run a pre-emptive sql query against the 400 (such as SELECT 1+1) as a fake first step of you SSIS program. If it fails, send an email to somebody. Of course, it might time out and never trigger your catch clause.

(tried to edit but forums kept throwing errors...hopefully this gets through)

Thursday, March 8, 2012

AS/400 Linked Server Error

Hello,
I have installed IBM AS/400 Client Access on my machine and then added a new
ODBC Data Source.
I have been working with this ODBC connection on several DTS packages and
everything has worked just fine.
Right now, I need to access some information on my AS/400 server from
several stored procedures on my SQL Server. I already configured a Linked
Server to the AS/400 server using the Microsoft OLE DB Provider for ODBC
Driver.
When I click the Tables folder under the new linked server, I can browse
through all the tables on the 400 Database. But when I execute any query
(using OPENQUERY or 4-part names in a normal query) I get the following error:
*******************************************+++
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [IBM][Client Access Express ODBC Driver
(32 bits)] Driver not capable.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetNextRows returned
0x80004005: ].
******************************************
Why is this happening? What is the error? Is there anything I am doing
wrong? I have been "fighting" with this problem for several hours.
Thanks a lot, in advance, for all the help you can give me.
is your ib client access the most updated version?
"Gabriel Giraldo" wrote:

> Hello,
> I have installed IBM AS/400 Client Access on my machine and then added a new
> ODBC Data Source.
> I have been working with this ODBC connection on several DTS packages and
> everything has worked just fine.
> Right now, I need to access some information on my AS/400 server from
> several stored procedures on my SQL Server. I already configured a Linked
> Server to the AS/400 server using the Microsoft OLE DB Provider for ODBC
> Driver.
> When I click the Tables folder under the new linked server, I can browse
> through all the tables on the 400 Database. But when I execute any query
> (using OPENQUERY or 4-part names in a normal query) I get the following error:
> *******************************************+++
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'MSDASQL' reported an error.
> [OLE/DB provider returned message: [IBM][Client Access Express ODBC Driver
> (32 bits)] Driver not capable.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetNextRows returned
> 0x80004005: ].
> ******************************************
> Why is this happening? What is the error? Is there anything I am doing
> wrong? I have been "fighting" with this problem for several hours.
> Thanks a lot, in advance, for all the help you can give me.
>
|||Hi,
0x80004005 usually has something to do with permission issues. You might
want to check that out first.
Regards,
Steve
"Gabriel Giraldo" <GabrielGiraldo@.discussions.microsoft.com> wrote in
message news:C84D15C4-6087-4377-B66B-1F4C3EDEF7C2@.microsoft.com...
> Hello,
> I have installed IBM AS/400 Client Access on my machine and then added a
> new
> ODBC Data Source.
> I have been working with this ODBC connection on several DTS packages and
> everything has worked just fine.
> Right now, I need to access some information on my AS/400 server from
> several stored procedures on my SQL Server. I already configured a Linked
> Server to the AS/400 server using the Microsoft OLE DB Provider for ODBC
> Driver.
> When I click the Tables folder under the new linked server, I can browse
> through all the tables on the 400 Database. But when I execute any query
> (using OPENQUERY or 4-part names in a normal query) I get the following
> error:
> *******************************************+++
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'MSDASQL' reported an error.
> [OLE/DB provider returned message: [IBM][Client Access Express ODBC Driver
> (32 bits)] Driver not capable.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetNextRows
> returned
> 0x80004005: ].
> ******************************************
> Why is this happening? What is the error? Is there anything I am doing
> wrong? I have been "fighting" with this problem for several hours.
> Thanks a lot, in advance, for all the help you can give me.
>

AS/400 Linked Server Error

Hello,
I have installed IBM AS/400 Client Access on my machine and then added a new
ODBC Data Source.
I have been working with this ODBC connection on several DTS packages and
everything has worked just fine.
Right now, I need to access some information on my AS/400 server from
several stored procedures on my SQL Server. I already configured a Linked
Server to the AS/400 server using the Microsoft OLE DB Provider for ODBC
Driver.
When I click the Tables folder under the new linked server, I can browse
through all the tables on the 400 Database. But when I execute any query
(using OPENQUERY or 4-part names in a normal query) I get the following erro
r:
****************************************
***+++
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [IBM][Client Access Express O
DBC Driver
(32 bits)] Driver not capable.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetNextRows retur
ned
0x80004005: ].
****************************************
**
Why is this happening? What is the error? Is there anything I am doing
wrong? I have been "fighting" with this problem for several hours.
Thanks a lot, in advance, for all the help you can give me.is your ib client access the most updated version?
"Gabriel Giraldo" wrote:

> Hello,
> I have installed IBM AS/400 Client Access on my machine and then added a n
ew
> ODBC Data Source.
> I have been working with this ODBC connection on several DTS packages and
> everything has worked just fine.
> Right now, I need to access some information on my AS/400 server from
> several stored procedures on my SQL Server. I already configured a Linked
> Server to the AS/400 server using the Microsoft OLE DB Provider for ODBC
> Driver.
> When I click the Tables folder under the new linked server, I can browse
> through all the tables on the 400 Database. But when I execute any query
> (using OPENQUERY or 4-part names in a normal query) I get the following er
ror:
> ****************************************
***+++
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'MSDASQL' reported an error.
> [OLE/DB provider returned message: [IBM][Client Access Express
ODBC Driver
> (32 bits)] Driver not capable.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetNextRows ret
urned
> 0x80004005: ].
> ****************************************
**
> Why is this happening? What is the error? Is there anything I am doing
> wrong? I have been "fighting" with this problem for several hours.
> Thanks a lot, in advance, for all the help you can give me.
>|||Hi,
0x80004005 usually has something to do with permission issues. You might
want to check that out first.
Regards,
Steve
"Gabriel Giraldo" <GabrielGiraldo@.discussions.microsoft.com> wrote in
message news:C84D15C4-6087-4377-B66B-1F4C3EDEF7C2@.microsoft.com...
> Hello,
> I have installed IBM AS/400 Client Access on my machine and then added a
> new
> ODBC Data Source.
> I have been working with this ODBC connection on several DTS packages and
> everything has worked just fine.
> Right now, I need to access some information on my AS/400 server from
> several stored procedures on my SQL Server. I already configured a Linked
> Server to the AS/400 server using the Microsoft OLE DB Provider for ODBC
> Driver.
> When I click the Tables folder under the new linked server, I can browse
> through all the tables on the 400 Database. But when I execute any query
> (using OPENQUERY or 4-part names in a normal query) I get the following
> error:
> ****************************************
***+++
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'MSDASQL' reported an error.
> [OLE/DB provider returned message: [IBM][Client Access Express
ODBC Driver
> (32 bits)] Driver not capable.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetNextRows
> returned
> 0x80004005: ].
> ****************************************
**
> Why is this happening? What is the error? Is there anything I am doing
> wrong? I have been "fighting" with this problem for several hours.
> Thanks a lot, in advance, for all the help you can give me.
>

Wednesday, March 7, 2012

AS/400 Linked Server Error

Hello,
I have installed IBM AS/400 Client Access on my machine and then added a new
ODBC Data Source.
I have been working with this ODBC connection on several DTS packages and
everything has worked just fine.
Right now, I need to access some information on my AS/400 server from
several stored procedures on my SQL Server. I already configured a Linked
Server to the AS/400 server using the Microsoft OLE DB Provider for ODBC
Driver.
When I click the Tables folder under the new linked server, I can browse
through all the tables on the 400 Database. But when I execute any query
(using OPENQUERY or 4-part names in a normal query) I get the following error:
*******************************************+++
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [IBM][Client Access Express ODBC Driver
(32 bits)] Driver not capable.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetNextRows returned
0x80004005: ].
******************************************
Why is this happening? What is the error? Is there anything I am doing
wrong? I have been "fighting" with this problem for several hours.
Thanks a lot, in advance, for all the help you can give me.is your ib client access the most updated version?
"Gabriel Giraldo" wrote:
> Hello,
> I have installed IBM AS/400 Client Access on my machine and then added a new
> ODBC Data Source.
> I have been working with this ODBC connection on several DTS packages and
> everything has worked just fine.
> Right now, I need to access some information on my AS/400 server from
> several stored procedures on my SQL Server. I already configured a Linked
> Server to the AS/400 server using the Microsoft OLE DB Provider for ODBC
> Driver.
> When I click the Tables folder under the new linked server, I can browse
> through all the tables on the 400 Database. But when I execute any query
> (using OPENQUERY or 4-part names in a normal query) I get the following error:
> *******************************************+++
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'MSDASQL' reported an error.
> [OLE/DB provider returned message: [IBM][Client Access Express ODBC Driver
> (32 bits)] Driver not capable.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetNextRows returned
> 0x80004005: ].
> ******************************************
> Why is this happening? What is the error? Is there anything I am doing
> wrong? I have been "fighting" with this problem for several hours.
> Thanks a lot, in advance, for all the help you can give me.
>|||Hi,
0x80004005 usually has something to do with permission issues. You might
want to check that out first.
Regards,
Steve
"Gabriel Giraldo" <GabrielGiraldo@.discussions.microsoft.com> wrote in
message news:C84D15C4-6087-4377-B66B-1F4C3EDEF7C2@.microsoft.com...
> Hello,
> I have installed IBM AS/400 Client Access on my machine and then added a
> new
> ODBC Data Source.
> I have been working with this ODBC connection on several DTS packages and
> everything has worked just fine.
> Right now, I need to access some information on my AS/400 server from
> several stored procedures on my SQL Server. I already configured a Linked
> Server to the AS/400 server using the Microsoft OLE DB Provider for ODBC
> Driver.
> When I click the Tables folder under the new linked server, I can browse
> through all the tables on the 400 Database. But when I execute any query
> (using OPENQUERY or 4-part names in a normal query) I get the following
> error:
> *******************************************+++
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'MSDASQL' reported an error.
> [OLE/DB provider returned message: [IBM][Client Access Express ODBC Driver
> (32 bits)] Driver not capable.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetNextRows
> returned
> 0x80004005: ].
> ******************************************
> Why is this happening? What is the error? Is there anything I am doing
> wrong? I have been "fighting" with this problem for several hours.
> Thanks a lot, in advance, for all the help you can give me.
>

AS stops working, Eventid 22, category 256

Hi!

During the last week my AS2005 server has behaved strangely. It works for two-three days and then it stops and cant handle any more queries. However i can list the catalog and cubes in ProClarity but when i try to connect to a cube it does not work. The same when i go to Management Studio. If i restart the service it works again, probably for another 2-3 days.

Also AS2005 send a lot of error events to the eventlog. All like this(i think one for every query that fails but i am not sure). Event id looks like this:

Event Type: Error
Event Source: MSSQLServerOLAPService
Event Category: (256)
Event ID: 22
Date: 2006-08-23
Time: 13:09:47
User: N/A
Computer: XXXXX
Description:
The description for Event ID ( 22 ) in Source ( MSSQLServerOLAPService ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Internal error: An unexpected exception occured.

It is a x64 box with 4GB ram and Windows Server 2003 R2. I have SP1 installed and its only AS 2005 running on it.

Any clue to what the reason could be? Could it be something that is fixed in the cumalitve hotfix package?

Description for the error code 22 is "An unexpected exception occured." doesnt give you much.

There is not much I can suggest you here. Try contacting Microsoft customer support services and report your problem.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

As a DBA grows older

I am a graduate from college in 2000. While I just graduated, I have had a total of 5 years experience in IT working for very large to very small companies.

I find myself in a situation as a DBA that while I can code, I am far from where I feel I should be. I mean this because I seem to find something in my last 2 jobs that I support that pulls time away from me being able to truly spend time figuring out the basics in code that I am far behind. While I can quickly learn ASP, I tend to be programming but not really understanding the basics, I tend to intuitively code using previous code and yet I understand completely what I am doing.

Basically, my responsibilities get greater, the jobs get more complex from company to company and I find myself swimming but trying to keep up with the current because at my latest job, they have crammed 2 programming jobs into one. CRM and a bunch of other stuff. CRM takes a lot of my time which I do code visually, I could be spending more time on ASP.Net, C#, VB, or stuff that I as a young programmer should be working till 3am in the morning doing.

So I find myself in a scattered situation, learning tidbits as quick as possible but not enough time to really think about what I am learning, Ijust apply it on the fly. I suppose this is the senario at most DBA environments but the company I work for is a small one rather than big so my time is just not there to really develop.

Have you experienced this or is this just how it is out there. I feel like I am creating ASP pages, VB pages, JavaScript and while I understand, I feel that I am jumping ahead and have missed studying the very basics in syntax and find myself having to go back to learn a basic rule after I have already coded it.

hard to explain but what do you say to thisEasy situation to get into.
It's bad to get into a situation where you are implementing thyings you don't understand but sometimes unnavoidable.

Get a good laptop, spend some time on long train journeys and visit web sites to learn and ask people who've done it before.
It's amazing what you can get through in a weekend.

There are a lot of systems being written now by people who don't really understand what they're doing (and don't seem to want to) and it shows in the architecture.|||As it is with any programming language it takes time to get a good feel for it and totally understand all the concepts. I have been working with ASP/Sql Server professionally for the last 3 years and I'm still learning new things all the time, but now there are so many new things to learn that I get the same feeling you have all over again. With XML, ASP.NET, C#, web services and all this other new stuff I also get the feel that I'm just barely keeping my head above the water. But I guess that's what it's like in this business... once you start to get the grip of something there is always something else that is newer and better.

I usually comfort myself with all those poor guys working with COBOL and Fortran and all that old stuff. At least I get somewhat close the the new technology...I think thats alot better than to be stuck with the same old crap year in and year out.|||In this current cyberworld LEARNING is never ENDING process and I second whatever Frett proposed it helps when you share your knowledge with other and explore new technologies.|||I can certainly relate. It's a strugle just keeping up with new database and database access technologies. But, in order to make myself more useful to our programmers, I've been trying to learn ASP, Java, VB, etc., and it's nearly impossible to keep up. I seem to get mired in the syntax and lose the architectural perspective I need.

BTW, can anyone recommend a good book that focuses on the architectural aspects of building web applications (ASP and/or J2EE)rather than the syntax and general programming techniques?|||Have you tried UNLEASED series for building web applications.|||No, I have not. I see that ASP.NET Unleashed is pretty highly rated on Amazon, have you read it?|||Yes UNLEASHED is my first preference always to read, since 1995.|||I agree those are high rated, but still its worth each penny you spend.

Monday, February 13, 2012

Arithmetic operation resulted in an overflow. (System.Data) - Connection error with SQL Se

We've been using SQL Server 2005 for a while as the db for our web app. Everything has been working fine, until yesterday when we started getting a "Arithmetic operation resulted in an overflow. (System.Data)" error message when trying to connect from SQL Server Management Studio or from our web app. This only happens when trying to connect remotely, although remote connections have worked for us perfectly in the past. The full error message is reproduced below. Thanks ahead of time for any help.

===================================

Cannot connect to serverName

===================================

Arithmetic operation resulted in an overflow. (System.Data)

----------
Program Location:

at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

Hi sergeipetrov,

Could you please elaborate your question a little more? I'm afraid we cannot help you just from your description above. "Arithmetic Overflow" is not particularly related to sql server, it could be caused by some other reasons. And by the way, from your code stack it seems the error happends while the data connection. So, maybe some connection code of your application would be helpful. thanks

Arial Narrow not working in PDFs (getting substituted) since W2K->

We use Arial Narrow and ever since we went to a W2K3 box (from a W2K
installation) everything exports correctly, except for PDF which substitutes
Helvetica or something with weird spacing. All looks good on the screen and,
of course, Microsoft Office is installed (which is where the fonts came from
in our W2K box).
Any ideas of what to check? Of course the clients have the font because
embedding is not supported.
--
"Everyone knows something you don't know"Does this happen w/ the latest acrobat reader (v7.0)?
--
Adrian M.
MCP
"David Bienstock" <DavidBienstock@.discussions.microsoft.com> wrote in
message news:B7583531-C4D7-4B04-9C57-E92D17921B9A@.microsoft.com...
> We use Arial Narrow and ever since we went to a W2K3 box (from a W2K
> installation) everything exports correctly, except for PDF which
> substitutes
> Helvetica or something with weird spacing. All looks good on the screen
> and,
> of course, Microsoft Office is installed (which is where the fonts came
> from
> in our W2K box).
> Any ideas of what to check? Of course the clients have the font because
> embedding is not supported.
> --
> "Everyone knows something you don't know"|||Yes it does. But I don't know if something happened when I transferred
everything from W2K to W2K3.
"Adrian M." wrote:
> Does this happen w/ the latest acrobat reader (v7.0)?
> --
> Adrian M.
> MCP
>
> "David Bienstock" <DavidBienstock@.discussions.microsoft.com> wrote in
> message news:B7583531-C4D7-4B04-9C57-E92D17921B9A@.microsoft.com...
> > We use Arial Narrow and ever since we went to a W2K3 box (from a W2K
> > installation) everything exports correctly, except for PDF which
> > substitutes
> > Helvetica or something with weird spacing. All looks good on the screen
> > and,
> > of course, Microsoft Office is installed (which is where the fonts came
> > from
> > in our W2K box).
> >
> > Any ideas of what to check? Of course the clients have the font because
> > embedding is not supported.
> > --
> > "Everyone knows something you don't know"
>
>|||David,
I have used Arial Narrow successfully on W2K3 boxes. Our production web
server did not have Office on it, so I had to put the font on the web server.
Are you sure the web server running RS has Arial Narrow installed in the
C:\windows\fonts directory? Since the PDF is generated there, the font must
be there. It doesn't matter if the end users have Arial Narrow on their
workstations.
Ted
"David Bienstock" wrote:
> We use Arial Narrow and ever since we went to a W2K3 box (from a W2K
> installation) everything exports correctly, except for PDF which substitutes
> Helvetica or something with weird spacing. All looks good on the screen and,
> of course, Microsoft Office is installed (which is where the fonts came from
> in our W2K box).
> Any ideas of what to check? Of course the clients have the font because
> embedding is not supported.
> --
> "Everyone knows something you don't know"|||So you are saying that your clients see everything correctly, but if you
open the PDF on your 2003 server it substitues fonts? Odd. I'll try the
same on our 2003 server to see if we get the same results. In the meantime,
you could try copying ARIALN.TTF (and related ArialN fonts) from a 2K box to
the 2003 box to factor out some strange corruption issue.
--
Adrian M.
MCP
"David Bienstock" <davidleebspam-sqlrs@.yahoo.com> wrote in message
news:4E1E4251-E93B-4AC0-B679-55CA254356E0@.microsoft.com...
> Yes it does. But I don't know if something happened when I transferred
> everything from W2K to W2K3.
> "Adrian M." wrote:
>> Does this happen w/ the latest acrobat reader (v7.0)?
>> --
>> Adrian M.
>> MCP
>>
>> "David Bienstock" <DavidBienstock@.discussions.microsoft.com> wrote in
>> message news:B7583531-C4D7-4B04-9C57-E92D17921B9A@.microsoft.com...
>> > We use Arial Narrow and ever since we went to a W2K3 box (from a W2K
>> > installation) everything exports correctly, except for PDF which
>> > substitutes
>> > Helvetica or something with weird spacing. All looks good on the
>> > screen
>> > and,
>> > of course, Microsoft Office is installed (which is where the fonts came
>> > from
>> > in our W2K box).
>> >
>> > Any ideas of what to check? Of course the clients have the font
>> > because
>> > embedding is not supported.
>> > --
>> > "Everyone knows something you don't know"
>>|||Yes, I checked and installed it through the Fonts control panel. But, I was
told that you have to "open the font then reboot the server". I rebooted the
server but didn't open the font. The next scheduled reboot is Saturday night.
"Ted K" wrote:
> David,
> I have used Arial Narrow successfully on W2K3 boxes. Our production web
> server did not have Office on it, so I had to put the font on the web server.
> Are you sure the web server running RS has Arial Narrow installed in the
> C:\windows\fonts directory? Since the PDF is generated there, the font must
> be there. It doesn't matter if the end users have Arial Narrow on their
> workstations.
> Ted
> "David Bienstock" wrote:
> > We use Arial Narrow and ever since we went to a W2K3 box (from a W2K
> > installation) everything exports correctly, except for PDF which substitutes
> > Helvetica or something with weird spacing. All looks good on the screen and,
> > of course, Microsoft Office is installed (which is where the fonts came from
> > in our W2K box).
> >
> > Any ideas of what to check? Of course the clients have the font because
> > embedding is not supported.
> > --
> > "Everyone knows something you don't know"|||Oh, and I think it does matter regarding the workstations because fonts are
not embedded. Strange thing, it's only PDFs. Excel, TIFF, etc. are all OK.
I can even copy from the PDF and paste into Word and it looks OK without
kerning issues, but it's not OK in the PDF.
"Ted K" wrote:
> David,
> I have used Arial Narrow successfully on W2K3 boxes. Our production web
> server did not have Office on it, so I had to put the font on the web server.
> Are you sure the web server running RS has Arial Narrow installed in the
> C:\windows\fonts directory? Since the PDF is generated there, the font must
> be there. It doesn't matter if the end users have Arial Narrow on their
> workstations.
> Ted
> "David Bienstock" wrote:
> > We use Arial Narrow and ever since we went to a W2K3 box (from a W2K
> > installation) everything exports correctly, except for PDF which substitutes
> > Helvetica or something with weird spacing. All looks good on the screen and,
> > of course, Microsoft Office is installed (which is where the fonts came from
> > in our W2K box).
> >
> > Any ideas of what to check? Of course the clients have the font because
> > embedding is not supported.
> > --
> > "Everyone knows something you don't know"|||Hi,
Acrobat (Reader) has the option to use the local fonts. If turned on Acrobat
also uses local fonts for redering not embedded fonts. If turned off only the
embedded fonts are used. And because all fonts have a embedded substitute
font, these fonts are snown by this one. Helvetica is a substitute for Arial
Narrow. Press Ctrl+Shift+Y for turning it on or off. or Document -> Use Local
Fonts.
Jan Pieter Posthuma
"David Bienstock" wrote:
> Oh, and I think it does matter regarding the workstations because fonts are
> not embedded. Strange thing, it's only PDFs. Excel, TIFF, etc. are all OK.
> I can even copy from the PDF and paste into Word and it looks OK without
> kerning issues, but it's not OK in the PDF.
> "Ted K" wrote:
> > David,
> > I have used Arial Narrow successfully on W2K3 boxes. Our production web
> > server did not have Office on it, so I had to put the font on the web server.
> > Are you sure the web server running RS has Arial Narrow installed in the
> > C:\windows\fonts directory? Since the PDF is generated there, the font must
> > be there. It doesn't matter if the end users have Arial Narrow on their
> > workstations.
> >
> > Ted
> >
> > "David Bienstock" wrote:
> >
> > > We use Arial Narrow and ever since we went to a W2K3 box (from a W2K
> > > installation) everything exports correctly, except for PDF which substitutes
> > > Helvetica or something with weird spacing. All looks good on the screen and,
> > > of course, Microsoft Office is installed (which is where the fonts came from
> > > in our W2K box).
> > >
> > > Any ideas of what to check? Of course the clients have the font because
> > > embedding is not supported.
> > > --
> > > "Everyone knows something you don't know"|||I shall look at that. But keep in mind that everything was OK with SQL RS on
W2K then we moved to W2K3, installed Office, RS, Acrobat 7, etc, and now this
is the only thing not working with ALL clients.
"Jan Pieter Posthuma" wrote:
> Hi,
> Acrobat (Reader) has the option to use the local fonts. If turned on Acrobat
> also uses local fonts for redering not embedded fonts. If turned off only the
> embedded fonts are used. And because all fonts have a embedded substitute
> font, these fonts are snown by this one. Helvetica is a substitute for Arial
> Narrow. Press Ctrl+Shift+Y for turning it on or off. or Document -> Use Local
> Fonts.
> Jan Pieter Posthuma
> "David Bienstock" wrote:
> > Oh, and I think it does matter regarding the workstations because fonts are
> > not embedded. Strange thing, it's only PDFs. Excel, TIFF, etc. are all OK.
> > I can even copy from the PDF and paste into Word and it looks OK without
> > kerning issues, but it's not OK in the PDF.
> >
> > "Ted K" wrote:
> >
> > > David,
> > > I have used Arial Narrow successfully on W2K3 boxes. Our production web
> > > server did not have Office on it, so I had to put the font on the web server.
> > > Are you sure the web server running RS has Arial Narrow installed in the
> > > C:\windows\fonts directory? Since the PDF is generated there, the font must
> > > be there. It doesn't matter if the end users have Arial Narrow on their
> > > workstations.
> > >
> > > Ted
> > >
> > > "David Bienstock" wrote:
> > >
> > > > We use Arial Narrow and ever since we went to a W2K3 box (from a W2K
> > > > installation) everything exports correctly, except for PDF which substitutes
> > > > Helvetica or something with weird spacing. All looks good on the screen and,
> > > > of course, Microsoft Office is installed (which is where the fonts came from
> > > > in our W2K box).
> > > >
> > > > Any ideas of what to check? Of course the clients have the font because
> > > > embedding is not supported.
> > > > --
> > > > "Everyone knows something you don't know"

Arial Narrow not working in .pdf

I'm trying to create a report using Arial Narrow with bold, italics and
underline and the font just isn't showing up in .pdf (I'm getting a different
font). I've installed (and rebooted) the four Arial Narrow fonts that came
with MS Office to the Report Server and I'm still not having any luck. Any
advice would be greatly appreciated.
Thanks!Do you also have Arial Narrow installed on the pc you open the PDF on? Since
RepSvcs cannot embed fonts in PDF documents, you need to have the font
installed both on the server and wherever you open the PDF.
You could also try redeploying the reports after installing the fonts, just
in case.
If none of this helps, you might be having the same problem as I'm having at
the moment. I have Gill Sans installed on the server, but for some reason
RepSvcs keeps reverting to MS Sans Serif when rendering the PDF.
hth
--Rolf
"JSI" wrote:
> I'm trying to create a report using Arial Narrow with bold, italics and
> underline and the font just isn't showing up in .pdf (I'm getting a different
> font). I've installed (and rebooted) the four Arial Narrow fonts that came
> with MS Office to the Report Server and I'm still not having any luck. Any
> advice would be greatly appreciated.
> Thanks!

Arghhhh Alias (local)\FOOBAR -> TCP/IP,ditto

I've just spent days trying to get no-network protocol access to a local
(MSDE )database working. Everything I tried failed, all hints from the
documentation failed.
Eventually...I found cliconfg.exe and found out about Aliases and found the
stupid alias I referred to in the subject line, i.e.
(local)\FOOBAR -> DBMSSOCN,(local)\FOOBAR
No wonder things didn't work when I removed TCP/IP from the server's
protocol set!
So:
1. Why do none of the utilities report the existense of this Alias. Not
osql when I connect, no "using alias" line.
I would like it to say "Using Alias" if it was, e.g.
C:\>osql -S (local)\FOOBAR -U sa
Password:
Using Alias.
[TCP/IP Sockets]Specified SQL server not found.
[TCP/IP Sockets]ConnectionOpen (Connect()).
C:\>
Not from "osql -L", though perhaps the existence of multiple lines of output
was a hint.
Nor when using odbcad32. It does not show that Aliases exist at all; it
does not show the Alias panel. In its "Client Configuration" window, it
uses the term "Server alias", but that's not the same thing I think...it's
just a hold-over from that dialog's use in cliconfg.exe? It certainly does
not show cliconfg.exe's Aliases panel and no alias is created when I try
putting things in there now.
2. Why does none of the documentation mention anything about this?
There's very little mention of aliases at all.
In troubleshooting sections, there's no mention of the possibility of an
alias making the system lie to you.
There's little mention of the client network configuration utility. And
particularly no mention of where it is located and what it is called. I
don't know where I found out is was called cliconfg.exe and it was in
system32. I don't know where I found this, maybe I even in the end
did a search for "cli" on my hard-disk.
3. How did that alias get created?
Was it created by the people who provided the installer for the database'
If so, they better beware. Was it created by some automatic step in using
the database' I certainly didn't create it intentionally and no-one else
has access to my machine.
So just a long complaint really. But hopefully of use to someone. Maybe
even the docuemntation could be improved based on it... :-)
BTW. I'm never really sure of what Power Users can and cannot do, but...
The registry permissions allow a Power User to change aliases. Can power
users normally make such globally significant changes?
--
Alan J. McFarlane
http://homepage.ntlworld.com/alanjmcf/
Please follow-up in the newsgroup for the benefit of all.The client network utilities and other GUI utilities don't ship with MSDE.
Client aliases have been around since SQL 4.2.
SQLDiag.exe will report that aliases are configured on the server as well.
aliases are stored in the registry on the client machine.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MS
SQLServer\Client\ConnectTo
Q. Why does none of the documentation mention anything about this?
Answer:
See: Books Online: Configuring Client Net-Libraries
There are lots of articles that discuss the use of aliases to connect.
328383 INF: SQL Server Clients May Change Protocols When They Try to Connect
http://support.microsoft.com/?id=328383
265808 INF: How to Connect to an SQL Server 2000 Named Instance with the
http://support.microsoft.com/?id=265808
Q. How did that alias get created?
Answer: SQL setup and MDAC setup don't create any aliases. They are
created by the user. Either using SQL Client network Utility, or creating
a ODBC DSN and using the Client Configuration Button.
With MSDE, you also have the option of having it only listen on Shared
Memory. This would only allow local connections to succeed.
This is documented in the sp3 readme as well as the following article.
814130 INF: How to Secure Network Connectivity for SQL Server 2000 Local
http://support.microsoft.com/?id=814130
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Sunday, February 12, 2012

Are transactional settings used only during updates?

Hi,

In the Web application I am working on, data is read from a SQL Server
database. At any time, there are about 15 people browsing the web.

The SQL Server database is updated with new information once every
hour. The update takes a couple of minutes. The isolation level during
the update is so to Serialazable so that the front-end does not get
any incorrect data.

Now, here is my problem. When the web page is being loaded, the server
side ASP.NET code uses several SELECT statements at multiple places.
For various design reasons, these SELECT statements cannot be combined
into a single statement. As a result, it may happen that during the
page load, we get some data before an update and some data after an
update.

I am wondering if I must used a transactional lock even for the Web
application although technically it is not updating the database.

Also, after playing with various transactional settings, I noticed the
following behavior for the readers when a writer enters a transaction:

1. If the reader app has not yet executed the query, the call to query
execution blocks until the writer has done its job.
2. If the reader app has already begun executing the query, the call
is not blocked and SQL Server provides the needed isolation.

I do not wish to block the readers while the update is going on.
Ideally, I would like it to be such that even if the writer is
updating, the readers must continue to get the old data, that is,
until the writer commits the update. However, I did not find any
isolation settings that would let me achieve this non-blocking
behavior. Am I missing something?

Thank you in advance for enlightening me.

PradeepPradeep (ipradeep@.msn.com) writes:
> The SQL Server database is updated with new information once every
> hour. The update takes a couple of minutes. The isolation level during
> the update is so to Serialazable so that the front-end does not get
> any incorrect data.

The isolation level for the update process has nothing to do with
what happens at the front-end. What matters for the front-end is its
isolation level.

> Now, here is my problem. When the web page is being loaded, the server
> side ASP.NET code uses several SELECT statements at multiple places.
> For various design reasons, these SELECT statements cannot be combined
> into a single statement. As a result, it may happen that during the
> page load, we get some data before an update and some data after an
> update.
> I am wondering if I must used a transactional lock even for the Web
> application although technically it is not updating the database.

Yes, this is the place for serialiable isolation level. You start a
transaction, so if the update process chimes in while you are reading,
it will be blocked until you are completed and commit.

There is certainly all reason to be careful here. For instance, don't wait
for user input before you commit, because then the update process could
be blocked forever.

> I do not wish to block the readers while the update is going on.
> Ideally, I would like it to be such that even if the writer is
> updating, the readers must continue to get the old data, that is,
> until the writer commits the update. However, I did not find any
> isolation settings that would let me achieve this non-blocking
> behavior. Am I missing something?

This would be possible in Oracle today, and a new isolation level called
Snapshot isolation in the upcoming version of SQL Server, SQL 2005, also
makes this possible.

But now we are in SQL2000, and will have to do the best we can. I would
probably look into that update process. I don't know how much data that
is involved, but "a couple of minutes" for the update sounds a tad long
to me. I would not be surprised if that time can be significantly reduced.
Particularly the time for inserting data into the actual target tables.
If you need to clean up data, you can use staging tables, that are only
used by the update process.

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp