Showing posts with label via. Show all posts
Showing posts with label via. Show all posts

Monday, March 26, 2012

Help! SQLEXPRESS Command Prompt Installation!

i have a problem installing SQLEXPRESS via command prompt... the installation is successful but the 'sa' account could not login to the server.. here's the command in my batch file.

Code Snippet

Start /wait <exe> /qb INSTANCENAME=MYINSTANCE ADDLOCAL=ALL *AUTOSTART=1 RSCONFIGURATION=DEFAULT SECURITYMODE=SQL SAPWD=sapwd SQLCOLLATION=Latin1_General_BIN requiresmsiengine=1

and one more thing, i need to run the report server automatically.. thanks! Smile

Which connection string are you using to connect to the database and which exact error message do you get ?

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||im using mixed mode... actually there is no error during the installation via command prompt it's just the 'sa' account could not login and the report server could not be initialized but all the components were installed... is there something wrong with my command in the batch file?

Monday, March 19, 2012

Help! getting errors when trying to connect to SQL Server Management Studio

Hi All,

I have Windows 2003 Server with MSSQL 2005 Standard.

I am able to connect via Windows Authentication, but when I try to change it to SQL Server Authentication with user 'sa' I'm then being prompted with the error msg:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (.Net SqlClient Data Provider)
Here is the entire list of msgs that are showing up:

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

Cannot connect to SOLELL-QGL5PG9D.

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

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (.Net SqlClient Data Provider)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkId=20476

Server Name: SOLELL-QGL5PG9D
Error Number: 233
Severity: 20
State: 0

Program Location:

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
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()

Any pointers?

-Alon.
Hi,

didi you enable mixed authentication or did you just enable the Windows Authentication ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||Hi Jens,

I installed the MSSQL a week and a half ago, and I believe it was set to Mixed. I simply don't remember.
Is there a way to know?
Can it be changed to Mixed mode in the event that I missed that? or do I need to uninstall and re-install from scratch?

thanks,

-Alon.
|||Hi Jens,

Since I didn't have any database created yet, I've uninstalled MSSQL and Re-installed it.
This time, I made sure it was set to the Mixed Mode.
I don't know if there was a way to verify an early install or if there is a way to change from
Windows Auth Only to Mixed mode, but Uninstalling and Re-installing took only 30 minutes and I had no databases that I needed to check previously,. so that was my solution.

Thanks for the interest.

-Alon.
|||

Hi,

just for the completion of your answer, the authentication mode can be investigated by using the SQL Server Management Studio and right clicking on the server, choosing the properties and viewing the setting in the Security pane. If you don′t have any visual tool for editing this you can use the registry key

Default instance:
"HKEY_LOCAL_MACHINE\Software\Microsoft\MSSqlserver\MSSqlServer\LoginMode"

to 2 for mixed-mode or 1 for integrated.

Have in mind that changing the setting will need a restart of the server to apply.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||Hey,

I had this same issue. My MSSQL 2005 server was setup on a port other than the default 1433. Once I added the port number to the connect string, I was able to connect. ie.: SERVERNAME, 9999

Good Luck.

Monday, March 12, 2012

Help! getting errors when trying to connect to SQL Server Management Studio

Hi All,

I have Windows 2003 Server with MSSQL 2005 Standard.

I am able to connect via Windows Authentication, but when I try to change it to SQL Server Authentication with user 'sa' I'm then being prompted with the error msg:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (.Net SqlClient Data Provider)
Here is the entire list of msgs that are showing up:

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

Cannot connect to SOLELL-QGL5PG9D.

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

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (.Net SqlClient Data Provider)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=233&LinkId=20476

Server Name: SOLELL-QGL5PG9D
Error Number: 233
Severity: 20
State: 0

Program Location:

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
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()

Any pointers?

-Alon.
Hi,

didi you enable mixed authentication or did you just enable the Windows Authentication ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||Hi Jens,

I installed the MSSQL a week and a half ago, and I believe it was set to Mixed. I simply don't remember.
Is there a way to know?
Can it be changed to Mixed mode in the event that I missed that? or do I need to uninstall and re-install from scratch?

thanks,

-Alon.
|||Hi Jens,

Since I didn't have any database created yet, I've uninstalled MSSQL and Re-installed it.
This time, I made sure it was set to the Mixed Mode.
I don't know if there was a way to verify an early install or if there is a way to change from
Windows Auth Only to Mixed mode, but Uninstalling and Re-installing took only 30 minutes and I had no databases that I needed to check previously,. so that was my solution.

Thanks for the interest.

-Alon.
|||

Hi,

just for the completion of your answer, the authentication mode can be investigated by using the SQL Server Management Studio and right clicking on the server, choosing the properties and viewing the setting in the Security pane. If you don′t have any visual tool for editing this you can use the registry key

Default instance:
"HKEY_LOCAL_MACHINE\Software\Microsoft\MSSqlserver\MSSqlServer\LoginMode"

to 2 for mixed-mode or 1 for integrated.

Have in mind that changing the setting will need a restart of the server to apply.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||Hey,

I had this same issue. My MSSQL 2005 server was setup on a port other than the default 1433. Once I added the port number to the connect string, I was able to connect. ie.: SERVERNAME, 9999

Good Luck.

Wednesday, March 7, 2012

HELP! ODBC becoming unusable

Here goes: We have situation at a customer site where users are suddenly unable to connect to SQL 2K via ASP using ODBC via DSN. While the customer is in this state, our Windows clients, which connect using OLE DB (ADO) to the same DB as the ASP, seem to be connecting without problems. Therefore, the problem seems to be with ODBC.

Additional details about the problem site:
SQL ODBC 3.50
Win2K Server SP 4.
SQL2k SP2.
MDAC 2.62
<100 users total
Moderate usage of our ASP interface

Note: SQL2k and IIS are on the same LAN-side server.

FYI: Another part of the problem is that I'm a developer and am not that familiar with the tools available to help me troubleshoot this kind of problem.

We've tried using Perfmon to monitor connection pooling, but nothing stood-out.

We've tried using netstat (with various switches), but nothing stood-out.

Does anybody have any advice?At least apply SP3 to your SQL.|||http://www.winnetmag.com/Windows/Article/ArticleID/3507/3507.html and take help of ODBC trace.
Check this KBA http://support.microsoft.com/default.aspx?scid=kb;EN-US;268591 and corresponding referenced KBAs to take help of ODBC tracing to troubleshoot the problem.

Ensure both client and server are enabled with similar protocol, service packs as referred.|||Originally posted by rdjabarov
At least apply SP3 to your SQL.

Thanks. We will be advising them to update SQL to SP3, but it's not very comforting to us to give what they'll perceive as a solution, when we heavn't even identified the problem.|||While many of us here know client connectivity, it's still a SQL Server forum, not SQL Client ;)

I'd follow Satya's suggestions, at least you can see for yourself if you're even getting to the server.|||Originally posted by Satya
http://www.winnetmag.com/Windows/Article/ArticleID/3507/3507.html and take help of ODBC trace.
Check this KBA http://support.microsoft.com/default.aspx?scid=kb;EN-US;268591 and corresponding referenced KBAs to take help of ODBC tracing to troubleshoot the problem.

Ensure both client and server are enabled with similar protocol, service packs as referred.
That's some great information! But won't this only trace activity across an open connection (implicit or explicit)? If so, I'm not sure it'll help because the problems is that at some point, the ASP are simply unable to connect via DSN using ODBC.

Given that it's as though SQL is simply inaccessable via the DSN, even when the ADO OLE DB client app is connecting fine, we've been speculating (with help from Microsoft) that the problem is with ODBC's connection pooling. We've tried to set-up performance logging of connection pooling in-house in an effort to determine it's potential usefulness to our scenario in production, but our in-house graphs show no activity...probably due to the relatively low activity in our development environment. We walked the customer through setting it up on their server anyhow.

Just recently, the problem occurred again on the customer's server. Before they could reboot the server, we took the opportunity to run NETSTAT to view the sockets for clues, but there were less than 20 results. Possibly because they have SQL and IIS on the same server?

This sucks because all we want to do is get an idea of how to duplicate the problem in a controlled environment so we can either a) adjust our ASP accordingly or b) give them a solution that we know addresses the problem.

Thoughts, comments, advice?|||Originally posted by rdjabarov
While many of us here know client connectivity, it's still a SQL Server forum, not SQL Client ;)

I'd follow Satya's suggestions, at least you can see for yourself if you're even getting to the server.
Was the frist comment a suggestion that my question (i.e. how to troubleshoot SQL connectivity issues) is outside of the scope of this forum? If so, please advise a more approriate forum. Thanks.

Sunday, February 19, 2012

help with update query needed

Could anyone help me with an update query? I need to populate Table 1
(bookings) with data from Table 3 (defaults), via a joining field in Table 2
(enquiries). All fields are of type INT, using SQL Server 2000.
Table 1 (bookings):
id, t_val, q_val
Table 2 (enquiries):
id, booking_id, enq_type
Table 3 (defaults):
id, def_enq_type, def_t_val, def_q_val
Table 3 data:
1,9,2,1
2,10,2,2
3,11,3,2
4,12,1,2
The fields to be updated are 'bookings.t_val' and 'bookings.q_val', from
'defaults.def_t_val' and 'defaults.def_q_val' respectively. 'bookings.id'
relates to 'enquiries.booking_id', and 'enquiries.enq_type' to
'defaults.def_enq_type'. Just to make it more complex, 'booking_id' in
enquiries can have duplicates, in which case I want the one with the highest
'enquiries.id' (ie the most recent record).
Any help very gratefully received, I've been staring at it for hours.Tony,
Do you have any DDL for the Tables? And also some sample data for the
Tables?
Any how do you perceive Table 1(Bookings) to look like?
Thanks
Barry|||Try This:
declare @.bookings table(id int, t_val int, q_val int)
declare @.enquiries table(id int, booking_id int, enq_type int)
declare @.defaults table(id int, def_enq_type int, def_t_val int,
def_q_val int)
insert @.defaults values(1,9,2,1)
insert @.defaults values(2,10,2,2)
insert @.defaults values(3,11,3,2)
insert @.defaults values(4,12,1,2)
insert @.enquiries values(1, 1, 9)
insert @.enquiries values(2, 2, 11)
insert @.enquiries values(3, 1, 10)
insert @.bookings
select e.booking_id, d.def_t_val, d.def_q_val
from @.enquiries e
inner join @.defaults d
on e.enq_type = d.def_enq_type
inner join (select booking_id, max(id) maxid from @.enquiries group by
booking_id) x
on e.booking_id = x.booking_id and e.id = x.maxid
select * from @.bookings|||Thanks for the replies so far, but I'm still struggling.
I think I should have made it clearer that the table 'bookings' is already
populated with data, and that it is just 2 new columns (t_val, q_val) that
need populating (so obviously I've omitted all other fields not needed for
this update query).
So if 'bookings' currently looks like:
id, t_val, d_val
1, null, null
2, null, null
3, null, null
4, null, null
and 'enquiries' looks like:
id, booking_id, enq_type
1,2,9
2,4,10
3,1,12
4,1,11
5,3,9
(note more than one record for booking_id 1)
and as mentioned before, 'defaults' looks like:
id, def_enq_type, def_t_val, def_q_val
1,9,2,1
2,10,2,2
3,11,3,2
4,12,1,2
then the end result for 'bookings' should be:
id, t_val, d_val
1, 3, 2
2, 2, 1
3, 2, 1
4, 2, 2
Again, any help very gratefully received.
"JeffB" wrote:

> Try This:
> declare @.bookings table(id int, t_val int, q_val int)
> declare @.enquiries table(id int, booking_id int, enq_type int)
> declare @.defaults table(id int, def_enq_type int, def_t_val int,
> def_q_val int)
> insert @.defaults values(1,9,2,1)
> insert @.defaults values(2,10,2,2)
> insert @.defaults values(3,11,3,2)
> insert @.defaults values(4,12,1,2)
> insert @.enquiries values(1, 1, 9)
> insert @.enquiries values(2, 2, 11)
> insert @.enquiries values(3, 1, 10)
> insert @.bookings
> select e.booking_id, d.def_t_val, d.def_q_val
> from @.enquiries e
> inner join @.defaults d
> on e.enq_type = d.def_enq_type
> inner join (select booking_id, max(id) maxid from @.enquiries group by
> booking_id) x
> on e.booking_id = x.booking_id and e.id = x.maxid
> select * from @.bookings
>|||Try this:
declare @.bookings table(id int, t_val int, q_val int)
declare @.defaults table(id int, def_enq_type int, def_t_val int,
def_q_val int)
declare @.enquiries table(id int, booking_id int, enq_type int)
insert @.bookings values(1, null, null)
insert @.bookings values(2, null, null)
insert @.bookings values(3, null, null)
insert @.bookings values(4, null, null)
insert @.defaults values(1,9,2,1)
insert @.defaults values(2,10,2,2)
insert @.defaults values(3,11,3,2)
insert @.defaults values(4,12,1,2)
insert @.enquiries values(1,2,9)
insert @.enquiries values(2,4,10)
insert @.enquiries values(3,1,12)
insert @.enquiries values(4,1,11)
insert @.enquiries values(5,3,9)
update b
set b.t_val = d.def_t_val,
b.q_val = d.def_q_val
from @.bookings b
inner join @.enquiries e
on b.id = e.booking_id
inner join @.defaults d
on e.enq_type = d.def_enq_type
inner join (select booking_id, max(id) maxid from @.enquiries group by
booking_id) x
on e.booking_id = x.booking_id and e.id = x.maxid
where b.t_val is null and b.q_val is null
select * from @.bookings