Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Monday, March 26, 2012

Problem registering sql server

I am attempting to connect to a SQL Server across the Internet, when I
attempt to register the server through the Enterprise Manager using the IP
provided by the web hosting provider, I get the following error :"SQL Server
does not exist or access denied" , I was told by them that I should change
the default port from 1433 to 4000. I don't know where in SQL Servre i could
make this modification. Anybody knows how?
I have 2 instances of SQL Server, the default one and another named
instance, I am using the named instance, the default one has problems & is
not working, so changing this port thing would be related to the instance I
am working on or to the SQL Server as a whole?
Thanks in advance.
You can use the Client Network Utility to specify ports -
select properties for the TCP IP protocol and define the
port. The named instance would normally go through the
resolution service to determine what port it is listening
on.
Either way, you can always just create an alias using the
Client Network Utility and specify the ports when setting up
the alias.
-Sue
On Wed, 26 Jan 2005 04:19:03 -0800, JessyEzzy
<JessyEzzy@.discussions.microsoft.com> wrote:

>I am attempting to connect to a SQL Server across the Internet, when I
>attempt to register the server through the Enterprise Manager using the IP
>provided by the web hosting provider, I get the following error :"SQL Server
>does not exist or access denied" , I was told by them that I should change
>the default port from 1433 to 4000. I don't know where in SQL Servre i could
>make this modification. Anybody knows how?
>I have 2 instances of SQL Server, the default one and another named
>instance, I am using the named instance, the default one has problems & is
>not working, so changing this port thing would be related to the instance I
>am working on or to the SQL Server as a whole?
>Thanks in advance.

Problem registering sql server

I am attempting to connect to a SQL Server across the Internet, when I
attempt to register the server through the Enterprise Manager using the IP
provided by the web hosting provider, I get the following error :"SQL Server
does not exist or access denied" , I was told by them that I should change
the default port from 1433 to 4000. I don't know where in SQL Servre i could
make this modification. Anybody knows how?
I have 2 instances of SQL Server, the default one and another named
instance, I am using the named instance, the default one has problems & is
not working, so changing this port thing would be related to the instance I
am working on or to the SQL Server as a whole?
Thanks in advance.You can use the Client Network Utility to specify ports -
select properties for the TCP IP protocol and define the
port. The named instance would normally go through the
resolution service to determine what port it is listening
on.
Either way, you can always just create an alias using the
Client Network Utility and specify the ports when setting up
the alias.
-Sue
On Wed, 26 Jan 2005 04:19:03 -0800, JessyEzzy
<JessyEzzy@.discussions.microsoft.com> wrote:

>I am attempting to connect to a SQL Server across the Internet, when I
>attempt to register the server through the Enterprise Manager using the IP
>provided by the web hosting provider, I get the following error :"SQL Serve
r
>does not exist or access denied" , I was told by them that I should change
>the default port from 1433 to 4000. I don't know where in SQL Servre i coul
d
>make this modification. Anybody knows how?
>I have 2 instances of SQL Server, the default one and another named
>instance, I am using the named instance, the default one has problems & is
>not working, so changing this port thing would be related to the instance I
>am working on or to the SQL Server as a whole?
>Thanks in advance.sql

Wednesday, March 21, 2012

Problem opening MSDB folder under Stored Packages

I am able to connect to Integration Services in MSSMS. However, when I try to expand and click on MSDB under Stored Packages, I get a Login Timeout expired error. I get this error both locally, and remotely. Error message suggested "does not allow remote connections", but I checked Surface Area Configuration, and remote connection is already enabled. Moreover, I get the same error even when connecting locally.

any ideas?
Do you have a default instance of SQL Server installed in that machine?|||No, it's a clustersql

Tuesday, March 20, 2012

Problem on collation on SQL Server Express with Windows Mobile 5.0

I am now writing application to connect SQL Server Express in Windows Mobile 5.0.

While running the code, I got error "PlatformNotSupportedException". I realized that it is a problem on different locale on the PDA and the SQL Server. So I tried to re-install the SQL Server for another collation, which is Latin1_General_CI_AI. I have also set the collation to Latin1_General_CI_AI at database-level.

Unfortunately, in the Visual Studio Debugger, I found that the error message is

mscorlib.dll!System.Globalization.CultureInfo.CultureInfo(int culture = 3076, bool useUserOverride = true) + 0xc8 bytes

where the 3076 means Chinese (Hong Kong SAR, PRC) locale from MSDN.

Seems to me that I cannot really change the collation in this Express Edition.

How can I solve it?

Thanks

Hi Billy,

You can not change the Server setting for Collation order once SQL Express is installed, but you can set collation on a per database basis when you created it. I'm not sure if you can change the database collation order after it's created, but if you look up ALTER DATABASE in Books Online, I'm sure you'll find the answer.

Beyond that, where exactly are you installing SQL Express again? SQL Express wouldn't install on Windows Mobile 5.0 so you must be writing an app that connects to a server running SQL Express, or you are actually using SQL Compact Edition. If you are using SQLce, then you should post this question in the SQLce forum.

Mike

|||

Thanks Mike!

"You can not change the Server setting for Collation order once SQL Express is installed, but you can set collation on a per database basis when you created it. I'm not sure if you can change the database collation order after it's created, but if you look up ALTER DATABASE in Books Online, I'm sure you'll find the answer."

-> Yes, I understand that I cannot change Server Setting for Collation after installation. So I DID remove the whole SQL Server Express, and then install it again. At that moment, I selected "SQL_Latin1_General_CP1_CI_AI", that's also what I can see from the SQL Server Management window. It is the same for the database collation setting, which was set to "SQL_Latin1_General_CP1_CI_AI"

So, the problem comes that the actual running in the debugger shows a different collation (Chinese Hong Kong) while it run sqlclient code in the PDA. => That is for sure a contradiction with the server setting. So, what's the problem on this case and how to solve it?

"Beyond that, where exactly are you installing SQL Express again? SQL Express wouldn't install on Windows Mobile 5.0 so you must be writing an app that connects to a server running SQL Express, or you are actually using SQL Compact Edition. If you are using SQLce, then you should post this question in the SQLce forum."

I am using SQL Express in a local PC. And I try to write app using VB on PDA which connects to the PC SQL server.

|||

Hi Billy,

What code are you running to show the collation? Please provide a sample. Do you see similar results if you take the PDA out of the scenario and run code directly on the machine where SQL is installed?

Mike

|||

Hi Mike,

Well, below is the code I run.

Dim sqlConnection1 AsNew SqlConnection("Data Source=BILLY\SQLEXPRESS;Initial Catalog=rfidcps;Persist Security Info=True;User ID=*****; Password=******;")

Dim cmd AsNew SqlCommand

Dim reader As SqlDataReader

cmd.CommandText = "SELECT * FROM Vehicle WHERE MainTagID = '" & "434" & "'"

Dim i AsInteger = 0

cmd.CommandType = CommandType.Text

cmd.Connection = sqlConnection1

sqlConnection1.Open()

reader = cmd.ExecuteReader()

And, the error comes out from executing "reader = cmd.ExecuteReader()", which shows something like this

System.PlatformNotSupportedException was unhandled
Message="PlatformNotSupportedException"
StackTrace:
at System.Globalization.CultureInfo..ctor()
at System.Globalization.CultureInfo..ctor()
at System.Data.SqlClient.TdsParser.GetCodePage()
at System.Data.SqlClient.TdsParser.ProcessEnvChange()
at System.Data.SqlClient.TdsParser.Run()
at System.Data.SqlClient.TdsParser.Run()
at System.Data.SqlClient.SqlInternalConnection.Login()
at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin()
at System.Data.SqlClient.SqlInternalConnection..ctor()
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen()
at System.Data.Common.DbDataAdapter.FillInternal()
at System.Data.Common.DbDataAdapter.Fill()
at System.Data.Common.DbDataAdapter.Fill()
at DeviceApplication1.rfidcpsDataSetTableAdapters.VehicleTableAdapter.Fill()
at DeviceApplication1.Form1.Form1_Load()
at System.Windows.Forms.Form.OnLoad()
at System.Windows.Forms.Form._SetVisibleNotify()
at System.Windows.Forms.Control.set_Visible()
at System.Windows.Forms.Application.Run()
at DeviceApplication1.Form1.Main()

I asked similar question here and I found the collation requested by the server is actually not the one I set to the server

I tried to disconnect connection with the PDA and the server and it showed error in "sqlConnection1.Open()", which was absolutely the right things.

So, I drawed conclusion that the PDA can open the connection to SQL server but just failed to run "reader = cmd.ExecuteReader()"

Thanks for your help~

Best regards,

Billy

|||

I'm running this by a few folks I know to see if they have any ideas.

Mike

Problem on collation on SQL Server Express with Windows Mobile 5.0

I am now writing application to connect SQL Server Express in Windows Mobile 5.0.

While running the code, I got error "PlatformNotSupportedException". I realized that it is a problem on different locale on the PDA and the SQL Server. So I tried to re-install the SQL Server for another collation, which is Latin1_General_CI_AI. I have also set the collation to Latin1_General_CI_AI at database-level.

Unfortunately, in the Visual Studio Debugger, I found that the error message is

mscorlib.dll!System.Globalization.CultureInfo.CultureInfo(int culture = 3076, bool useUserOverride = true) + 0xc8 bytes

where the 3076 means Chinese (Hong Kong SAR, PRC) locale from MSDN.

Seems to me that I cannot really change the collation in this Express Edition.

How can I solve it?

Thanks

Hi Billy,

You can not change the Server setting for Collation order once SQL Express is installed, but you can set collation on a per database basis when you created it. I'm not sure if you can change the database collation order after it's created, but if you look up ALTER DATABASE in Books Online, I'm sure you'll find the answer.

Beyond that, where exactly are you installing SQL Express again? SQL Express wouldn't install on Windows Mobile 5.0 so you must be writing an app that connects to a server running SQL Express, or you are actually using SQL Compact Edition. If you are using SQLce, then you should post this question in the SQLce forum.

Mike

|||

Thanks Mike!

"You can not change the Server setting for Collation order once SQL Express is installed, but you can set collation on a per database basis when you created it. I'm not sure if you can change the database collation order after it's created, but if you look up ALTER DATABASE in Books Online, I'm sure you'll find the answer."

-> Yes, I understand that I cannot change Server Setting for Collation after installation. So I DID remove the whole SQL Server Express, and then install it again. At that moment, I selected "SQL_Latin1_General_CP1_CI_AI", that's also what I can see from the SQL Server Management window. It is the same for the database collation setting, which was set to "SQL_Latin1_General_CP1_CI_AI"

So, the problem comes that the actual running in the debugger shows a different collation (Chinese Hong Kong) while it run sqlclient code in the PDA. => That is for sure a contradiction with the server setting. So, what's the problem on this case and how to solve it?

"Beyond that, where exactly are you installing SQL Express again? SQL Express wouldn't install on Windows Mobile 5.0 so you must be writing an app that connects to a server running SQL Express, or you are actually using SQL Compact Edition. If you are using SQLce, then you should post this question in the SQLce forum."

I am using SQL Express in a local PC. And I try to write app using VB on PDA which connects to the PC SQL server.

|||

Hi Billy,

What code are you running to show the collation? Please provide a sample. Do you see similar results if you take the PDA out of the scenario and run code directly on the machine where SQL is installed?

Mike

|||

Hi Mike,

Well, below is the code I run.

Dim sqlConnection1 As New SqlConnection("Data Source=BILLY\SQLEXPRESS;Initial Catalog=rfidcps;Persist Security Info=True;User ID=*****; Password=******;")

Dim cmd As New SqlCommand

Dim reader As SqlDataReader

cmd.CommandText = "SELECT * FROM Vehicle WHERE MainTagID = '" & "434" & "'"

Dim i As Integer = 0

cmd.CommandType = CommandType.Text

cmd.Connection = sqlConnection1

sqlConnection1.Open()

reader = cmd.ExecuteReader()

And, the error comes out from executing "reader = cmd.ExecuteReader()", which shows something like this

System.PlatformNotSupportedException was unhandled
Message="PlatformNotSupportedException"
StackTrace:
at System.Globalization.CultureInfo..ctor()
at System.Globalization.CultureInfo..ctor()
at System.Data.SqlClient.TdsParser.GetCodePage()
at System.Data.SqlClient.TdsParser.ProcessEnvChange()
at System.Data.SqlClient.TdsParser.Run()
at System.Data.SqlClient.TdsParser.Run()
at System.Data.SqlClient.SqlInternalConnection.Login()
at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin()
at System.Data.SqlClient.SqlInternalConnection..ctor()
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen()
at System.Data.Common.DbDataAdapter.FillInternal()
at System.Data.Common.DbDataAdapter.Fill()
at System.Data.Common.DbDataAdapter.Fill()
at DeviceApplication1.rfidcpsDataSetTableAdapters.VehicleTableAdapter.Fill()
at DeviceApplication1.Form1.Form1_Load()
at System.Windows.Forms.Form.OnLoad()
at System.Windows.Forms.Form._SetVisibleNotify()
at System.Windows.Forms.Control.set_Visible()
at System.Windows.Forms.Application.Run()
at DeviceApplication1.Form1.Main()

I asked similar question here and I found the collation requested by the server is actually not the one I set to the server

I tried to disconnect connection with the PDA and the server and it showed error in "sqlConnection1.Open()", which was absolutely the right things.

So, I drawed conclusion that the PDA can open the connection to SQL server but just failed to run "reader = cmd.ExecuteReader()"

Thanks for your help~

Best regards,

Billy

|||

I'm running this by a few folks I know to see if they have any ideas.

Mike

Monday, March 12, 2012

Problem of MS SQL -ntwdblib.lib NOT found

Dear all,

I want to use C program to connect MS SQL server.
I copied some sample file to install on my computer.
When I run the program, an error occurred, which is about ntwdblib.dll
not find in some paths.
But when I check the paths again, they have ntwdblib.dll.
When I run my C program in another computer, it works...

so , I feel very frustrated.

In my C program, I include the following libraries.
#defineDBNTWIN32
#include "windows.h"
#include <sqlfront.h>
#include <sqldb.h>
#include <stdio.h
Also, I don't know the meaning of "#defineDBNTWIN32".
I haven't installed SQL Client on my computer. Is it the main
problem??

Pls help!!

Cheers,
Alanalan (cheung_yuklun@.i-cable.com) writes:
> I want to use C program to connect MS SQL server.
> I copied some sample file to install on my computer.
> When I run the program, an error occurred, which is about ntwdblib.dll
> not find in some paths.
> But when I check the paths again, they have ntwdblib.dll.
> When I run my C program in another computer, it works...
> so , I feel very frustrated.
> In my C program, I include the following libraries.
> #define DBNTWIN32
> #include "windows.h"
> #include <sqlfront.h>
> #include <sqldb.h>
> #include <stdio.h>
> Also, I don't know the meaning of "#define DBNTWIN32".
> I haven't installed SQL Client on my computer. Is it the main
> problem??

Yes, that is the problem. NTWDBLIB.DLL is the DLL for DB-Library, which
is not part of MDAC, so SQL connectivity is about the only way to install
it.

DB-Library is a very good client library, but unfortunately Microsoft
does not agree, so they stopped developmet of DB-Lib many years ago.
As a consequence, you have restricted support for new features in
SQL Server with DB-Library.

Unless you have some legacy software you are working with, I'd recommend
you to use ODBC or OLE DB instead.

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

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

Problem of connecting to SQL server

Hi

When I try to connect to SQL Database, I always got some errors following by:

Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection

My code:

SqlConnection objConn = new SqlConnection("server=DEVELOPMENT2;" +
"Database=Job_Control;" +
"User ID=sa; Password=!password1");

objConn.Open();

I don`t know what is the problem

Regards

William

Is SQL authentication enabled for that SQL Server, or is it Windows authentication only?
|||If SQL authentication *is* enabled, try, just for kicks:
SqlConnection objConn = new SqlConnection("server=DEVELOPMENT2;" +
"Database=Job_Control;" +
"uid=sa; pwd=!password1");

I'm too lazy to look and see right now if all of your parameters are valid, but I know these ones are.

Problem ODBC connection....

I have a porblem which windows 2000 couldn't connect to SQL server 2005 through ODBC. But I have no problem with the rest of my windows XP pro. Please help. thanksWhich error do you get ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||I have done the same step to connect to SQL through ODBC on windows XP pro. But I have 4 other PC which is run under windows 2000 that unable to connect the SQL server. It just counldn't find the server at all.|||

Hi GAN2006,

Like Jens asked, you'll need to post the exact error message that you're receiving. Also, providing your connection string and indicating which driver you're using (SQL Native client, MDAC) would be helpful. Please take a look at this guideline for insight on the type of information that'll make problem determination easier: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1

Thanks,
Il-Sung.

|||

I think I have faced the same problem.

All you need to do is to install MDAC 2.8. This is because SQL 2000 connector in windows 2000 is not there or not working properly. Install MDAC 2.8 and it shall work. For windows xp, you dont have to because by nature it already have mdac 2.8 components.

Monday, February 20, 2012

Problem in Visual Basic

When I run Visual Basic Application With Back hand Is SQL SERVER DataBAse I Had Connect database with ODBC
But its very Slow What can i do
As there are many ways of doing the same thing, I would recommend that you
encapsulate your data manipulation language into a stored procedure and
make calls to that SP through your VB application. In programming, I can
assure you that short cuts kill the performance.
You can always embed the manipulation language in your VB code itself, but
to enhance performance, the recommended way (from experience) would be to
do so through Stored Procedures. However, this is not a generic statement
but should be evaluated in the light of your own application's
architecture. Have a look at this great article
http://www.sql-server-performance.co...erformance.asp
Kindly review it and analyse the same with respect to your application and
database design.
Hope this helps.
Sanchan [MSFT]
sanchans@.online.microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.