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

Thursday, March 29, 2012

Configure Distribution Wizard - unable to connect to server

I am been trying to setup replication on my local Developer edition copy of SQL Server 2005 SP1, but I keep running to into this unable to connect to server error within MS SQL Server Management Studio environment. I tried various connection settings under the configuration manager and things like adding entries to my host file with no luck. Understand that this requires the server name but failing at providing this for the connection to start the wizard. I am missing something simple here?

Darryl

what is the full error? Is this a remote distributor, and is this a machine in the same domain? If so, make sure to enable remote connections in the SAC.|||

Sorry that I didn't post the full error details on the first post. This is now posted below.

The SQL Server is running locally on the same PC in which I am using MS SQL Server Management Studio. The PC is part of a domain and I am logged using a domain account of which I am the admin on PC. I am able to connect/ open query windows using my domain windows account or SQL Server sa account. This the error below is when to 'right click' on Replication folder and select Configure Distribution. The wizard screen does not appear, just the error. No replication is setup on this server, but the Compact connections tools (IIS setup) were run on this same PC.

Darryl

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

SQL Server is unable to connect to server 'DUTTONDARRYL1'. (Configure Distribution Wizard)


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.ConfigureWizardErrorSR&EvtID=CantConnect&LinkId=20476

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

SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, 'INITIALSETUP1'. (Replication.Utilities)


Program Location:

at Microsoft.SqlServer.Management.UI.ReplicationSqlConnection.CheckServerAlias(ServerConnection conn)
at Microsoft.SqlServer.Management.UI.ReplicationSqlConnection.Open()
at Microsoft.SqlServer.Management.UI.ConfigureDistributionWizard.PrepareToShow()

|||

Did you rename your sql server? In the beginning of the error message it says it cannot connect to DUTTONDARRYL1, but in the end it says INITIALSETUP1. I would remove all the hostfile, aliases, etc. you modified/added, and make sure the sql server has the same name as your machine.

|||

Where does this INITIALSETUP1 name come from or where is it stored? It almost seems like something left over from a partial install. There is no INITIALSETUP1 in the host file and there are no aliases.

Darryl

|||I don't know, you tell me. Do select * from sysservers to see if the entries are correct.|||

Thanks for the select stament. Here is the result with the first 3 column

srvid srvsstatus srvname

0 1089 INITIALSETUP1

1 1184 BAMPrimaryImportSrv

2 1089 DUTTONDARRYL1

3 1089 MSSQLSERVER

The last 2 entries I added today through a store procedure (sp_addserver ?) base on reading other threads on this topic. Ok, I now see were this INITIALSETUP1 is getting stored, can I just write an update statement here against the first record or is there a better way to change the name?

Darryl

PS: Thanks for the quick followup

|||

What are the reasons for calling sp_addserver? You shouldn't be doing this unless you want to use linked servers. See topic "sp_addserver" in Books Online. If you do not need INITIALSETUP1 then you should remove it. Same with MSSQLSERVER entry. You should remove them with sp_dropserver.

|||

Ok I found the solution....

I did need to use sp_addserver, but I was using it incorrectly. As per the on-line books on sp_addserver , this is used for defining a remote server or the name of the local instance of SQL Server. The local instance is what is important to bring up the configuration distribution wizard without the error. Here are my steps:

1) Remove all the servers listed from sp_helpserver or 'select * from sysservers' (as per Greg sugguestion) that are not required or needed for linking. In my case, I removed all server by using the sp_ dropserver

2) Add in the local server using sp_addserver with the local parameter (i.e. sp_addserver @.server'DUTTONDARRYL1', @.local='LOCAL')

3) Re-start SQL Server

You can check if the local instance come up properly if the 'select @.@.servername' displays the server name.

Darryl

PS: Thanks Greg Y for helping me work through this problem

Tuesday, March 27, 2012

Configuration problem (WMIProviderException)

I installed Reporting Services on stand-alone server from a SQL Server 2005
Standard CD. It supposed to connect to a remote SQL Server that would host
the ReportServer database.
I went through the steps of the Configure Report Server till I got to
"Database Setups". I created a new ReportServer database and when click on
"Apply", I get the following warning:
-- QUOTE --
Setting Connection Info for Report Server
Although saving tghe database succeeded, the report server cannot access
internal information about deployment to determine whether the current
configuration is valid for this edition. [...]
-- UNQUOTE --
When I click on the link to show me more information, I get the following
reported exception:
-- QUOTE --
ReportServicesConfigUI.WMIProvider.WMIProviderException: The report server
cannot open a connection to the report server database. A connection to the
database is required for all requests and processing.
(rsReportServerDatabaseUnavailable)
at
ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.ThrowOnError(ManagementBaseObject mo)
at
ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.ListReportServersInDatabase(RSReportServerInfo[]& serverInfos)
-- UNQUOTE --
I'm not trying to set up a scale-out deployment. I want this single instance
of RS to connect to a remote database, and I verifiied that this is supported
by the Standard Edition of SQL Server 2005.
When I ignored this warning and moved the encryption keys stage of the
configuration, I found that only the Restore and Delete are enabled. If
clicked on "Delete", I get this error:
-- QUOTE --
ReportServicesConfigUI.WMIProvider.WMIProviderException: The report server
cannot open a connection to the report server database. A connection to the
database is required for all requests and processing.
(rsReportServerDatabaseUnavailable)
at
ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.ThrowOnError(ManagementBaseObject mo)
at
ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.ListReportServersInDatabase(RSReportServerInfo[]& serverInfos)
-- UNQUOTE --
I verified that the Reporting Server was actually able to connect to the
database to create the Reporting Server database. But somehow it cannot
connect anymore.
Any ideas as to why?
ThanksI am experiencing the exact same problem. Did you get this resolved? Also, I
am curious as to whether you are running a side-by-side installation with SQL
2000 (as I am) or simply using SQL 2005?
Anyone know the solution to this? I've been working on this for several days
now, to no avail
"Homam" wrote:
> I installed Reporting Services on stand-alone server from a SQL Server 2005
> Standard CD. It supposed to connect to a remote SQL Server that would host
> the ReportServer database.
> I went through the steps of the Configure Report Server till I got to
> "Database Setups". I created a new ReportServer database and when click on
> "Apply", I get the following warning:
> -- QUOTE --
> Setting Connection Info for Report Server
> Although saving tghe database succeeded, the report server cannot access
> internal information about deployment to determine whether the current
> configuration is valid for this edition. [...]
> -- UNQUOTE --
> When I click on the link to show me more information, I get the following
> reported exception:
> -- QUOTE --
> ReportServicesConfigUI.WMIProvider.WMIProviderException: The report server
> cannot open a connection to the report server database. A connection to the
> database is required for all requests and processing.
> (rsReportServerDatabaseUnavailable)
> at
> ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.ThrowOnError(ManagementBaseObject mo)
> at
> ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.ListReportServersInDatabase(RSReportServerInfo[]& serverInfos)
> -- UNQUOTE --
> I'm not trying to set up a scale-out deployment. I want this single instance
> of RS to connect to a remote database, and I verifiied that this is supported
> by the Standard Edition of SQL Server 2005.
> When I ignored this warning and moved the encryption keys stage of the
> configuration, I found that only the Restore and Delete are enabled. If
> clicked on "Delete", I get this error:
> -- QUOTE --
> ReportServicesConfigUI.WMIProvider.WMIProviderException: The report server
> cannot open a connection to the report server database. A connection to the
> database is required for all requests and processing.
> (rsReportServerDatabaseUnavailable)
> at
> ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.ThrowOnError(ManagementBaseObject mo)
> at
> ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.ListReportServersInDatabase(RSReportServerInfo[]& serverInfos)
> -- UNQUOTE --
>
> I verified that the Reporting Server was actually able to connect to the
> database to create the Reporting Server database. But somehow it cannot
> connect anymore.
> Any ideas as to why?
>
> Thanks
>

Configuration in SQLCLR Assembly

Hi,

I have an SQLCLR assembly which is required to connect to a remote WCF service. In order to do this in a host such as IIS you would need to store all your WCF configuration data (endpoints, types etc) in the Web.config or App.config (in a windows forms app). This begs the question: Where do you store configuration data for SQLCLR assemblies?

The System.Configuration assembly is available in the SQLCLR, but this assumes a Web or App config files exists? Does SQL have its own config file that you can keep your settings in which is called when the assembly is running from within the SQL process?

If this is not possible, should I rather be storing configuration data in the database itself?

This particular example relates to WCF configuration but is relevant for assemblies using Enterprise Library which is also config driven.

Any help would be appreciated.

Chris

You can use a config file with SQLCLR. Create a config file sqlservr.exe.config and place it in the same directory as the SQL Server executable (sqlservr.exe). Whatever is in that file will be parsed in when an appdomain is loaded.

However, config files are not supported as such, and there is no guarantee it will work in the future. In addition, there is no way to differentiate between config ettings for different databases.

So, use the best storage facility there is - the database.

Niels
|||

Hi Niels,

Thank you for your response. I will test out the sqlservr.exe.config today. I agree that as the application will be running in SQL that the best storage spce is the DB, this however does not solve the problem where you are using tools like EntLib or Technologies like WCF where they rely specifically on configuration files. I am not aware of anyway to make WCF or EntLib collect configuration data from a sql database rather than the Application configuration file.

Chris

Configuration File Woes!!

I have a package for which I have set ProtectionLevel to DontSaveSenstive.

I connect to a SQL Database which supports mixed authentication.

To connect to this server in a flexible way, I have enabled SSIS package configuration.

I have edited my dtsconfig file with notepad and put the right password there (I am able to use management studio to connect to that database using same password).

Now when I come back to BIDS and double click on my connection manager, it doesn't read the configuration from the config file. (it just has a blank password). So it seems that BIDS doesn't read the config file.

What can I do to make BIDS read the config file.

Also, is there a way to encrypt the password (without keys) in the configuration file?

regards,
Abhishek.

Is the package actually failing to validate or run? I think the password box is blank as a security measure, not because the password isn't set.

On encrypting the configs, check out these posts:

http://blogs.conchango.com/jamiethomson/archive/2007/04/26/SSIS_3A00_-Storing-passwords.aspx

http://curionorg.blogspot.com/2007/05/encrypted-sql-server-ssis.html

|||I can understand why the SSIS team has left the password blank. My question is where should the password be entered.

I have entered the password in the package configuration file and BIDS does not read that password.

So it seems to be that once I have set the package security to DontSaveSenstive, I have to enter the password in config file AND in the empty text box in BIDS.

I don't understand why BIDS doesn't read the config file.

|||It does in my tests. Can you provide some more details about how the configuration file is set up and referenced from the package?

Sunday, March 25, 2012

Configuing SQLServer Express for internet access

Could someone point me to an article that shows how to configure SQLServer express so I can connect to it over the lan and Internet?

Thanks

These articles should help guide you.

Configuration -Configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

Configuration -Connect to SQL Express from "downlevel clients"
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx

Configuration -Connect to SQL Express and ‘Stay Connected’
http://betav.com/blog/billva/2006/06/getting_and_staying_connected.html

Configuration - Guideline for Connectivity Question Posting
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1

Thursday, March 22, 2012

coneverting oledb code to connect to remote sqlserver

i have some oledb code made in c#(vs 2005) it is for local msaccess file. i want to conevert the code for sql server where connection string placed in web.config file seperately. please help me.
here is code

private void buildGrid(){string conStr ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="; conStr += Server.MapPath("~/common/db/demo.mdb"); System.Data.OleDb.OleDbConnection dbCon =new System.Data.OleDb.OleDbConnection(conStr); dbCon.Open();string sql ="SELECT * FROM Posts ORDER BY LastPostDate DESC"; System.Data.OleDb.OleDbDataAdapter dbAdapter =new System.Data.OleDb.OleDbDataAdapter(sql, dbCon); DataSet ds =new DataSet(); dbAdapter.Fill(ds); ds.Tables[0].TableName ="Inbox"; Grid1.DataSource = ds;}

please healp me..

Try this:

private void buildGrid(){string conStr ="Server=MyServer; Database=MyDatabase; User Id = MyUser; Password=MyPassword";System.Data.SqlClient.SqlConnection dbCon =new System.Data.SqlClient.SqlConnection(conStr); dbCon.Open();string sql ="SELECT * FROM Posts ORDER BY LastPostDate DESC"; System.Data.SqlClient.SqlDataAdapter dbAdapter =new System.Data.SqlClient.SqlDataAdapter(sql, dbCon); DataSet ds =new DataSet(); dbAdapter.Fill(ds); ds.Tables[0].TableName ="Inbox"; Grid1.DataSource = ds;}

I hope this will help.

Good luck.

|||

thank you,

i got you but i placed my connection string in to the web.config file how to use connection string placed in the web.config file with code you posted

|||

Try this:

private void buildGrid(){string conStr =ConfigurationSettings.AppSettings("MyConnectionStringInWebConfig"); System.Data.SqlClient.SqlConnection dbCon =new System.Data.SqlClient.SqlConnection(conStr); dbCon.Open();string sql ="SELECT * FROM Posts ORDER BY LastPostDate DESC"; System.Data.SqlClient.SqlDataAdapter dbAdapter =new System.Data.SqlClient.SqlDataAdapter(sql, dbCon); DataSet ds =new DataSet(); dbAdapter.Fill(ds); ds.Tables[0].TableName ="Inbox"; Grid1.DataSource = ds;}

Here is a good link:
How to: Read Connection Strings from the Web.config File
http://msdn2.microsoft.com/en-us/library/ms178411.aspx

Good luck.

Conections

Hi I'm very new in this stuff, i have a question, how can i connect mi db, or what services i need to connect my db remotly, i have a Static IP, a Sql Server Developer Edition, so the thing is i need to acces to db wherever i go via Internet, i can acces from the same Network so how can i do for acces external?SQL Server does accepts remote connections over the internet. For SQL Server 2005 you can use the Surface Area Configuration tool to ensure this, see http://msdn2.microsoft.com/en-us/library/ms178763.aspx. Also make sure that the firewall (if you have any) allows SQL Server application to access the internet.|||There is a thread discussing a similar issue. Look at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1144922&SiteID=1 for more information.sqlsql

Conecting over the Internet for getting data from clients.

I want to connect over the internet to get data from clients.What would
be the easiest method and the most stable methos to do it

1.Use a Point to Point prtotcol from the client pc and then upload the
data to our sql server
2.Export the data from the clint pc in XML format and then Enter it in
our computer.
3.Have all clienst ftp the data in a dirctory and then upload the xml
files from the directory?

Thanking you in anticipation.Would love it if we could discuss and
distribute our thoughts on this.

AjayFTP seems like the obvious choice unless you need the data continuously
available online.

--
David Portas
SQL Server MVP
--

Conect via IP not server name - why?

Hi
My colleague has set up MSDE on his machine. I am only able to connect to his machine via IP and not servername
Why is this? I want to use ACCESS as a fornt end and can't useing IP address
Jerry

If you are on the same network just use the register server option in Enterprise manager and it becomes local to you. Hope this helps.

Conect to more instance of SQL SERVER 2005

Hello
I have problems to connect me at more than an instance in SQl SERVER 2005,
someone knows what can be?
I can′t see the other instance.
Thank
Cristián Carrasco G.
You need to be more specific about the problem or behavior. What tool are you
using to make the connections? Exactly, what do you mean by 'can't see the
other instance'?
Have you tried to connect to the instance using osql.exe or sqlcmd.exe? Note
that not seeing an instance in a dropdown list is not necessarily a
server-side problem or a connectivity problem, but often an artifact of that
dropdown list.
Linchi
"sqlextreme" wrote:

> Hello
> I have problems to connect me at more than an instance in SQl SERVER 2005,
> someone knows what can be?
> I can′t see the other instance.
> Thank
> Cristián Carrasco G.
|||Hello Linchi
I am trying to connect me using SQL Sever Management Studio, this is the
error message:
TITLE: Connect to Server
ADDITIONAL INFORMATION:
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.
(provider: TCP Provider, error: 0 - No se ha podido establecer conexión ya
que el equipo de destino ha denegado activamente dicha conexión.) (Microsoft
SQL Server, Error: 10061)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLS erver&EvtID=10061&LinkId=20476[/url]
"Linchi Shea" wrote:
[vbcol=seagreen]
> You need to be more specific about the problem or behavior. What tool are you
> using to make the connections? Exactly, what do you mean by 'can't see the
> other instance'?
> Have you tried to connect to the instance using osql.exe or sqlcmd.exe? Note
> that not seeing an instance in a dropdown list is not necessarily a
> server-side problem or a connectivity problem, but often an artifact of that
> dropdown list.
> Linchi
> "sqlextreme" wrote:

Conect to more instance of SQL SERVER 2005

Hello
I have problems to connect me at more than an instance in SQl SERVER 2005,
someone knows what can be?
I can′t see the other instance.
Thank
Cristián Carrasco G.You need to be more specific about the problem or behavior. What tool are yo
u
using to make the connections? Exactly, what do you mean by 'can't see the
other instance'?
Have you tried to connect to the instance using osql.exe or sqlcmd.exe? Note
that not seeing an instance in a dropdown list is not necessarily a
server-side problem or a connectivity problem, but often an artifact of that
dropdown list.
Linchi
"sqlextreme" wrote:

> Hello
> I have problems to connect me at more than an instance in SQl SERVER 2005,
> someone knows what can be?
> I can′t see the other instance.
> Thank
> Cristián Carrasco G.|||Hello Linchi
I am trying to connect me using SQL Sever Management Studio, this is the
error message:
TITLE: Connect to Server
ADDITIONAL INFORMATION:
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.
(provider: TCP Provider, error: 0 - No se ha podido establecer conexión ya
que el equipo de destino ha denegado activamente dicha conexión.) (Microsof
t
SQL Server, Error: 10061)
For help, click:
http://go.microsoft.com/fwlink?Prod...61&LinkId=20476
"Linchi Shea" wrote:
[vbcol=seagreen]
> You need to be more specific about the problem or behavior. What tool are
you
> using to make the connections? Exactly, what do you mean by 'can't see the
> other instance'?
> Have you tried to connect to the instance using osql.exe or sqlcmd.exe? No
te
> that not seeing an instance in a dropdown list is not necessarily a
> server-side problem or a connectivity problem, but often an artifact of th
at
> dropdown list.
> Linchi
> "sqlextreme" wrote:
>