Showing posts with label errors. Show all posts
Showing posts with label errors. Show all posts

Thursday, March 29, 2012

error finding in SQL server

hi,

Is there an equivalent function in SQL server as to MYsql's
mysql_error() for easy findings of SQL errors? Couldn't find it in the
manual... If no : What if the recommended action to take?

My SQL statement DIE's when I use it on my php page, but works fine in
the MS SQL query analyzer.

obscurrObscurr (obscurr@.hotmail.com) writes:
> Is there an equivalent function in SQL server as to MYsql's
> mysql_error() for easy findings of SQL errors? Couldn't find it in the
> manual... If no : What if the recommended action to take?
> My SQL statement DIE's when I use it on my php page, but works fine in
> the MS SQL query analyzer.

Since I don't know PHP and I don't know MySQL, I may not be giving
you the right answer.

In general, SQL Server's error handling is fairly poor, and you are
supposed to check @.@.error in your SQL code, and always have the
client code to cover up for you. If your SQL statement fails when
running it from PHP, you probably need to find out how to catch
the error in PHP.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

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

Error executing SQL Script from VB:NET

Hi.

I have a complete script from a Database.

But when I try to execute this script (script.txt) from VB.NET shows me many errors. Basically, the special caracters (vbreturn, vbtab, etc.)

How execute this script or format the text to generate the database without problems?

Thanks 4all

IF it is a SQL script, you need a SQL interpreter to run the script.

You would use either OSQL.exe or SQLCmd.exe. (Refer to Books Online for complete syntax details.)

OSQL -S servername -U username -P password -i Scriptfile

Similar command line parameters for SQLCmd.exe

|||You could also tell us what the errors are, what VB object you are trying to use, etc. There are lots of different reasons why this won't work, but I am sure that it could be made to work. Using sqlcmd, osql, or isql would be the easiest way to go, (it changes from one version of SQL Server to the next for the past few versions Smile but SQLCMD is just a .NET program running your batches, so we can make it happen if you will describe more about your issues.

Tuesday, March 27, 2012

Error executing non query: Timeout expired

I was having some errors from the webpage accessing the OLlinks table in the database.

Error executing non query: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at admin_admOLEditLinks.selectData(String strID) in e:\wwwroot\home\admin\admOLEditLinks.aspx.cs:line 101
DateTime:5/23/2007 1:14:10 PM
Source:http://www.myDomain.comiAdmin/admOLEditLinks.aspx?ID=3
ErrorMessage:Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I kept getting the above error so then I try to access the table directly inside of MS SQL Server Management Studio and then I recieved the following error:

SQL Execution Error.

Executed SQL statement: SELECT lnkID, linkFromID, linkToID FROM OLlinks

Error Source: .Net SqlClient Data Provider

Error Message: Timeout expired. The timeout period elapsed prior to completion of the opration or the server is not responding.

Open any other table works fine except this table only. Any help is much appreciated.

Looks like you are returning too many rows to the application? If you run the query in Query Analyzer how many rows does your SELECT statement retrieve?

|||

Okay, here's what I did. In MS SQL Server Management Studio, I click on the New Query icon and pasted in the "SELECT lnkID, linkFromID, linkToID FROM OLlinks" query and the query run fine with only 5 records showing. But if I right click on the OLlinks table in the Tables folder and choose Open Table then I do not see any records showing...and then for a long time I will receive the above error.

This problem does not occur everytime. It happens randomly.

|||

From the description you provided it looks that there is a lock which is there on the table.Might be you are running something in transaction which uses this table. Check in the Activity monitor and see the Lock by process.

|||

I don't think that is the case. I was able to open other tables fine. In addition, this problem only occurs randomly or appears to occur randomly.

And by the way, where is the Activity monitor?

|||

In the sql management studio... under the Management Node... It is.. I was talking about just a possibility and it would be nice to check if it is the case.Big Smile

|||

There is nothing in the Management Node.

|||

Hi,

If it only occurs randomly, I assume that some other operation might be locking the table you're querying.

You can try to increase the timeout value of the command execution. To check if someone else is locking the table, you can use SQL Profiler.

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

Error establishing socket

Our applications (day-end jobs) sporadically get the following errors
(usually between midnight and 1 AM):
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
[Microsoft][SQLServer 2000 Driver for JDBC]Address in use: connect
If the job is restarted, it then works without error. Any ideas what may be
causing the error?
Thanks in advance for any assistance you can offer,
-Chris
Chris:
It's suspicious that these errors appear time-related, esp. during a
*mainentance* time of day when servers may be getting backed up or traffic
on the network may spike w/ data replication, etc. Have you done a good
check for possible environment issues?
-shelby
Shelby Goerlitz
Microsoft SQL Server
"Chris Rowan" <ChrisRowan@.discussions.microsoft.com> wrote in message
news:770F1B8E-5740-4DA5-8053-8B88DA922C2A@.microsoft.com...
> Our applications (day-end jobs) sporadically get the following errors
> (usually between midnight and 1 AM):
> [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
> [Microsoft][SQLServer 2000 Driver for JDBC]Address in use: connect
> If the job is restarted, it then works without error. Any ideas what may
be
> causing the error?
> Thanks in advance for any assistance you can offer,
> -Chris
sql

Monday, March 26, 2012

Error during install of SqlServer 2005 64 Bit edition - please help!

Hi Folks,

I'm receiving an error when i'm trying to setup a maintenance plan. I'm getting weird errors (and cannot continue) and i'm thinking it's related to a 32 bit error i received during installation on a 64 bit edition.

Background
We have a sql server behind hosted on a dedicated 64 bit box out of SanFran. The hosting company installed the 32 bit version of SqlServer 2005 standard on the box and I requested them to remove it and put the 64 bit edition on. They removed the 32 bit edition and installed the 64 bit edition. So far so good. I installed sp1 and that was fine. I then tried to start a MAINTENCE PLAN and was denied -> the component was not installed. I've asked them to install the component and they did, but they recorded an error during the install. The error screen shot is here: http://img525.imageshack.us/img525/5089/errormessagehs4.png

Now i cannot drop any tasks onto the maintenence plan ... so i'm assuming it's related to the above error. Is there any way i can determine what the 32 bit component is, remove it and re-install the correct component? Is there an error log somewhere where i can check things?

This is stopping me from setting up any backup plans :(

Regards,
Justin.

I've tried to google for more info and still have come up blank - anyone know of any clues to help, please?|||

This is an issue where Microsoft.SqlServer.MSMQTask is left behind in COM+ catalog when you toggle between 32-bit and 64-bit installs. You can workaround it by:

1. Open Administrative Tools\Component Services

2. Go to Component Services\Computers\My Computer\COM+ Applications

3. Delete Microsoft.SqlServer.MSMQTask

Then your install should work fine.

Thanks,
Sam Lester (MSFT)

|||

Thanks HEAPS Sam for the post.


>>Sam said:: Then your install should work fine.

So i should then re-install the component that is required for maintenance plans?

Thanks soooo much for reading my post and replying!!

|||

I don't claim to know much about IS & maintenance plans, but that error is due to being able to only register one entry in COM+ at a time. My guess would be that reinstalling after fixing this error should make IS function as normal again. :)

Thanks,
Sam

|||

Thanks again sam - i know this post is a bit late, but i finally got around to removing the 32bit com+ and then installed Sp2 (which was why i waited for so long).

Things look fine - cheers mate.

Error during install of SqlServer 2005 64 Bit edition - please help!

Hi Folks,

I'm receiving an error when i'm trying to setup a maintenance plan. I'm getting weird errors (and cannot continue) and i'm thinking it's related to a 32 bit error i received during installation on a 64 bit edition.

Background
We have a sql server behind hosted on a dedicated 64 bit box out of SanFran. The hosting company installed the 32 bit version of SqlServer 2005 standard on the box and I requested them to remove it and put the 64 bit edition on. They removed the 32 bit edition and installed the 64 bit edition. So far so good. I installed sp1 and that was fine. I then tried to start a MAINTENCE PLAN and was denied -> the component was not installed. I've asked them to install the component and they did, but they recorded an error during the install. The error screen shot is here: http://img525.imageshack.us/img525/5089/errormessagehs4.png

Now i cannot drop any tasks onto the maintenence plan ... so i'm assuming it's related to the above error. Is there any way i can determine what the 32 bit component is, remove it and re-install the correct component? Is there an error log somewhere where i can check things?

This is stopping me from setting up any backup plans :(

Regards,
Justin.

I've tried to google for more info and still have come up blank - anyone know of any clues to help, please?|||

This is an issue where Microsoft.SqlServer.MSMQTask is left behind in COM+ catalog when you toggle between 32-bit and 64-bit installs. You can workaround it by:

1. Open Administrative Tools\Component Services

2. Go to Component Services\Computers\My Computer\COM+ Applications

3. Delete Microsoft.SqlServer.MSMQTask

Then your install should work fine.

Thanks,
Sam Lester (MSFT)

|||

Thanks HEAPS Sam for the post.


>>Sam said:: Then your install should work fine.

So i should then re-install the component that is required for maintenance plans?

Thanks soooo much for reading my post and replying!!

|||

I don't claim to know much about IS & maintenance plans, but that error is due to being able to only register one entry in COM+ at a time. My guess would be that reinstalling after fixing this error should make IS function as normal again. :)

Thanks,
Sam

|||

Thanks again sam - i know this post is a bit late, but i finally got around to removing the 32bit com+ and then installed Sp2 (which was why i waited for so long).

Things look fine - cheers mate.

Monday, March 19, 2012

Error Could establish connection to the database

Hi,

I encounter few errors when I try to create a login page using tool in Microsoft Visual Studio 2005, please refer to below :

'--------------------------

I create a Login screen from Toolbox.

When I try to configure the setting for Provider Configuration in the ASP.NET Website Administration Tool using Select a single provider for all site management data or Select a different provider for each feature (advanced) options, the error 'Could not establish a connection to the database' appear.

I have tried to run aspnet_regsql to configure the server and database and return to this tool to configure the Provider configuration but the same error 'Could not establish a connection to the database.' appear.

When I click the Security Configuration link in ASP.NET Configuration, the error as shown below appear :

'There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the below button to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact under the default settings SQL Server does not allow remote connections.(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)'

When I try to choose Data Store in the Security Configuration screen(Figure 4), the same error('Could not establish a connection to the database') appear.

'--------------------

I also have tried to configure the SQL Server Surface Area Configuration but the same error still appear….

Is there any other configuration I need to set before I can create this login page?

Any advices or help is much appreciate.

Thank you.

Regards,

Vicky

Hi Vickie,

Based on the errors, have you verified that you can manually connect to the data source with the connection string information you are using? You can use the information at this link to see if the 'role manager' feature is enabled,http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000013.asp. And, you can use this link to verify that your server will allow remote connections,http://support.microsoft.com/kb/265808/en-us. I hope this helps.

~des

Sunday, March 11, 2012

error converting nvarchar to int


I have this stored procedure and am getting errors.
I filtered on Info = 'I' which should only have numeric values. I have some
info with Info = 'L' that does have alpha code.
I have tried the case below but am still having problems.
Any help appreciated
CREATE PROCEDURE NTF_UpdateInfoAfterPost
@.orderNo varchar(30),
@.rUser int
AS
--Used to delete the Info messages from all users.
--Typically used before creating a new info message
update Notify
Set
signed = 4,
rUser = @.rUser,
DateSigned = GetDate()
where (Info = 'I' and Info is not null) and orderNo = Case When
isNumeric(@.OrderNo) = 1 then @.OrderNo Else 0 End
Stephen K. MiyasatoHi
Try
update Notify
Set
signed = 4,
rUser = @.rUser,
DateSigned = GetDate()
where (Info = 'I' and Info is not null) and orderNo = Case When
isNumeric(@.OrderNo) = 1 then @.OrderNo Else '0' End
"Stephen K. Miyasato" <miyasat@.flex.com> wrote in message
news:%23IxODu4gGHA.1792@.TK2MSFTNGP03.phx.gbl...
>
> I have this stored procedure and am getting errors.
> I filtered on Info = 'I' which should only have numeric values. I have
> some info with Info = 'L' that does have alpha code.
> I have tried the case below but am still having problems.
> Any help appreciated
>
> CREATE PROCEDURE NTF_UpdateInfoAfterPost
> @.orderNo varchar(30),
> @.rUser int
> AS
> --Used to delete the Info messages from all users.
> --Typically used before creating a new info message
> update Notify
> Set
> signed = 4,
> rUser = @.rUser,
> DateSigned = GetDate()
> where (Info = 'I' and Info is not null) and orderNo = Case When
> isNumeric(@.OrderNo) = 1 then @.OrderNo Else 0 End
> Stephen K. Miyasato
>

Friday, March 9, 2012

Error connecting to SQL Server 2005 Express from Access

I am trying to connect to SQL Server 2005 Express from Access using a
DSN-less connection string, but I keep encountering errors. What happens is
that I have a login form with 2 text boxes for users to enter their username
and password. When they have entered them, they click OK and Access tries to
connect using the connection string below.
After waiting a while I get an error, however the SQL Server Login box
appears and I am able to login using my sa login. So, since I know I can
connect to SQL Server, I think the problem must be with my connection string:
stConnect = "ODBC;DRIVER={SQL Native Client}" _
& ";Trusted_Connection=no" _
& ";SERVER=CHRIS\SQLEXPRESS" _
& ";Address=10.0.0.17,1433" _
& ";Network=DBMSSOCN" _
& ";DATABASE=authorDB 2005_11_11SQL" _
& ";UID=" & stUID _
& ";PWD=" & stPWD & ";"
These are the error messages I get when I try to connect:
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]TCP Provider: No connection could be made
because the target machine actively refused it.
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]An error has occurred while establishing a
connection to the server. When connecting to SQL Server 2005, this failure
may be caused by the fact that under the default settings SQL Server does not
allow remote connections.
Connection failed:
SQLState: 'S1T00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
I should mention that I was able to use a similar connection string to
connect to an MSDE instance with no problems, so if need be I can just use
MSDE. Still, I would prefer to use SQL Server Express since it doesn't have
a workload governor. Also, this is on my local machine, so there shouldn't
be any network issues.
I would appreciate any assistance that anyone can offer.
Thanks,
Chris
By default SQL Express does not accept remote connections over TCP or Named
Pipes, you need to enable that explicitly.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>I am trying to connect to SQL Server 2005 Express from Access using a
> DSN-less connection string, but I keep encountering errors. What happens
> is
> that I have a login form with 2 text boxes for users to enter their
> username
> and password. When they have entered them, they click OK and Access tries
> to
> connect using the connection string below.
> After waiting a while I get an error, however the SQL Server Login box
> appears and I am able to login using my sa login. So, since I know I can
> connect to SQL Server, I think the problem must be with my connection
> string:
> stConnect = "ODBC;DRIVER={SQL Native Client}" _
> & ";Trusted_Connection=no" _
> & ";SERVER=CHRIS\SQLEXPRESS" _
> & ";Address=10.0.0.17,1433" _
> & ";Network=DBMSSOCN" _
> & ";DATABASE=authorDB 2005_11_11SQL" _
> & ";UID=" & stUID _
> & ";PWD=" & stPWD & ";"
> These are the error messages I get when I try to connect:
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]TCP Provider: No connection could be made
> because the target machine actively refused it.
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]An error has occurred while establishing a
> connection to the server. When connecting to SQL Server 2005, this
> failure
> may be caused by the fact that under the default settings SQL Server does
> not
> allow remote connections.
> Connection failed:
> SQLState: 'S1T00'
> SQL Server Error: 0
> [Microsoft][SQL Native Client]Login timeout expired
>
> I should mention that I was able to use a similar connection string to
> connect to an MSDE instance with no problems, so if need be I can just use
> MSDE. Still, I would prefer to use SQL Server Express since it doesn't
> have
> a workload governor. Also, this is on my local machine, so there
> shouldn't
> be any network issues.
> I would appreciate any assistance that anyone can offer.
> Thanks,
> Chris
|||Gert, I know that. I started the Browser and enabled TCP/IP. Like I said, I
can connect using the sa login, and techinically it's not a remote connection
as it's on a local machine. Thanks for the response, but I already checked
and that isn't the problem.
-Chris
"Gert E.R. Drapers" wrote:

> By default SQL Express does not accept remote connections over TCP or Named
> Pipes, you need to enable that explicitly.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2005 All rights reserved.
> "Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
> news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>
>
|||I figured it out. I just needed to change the default port for TCP/IP since
MSDE was using port 1433.
-Chris
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:BD09DFBD-66E6-411D-AA16-2A89D9672C1B@.microsoft.com...[vbcol=seagreen]
> Gert, I know that. I started the Browser and enabled TCP/IP. Like I
> said, I
> can connect using the sa login, and techinically it's not a remote
> connection
> as it's on a local machine. Thanks for the response, but I already
> checked
> and that isn't the problem.
> -Chris
> "Gert E.R. Drapers" wrote:

Error connecting to SQL Server 2005 Express from Access

I am trying to connect to SQL Server 2005 Express from Access using a
DSN-less connection string, but I keep encountering errors. What happens is
that I have a login form with 2 text boxes for users to enter their username
and password. When they have entered them, they click OK and Access tries to
connect using the connection string below.
After waiting a while I get an error, however the SQL Server Login box
appears and I am able to login using my sa login. So, since I know I can
connect to SQL Server, I think the problem must be with my connection string:
stConnect = "ODBC;DRIVER={SQL Native Client}" _
& ";Trusted_Connection=no" _
& ";SERVER=CHRIS\SQLEXPRESS" _
& ";Address=10.0.0.17,1433" _
& ";Network=DBMSSOCN" _
& ";DATABASE=authorDB 2005_11_11SQL" _
& ";UID=" & stUID _
& ";PWD=" & stPWD & ";"
These are the error messages I get when I try to connect:
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]TCP Provider: No connection could be made
because the target machine actively refused it.
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]An error has occurred while establishing a
connection to the server. When connecting to SQL Server 2005, this failure
may be caused by the fact that under the default settings SQL Server does not
allow remote connections.
Connection failed:
SQLState: 'S1T00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
I should mention that I was able to use a similar connection string to
connect to an MSDE instance with no problems, so if need be I can just use
MSDE. Still, I would prefer to use SQL Server Express since it doesn't have
a workload governor. Also, this is on my local machine, so there shouldn't
be any network issues.
I would appreciate any assistance that anyone can offer.
Thanks,
Chris
By default SQL Express does not accept remote connections over TCP or Named
Pipes, you need to enable that explicitly.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>I am trying to connect to SQL Server 2005 Express from Access using a
> DSN-less connection string, but I keep encountering errors. What happens
> is
> that I have a login form with 2 text boxes for users to enter their
> username
> and password. When they have entered them, they click OK and Access tries
> to
> connect using the connection string below.
> After waiting a while I get an error, however the SQL Server Login box
> appears and I am able to login using my sa login. So, since I know I can
> connect to SQL Server, I think the problem must be with my connection
> string:
> stConnect = "ODBC;DRIVER={SQL Native Client}" _
> & ";Trusted_Connection=no" _
> & ";SERVER=CHRIS\SQLEXPRESS" _
> & ";Address=10.0.0.17,1433" _
> & ";Network=DBMSSOCN" _
> & ";DATABASE=authorDB 2005_11_11SQL" _
> & ";UID=" & stUID _
> & ";PWD=" & stPWD & ";"
> These are the error messages I get when I try to connect:
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]TCP Provider: No connection could be made
> because the target machine actively refused it.
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]An error has occurred while establishing a
> connection to the server. When connecting to SQL Server 2005, this
> failure
> may be caused by the fact that under the default settings SQL Server does
> not
> allow remote connections.
> Connection failed:
> SQLState: 'S1T00'
> SQL Server Error: 0
> [Microsoft][SQL Native Client]Login timeout expired
>
> I should mention that I was able to use a similar connection string to
> connect to an MSDE instance with no problems, so if need be I can just use
> MSDE. Still, I would prefer to use SQL Server Express since it doesn't
> have
> a workload governor. Also, this is on my local machine, so there
> shouldn't
> be any network issues.
> I would appreciate any assistance that anyone can offer.
> Thanks,
> Chris
|||Gert, I know that. I started the Browser and enabled TCP/IP. Like I said, I
can connect using the sa login, and techinically it's not a remote connection
as it's on a local machine. Thanks for the response, but I already checked
and that isn't the problem.
-Chris
"Gert E.R. Drapers" wrote:

> By default SQL Express does not accept remote connections over TCP or Named
> Pipes, you need to enable that explicitly.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2005 All rights reserved.
> "Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
> news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>
>
|||I figured it out. I just needed to change the default port for TCP/IP since
MSDE was using port 1433.
-Chris
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:BD09DFBD-66E6-411D-AA16-2A89D9672C1B@.microsoft.com...[vbcol=seagreen]
> Gert, I know that. I started the Browser and enabled TCP/IP. Like I
> said, I
> can connect using the sa login, and techinically it's not a remote
> connection
> as it's on a local machine. Thanks for the response, but I already
> checked
> and that isn't the problem.
> -Chris
> "Gert E.R. Drapers" wrote:

Error connecting to SQL Server 2005 Express from Access

I am trying to connect to SQL Server 2005 Express from Access using a
DSN-less connection string, but I keep encountering errors. What happens is
that I have a login form with 2 text boxes for users to enter their username
and password. When they have entered them, they click OK and Access tries t
o
connect using the connection string below.
After waiting a while I get an error, however the SQL Server Login box
appears and I am able to login using my sa login. So, since I know I can
connect to SQL Server, I think the problem must be with my connection string
:
stConnect = "ODBC;DRIVER={SQL Native Client}" _
& ";Trusted_Connection=no" _
& ";SERVER=CHRIS\SQLEXPRESS" _
& ";Address=10.0.0.17,1433" _
& ";Network=DBMSSOCN" _
& ";DATABASE=authorDB 2005_11_11SQL" _
& ";UID=" & stUID _
& ";PWD=" & stPWD & ";"
These are the error messages I get when I try to connect:
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]TCP Provider: No connection could be m
ade
because the target machine actively refused it.
Connection failed:
SQLState: '08001'
SQL Server Error: 10061
[Microsoft][SQL Native Client]An error has occurred while establishi
ng a
connection to the server. When connecting to SQL Server 2005, this failure
may be caused by the fact that under the default settings SQL Server does no
t
allow remote connections.
Connection failed:
SQLState: 'S1T00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
I should mention that I was able to use a similar connection string to
connect to an MSDE instance with no problems, so if need be I can just use
MSDE. Still, I would prefer to use SQL Server Express since it doesn't have
a workload governor. Also, this is on my local machine, so there shouldn't
be any network issues.
I would appreciate any assistance that anyone can offer.
Thanks,
ChrisBy default SQL Express does not accept remote connections over TCP or Named
Pipes, you need to enable that explicitly.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>I am trying to connect to SQL Server 2005 Express from Access using a
> DSN-less connection string, but I keep encountering errors. What happens
> is
> that I have a login form with 2 text boxes for users to enter their
> username
> and password. When they have entered them, they click OK and Access tries
> to
> connect using the connection string below.
> After waiting a while I get an error, however the SQL Server Login box
> appears and I am able to login using my sa login. So, since I know I can
> connect to SQL Server, I think the problem must be with my connection
> string:
> stConnect = "ODBC;DRIVER={SQL Native Client}" _
> & ";Trusted_Connection=no" _
> & ";SERVER=CHRIS\SQLEXPRESS" _
> & ";Address=10.0.0.17,1433" _
> & ";Network=DBMSSOCN" _
> & ";DATABASE=authorDB 2005_11_11SQL" _
> & ";UID=" & stUID _
> & ";PWD=" & stPWD & ";"
> These are the error messages I get when I try to connect:
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]TCP Provider: No connection could be
made
> because the target machine actively refused it.
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 10061
> [Microsoft][SQL Native Client]An error has occurred while establis
hing a
> connection to the server. When connecting to SQL Server 2005, this
> failure
> may be caused by the fact that under the default settings SQL Server does
> not
> allow remote connections.
> Connection failed:
> SQLState: 'S1T00'
> SQL Server Error: 0
> [Microsoft][SQL Native Client]Login timeout expired
>
> I should mention that I was able to use a similar connection string to
> connect to an MSDE instance with no problems, so if need be I can just use
> MSDE. Still, I would prefer to use SQL Server Express since it doesn't
> have
> a workload governor. Also, this is on my local machine, so there
> shouldn't
> be any network issues.
> I would appreciate any assistance that anyone can offer.
> Thanks,
> Chris|||Gert, I know that. I started the Browser and enabled TCP/IP. Like I said,
I
can connect using the sa login, and techinically it's not a remote connectio
n
as it's on a local machine. Thanks for the response, but I already checked
and that isn't the problem.
-Chris
"Gert E.R. Drapers" wrote:

> By default SQL Express does not accept remote connections over TCP or Name
d
> Pipes, you need to enable that explicitly.
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> You assume all risk for your use.
> Copyright ? SQLDev.Net 1991-2005 All rights reserved.
> "Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in messag
e
> news:4FAF0093-8C11-4030-8E4C-8621DE179732@.microsoft.com...
>
>|||I figured it out. I just needed to change the default port for TCP/IP since
MSDE was using port 1433.
-Chris
"Chris Burnette" <ChrisBurnette@.discussions.microsoft.com> wrote in message
news:BD09DFBD-66E6-411D-AA16-2A89D9672C1B@.microsoft.com...[vbcol=seagreen]
> Gert, I know that. I started the Browser and enabled TCP/IP. Like I
> said, I
> can connect using the sa login, and techinically it's not a remote
> connection
> as it's on a local machine. Thanks for the response, but I already
> checked
> and that isn't the problem.
> -Chris
> "Gert E.R. Drapers" wrote:
>

Friday, February 24, 2012

Error Capture in Procedure?

Is there anyway to capture and manage errors in a procedure so it can
proceed?
(The server keeps deleting my posts; I hope this one gets through)
TIA!
--
Greg CHi Greg.
There are error handling mechanisms in SQL Server, but they do not allow you
to catch or handle or errors.
Ultimately, you cannot handle all t-sql errors in stored procedures.
There is a good article on the topic here:
http://www.sommarskog.se/
HTH
Regards,
Greg Linwood
SQL Server MVP
"Greg C" <gregc@.austinps.com> wrote in message
news:fT%Mb.16281$RV5.7088@.fe2.texas.rr.com...
> Is there anyway to capture and manage errors in a procedure so it can
> proceed?
> (The server keeps deleting my posts; I hope this one gets through)
> TIA!
> --
> Greg C
>|||Thanks Greg.
--
Greg C
"Greg Linwood" <g_linwoodQhotmail.com> wrote in message
news:#BR3XZk2DHA.2888@.tk2msftngp13.phx.gbl...
> Hi Greg.
> There are error handling mechanisms in SQL Server, but they do not allow
you
> to catch or handle or errors.
> Ultimately, you cannot handle all t-sql errors in stored procedures.
> There is a good article on the topic here:
> http://www.sommarskog.se/
> HTH
> Regards,
> Greg Linwood
> SQL Server MVP
> "Greg C" <gregc@.austinps.com> wrote in message
> news:fT%Mb.16281$RV5.7088@.fe2.texas.rr.com...
> >
> > Is there anyway to capture and manage errors in a procedure so it can
> > proceed?
> >
> > (The server keeps deleting my posts; I hope this one gets through)
> >
> > TIA!
> >
> > --
> >
> > Greg C
> >
> >
>

Error Capture in Procedure?

Is there anyway to capture and manage errors in a procedure so it can
proceed?
(The server keeps deleting my posts; I hope this one gets through)
TIA!
Greg CHi Greg.
There are error handling mechanisms in SQL Server, but they do not allow you
to catch or handle or errors.
Ultimately, you cannot handle all t-sql errors in stored procedures.
There is a good article on the topic here:
http://www.sommarskog.se/
HTH
Regards,
Greg Linwood
SQL Server MVP
"Greg C" <gregc@.austinps.com> wrote in message
news:fT%Mb.16281$RV5.7088@.fe2.texas.rr.com...
quote:

> Is there anyway to capture and manage errors in a procedure so it can
> proceed?
> (The server keeps deleting my posts; I hope this one gets through)
> TIA!
> --
> Greg C
>
|||Thanks Greg.
Greg C
"Greg Linwood" <g_linwoodQhotmail.com> wrote in message
news:#BR3XZk2DHA.2888@.tk2msftngp13.phx.gbl...
quote:

> Hi Greg.
> There are error handling mechanisms in SQL Server, but they do not allow

you
quote:

> to catch or handle or errors.
> Ultimately, you cannot handle all t-sql errors in stored procedures.
> There is a good article on the topic here:
> http://www.sommarskog.se/
> HTH
> Regards,
> Greg Linwood
> SQL Server MVP
> "Greg C" <gregc@.austinps.com> wrote in message
> news:fT%Mb.16281$RV5.7088@.fe2.texas.rr.com...
>

Sunday, February 19, 2012

Error Bad data

I have been working fine with no problems and just finished my first report
and deployed it with no errors. The next day I get the message below whenever
I try to run the report thru the report server or try to delploy from inside
VS.net. I have no encrypted data and only one user on this pc. Please help!
The report server cannot decrypt the symmetric key used to access sensitive
or encrypted data in a report server database. You must either restore a
backup key or delete all encrypted content and then restart the service.Just try this
rsactivate -r -c <config file>
>--Original Message--
>I have been working fine with no problems and just
finished my first report
>and deployed it with no errors. The next day I get the
message below whenever
>I try to run the report thru the report server or try to
delploy from inside
>VS.net. I have no encrypted data and only one user on
this pc. Please help!
>The report server cannot decrypt the symmetric key used
to access sensitive
>or encrypted data in a report server database. You must
either restore a
>backup key or delete all encrypted content and then
restart the service.
>.
>|||Did a password that RS uses change? Did you change a user that RS runs as?
All of these can cause this error. To fix it you will need to run
rskeymgmt.exe. If you backed up your symmetric key you can just import it.
If not, run it with -d to delete the encrypted content.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ravi" <ravikantkv@.rediffmail.com> wrote in message
news:8dc301c4966d$8a5d79c0$a301280a@.phx.gbl...
> Just try this
> rsactivate -r -c <config file>
> >--Original Message--
> >I have been working fine with no problems and just
> finished my first report
> >and deployed it with no errors. The next day I get the
> message below whenever
> >I try to run the report thru the report server or try to
> delploy from inside
> >VS.net. I have no encrypted data and only one user on
> this pc. Please help!
> >The report server cannot decrypt the symmetric key used
> to access sensitive
> >or encrypted data in a report server database. You must
> either restore a
> >backup key or delete all encrypted content and then
> restart the service.
> >.
> >