Showing posts with label local. Show all posts
Showing posts with label local. 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 problems

Hi,
I am trying to configure my serwer (local computer) as a distributor and
publisher to see how it works. I have created sample database with one table
and few filelds. One of them is unique primary key.
During Configuring and Selecting Distributor or Creating Publication I get
an error:
Error 14114: '(null)' is not configured as a Distributor.
What can be the problem? I was trying to configure transactional
replication, but I think that it has no influence, because error occures
during configuring distributor. Also I have used fo snapshot folder admin
share C$ ans normal share with full rights for all users C.
Software versions are:
Windows XP Professional SP1
SQL 2000 Developer SP3 version 8.00.760
Thank you
Przemo
Have a look at http://support.microsoft.com/kb/q302223/
You may have changed the name of the machine since installing replication
and there is no entry in sysservers with the new machine name
--
Mary Bray [SQL Server MVP]
Please only reply to newsgroups
"Przemo" <Przemo@.discussions.microsoft.com> wrote in message
news:3473CCB4-6C0B-4ED4-833E-73CEC5E2E1DB@.microsoft.com...
> Hi,
> I am trying to configure my serwer (local computer) as a distributor and
> publisher to see how it works. I have created sample database with one
> table
> and few filelds. One of them is unique primary key.
> During Configuring and Selecting Distributor or Creating Publication I get
> an error:
> Error 14114: '(null)' is not configured as a Distributor.
> What can be the problem? I was trying to configure transactional
> replication, but I think that it has no influence, because error occures
> during configuring distributor. Also I have used fo snapshot folder admin
> share C$ ans normal share with full rights for all users C.
> Software versions are:
> Windows XP Professional SP1
> SQL 2000 Developer SP3 version 8.00.760
> Thank you
> Przemo

Configuration of SQL Server

Hello, I am from Brazil, for this my English He/she would like to know how I can

configure SQL Sever Express to Turn in my Local pc. If they can help am very

grateful. Wenderson CastroWhat do you want to do, install SQL Server express on your machine ? You might have a look at the common readme files which are shipped with the product. They provide a straightforward walkthrough for installation. For any errors that might come up you are welcome to post them here. If you don′t know where to download express see this link here.

http://msdn.microsoft.com/vstudio/express/sql/download/

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Hi Castro,

SQL Server supports Unicode so you can store pretty much any language in SQL Express that you would like. If you want SQL to follow the rules of a specific language for things such as sort order you need to set the proper Collation, which can be set at the Server level and for individual datbases. Check out this BOL topic for information about Collation.

For the basic SQL Express engine, we do have a Brazilian - Portuguese version which will return error messages in your native language, but we don't support this localized version in any higher Editions, including SQL Express with Advanced Services. You do not need the Brazilian version of SQL Express to store your data, as I mentioned, localized text can be stored in any language version of SQL. You can download localized versions of Express from the download center, just select the language you want from the dropdown. (Note: If the language isn't listed, we don't support it.)

Mike

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.