Wednesday, March 7, 2012
Local server name
I am trying to connect to my (local) server to get a list of databases on that server. It doesn't work when I pass (local) as the server name, but it works if I hardcode in the actual name. Does anyone know how to get the actual server name?
TIA,
RoyceTry "." or "127.0.0.1" without the quotes.
Tim S
Local Server Connection
I am trying connect to a database in SQL EXPRESS 2005 that is located in the same machine that is running (Windows XP Pro) IIS using classic asp code, but i cannot seem to connect to the database. Please anybody help.
Here is the code below.
ConnectionString = "Provider = SQLNCLI;" & _
"Data Source = UNIDWEB\SQLEXPRESS;" & _
"Initial Catalog = <dbname>;" & _
"Integrated Security=SSPI;"
objCmd.open ConnectionStringHi,
make sure that you enabled remote connections for the instance. The walkthrough how to do that can be found on my site int he screencast section. If that did not help you, do not hesitate to come back :-)
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
Local Management Studio cannot connect to Remote IS
I am not able to connect my local SQL Server Management Studio to a remote server hosting our Integration Services. I get the infamous "Access Denied". I have walked through Kirk Haselden's howto at:
http://www.sqljunkies.com/WebLog/knight_reign/archive/2006/01/05/17769.aspx
but the problem persists.
Thanks for any help.
Keehan
Well, with the help of MS support this has been figured out. The above web link is very nearly complete. The only part that I was missing that was crucial was to go to Component Services on the local machine, right click on My Computer and go to the Default Properties tab. Make sure that "Enable Distributed COM on this computer" is checked. Once I did this I was able to connect right away. So, the moral of the story, check your local DCOM settings as well as those on the server.
Now, one thing to remember, you can connect using Management Studio, but if you try to execute packages they will fail. To run packages you need to also install SSIS from say the Developers Edition on your local machine. Once these 2 things were fixed, I can connect with Management Studio and execute packages via Management Studio.
With both of these changes I am also able now to kickoff jobs via the local dtexec commandline tool.
Cheers,
Keehan
|||I have the same problem. And, I reviewed/setting based on those documents. I still got the "Access Denied".
However, if the local user have local admin on remote SSIS server, then user will be able connect to the server.
Any input will be helpful.
James Cheng
|||I overcome this problem by adding local user to "Distributed DCOM Users' group on SSIS server.
Thanks.
|||Keehan,
As suggested, I have added myself and others in my group to the Distributed COM group on our web server. I still get the error below. The link below appears bad.I am trying to connect using Windows Authentication, as is is the only method available in the Connect dialog. For the Engine, either Windows or SQL Server Authentication works just fine.
TITLE: Connect to Server
Cannot connect to ded1368dter.maximumasp.com.
ADDITIONAL INFORMATION:
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
Connect to SSIS Service on machine "ded1368dter.maximumasp.com" failed:
The RPC server is unavailable.
.
Connect to SSIS Service on machine "ded1368dter.maximumasp.com" failed:
The RPC server is unavailable.
.
BUTTONS:
OK
|||
I have the same problem. What's different about our setups that we have to jump through all these hoops ? Did everyone else in the world know to add themselves to the DCOM group ? (which didn't seem to help me anyway). What account do people use on the server for the SQL services ? LocalSystem, or a special windows account ?
When I go into Surface Area Configuration, I notice that "Database Engine" and "Analysis Services" have a sub-tab for "Service" and "Remote Connections". However, "Integration Services" only has a sub-tab for Service, not Remote Connections. Is that OK ?
|||FYI Same problems... tried all the setups including manually adding the group... still "access denied" except for people that are admin on the server.|||I believe that the problem was caused by a bad file of some sort on the CD. We were using the MSDN license CDs and everything else seemed to work. Another guy in the dept had his own MSDN CD he got at a trade show, and his worked fine. When his was installed on the other developers machines, they worked fine as well ........ So maybe others have similar bad CDs ?Friday, February 24, 2012
Local Management Studio cannot connect to Remote IS
I am not able to connect my local SQL Server Management Studio to a remote server hosting our Integration Services. I get the infamous "Access Denied". I have walked through Kirk Haselden's howto at:
http://www.sqljunkies.com/WebLog/knight_reign/archive/2006/01/05/17769.aspx
but the problem persists.
Thanks for any help.
Keehan
Well, with the help of MS support this has been figured out. The above web link is very nearly complete. The only part that I was missing that was crucial was to go to Component Services on the local machine, right click on My Computer and go to the Default Properties tab. Make sure that "Enable Distributed COM on this computer" is checked. Once I did this I was able to connect right away. So, the moral of the story, check your local DCOM settings as well as those on the server.
Now, one thing to remember, you can connect using Management Studio, but if you try to execute packages they will fail. To run packages you need to also install SSIS from say the Developers Edition on your local machine. Once these 2 things were fixed, I can connect with Management Studio and execute packages via Management Studio.
With both of these changes I am also able now to kickoff jobs via the local dtexec commandline tool.
Cheers,
Keehan
|||I have the same problem. And, I reviewed/setting based on those documents. I still got the "Access Denied".
However, if the local user have local admin on remote SSIS server, then user will be able connect to the server.
Any input will be helpful.
James Cheng
|||I overcome this problem by adding local user to "Distributed DCOM Users' group on SSIS server.
Thanks.
|||Keehan,
As suggested, I have added myself and others in my group to the Distributed COM group on our web server. I still get the error below. The link below appears bad.I am trying to connect using Windows Authentication, as is is the only method available in the Connect dialog. For the Engine, either Windows or SQL Server Authentication works just fine.
TITLE: Connect to Server
Cannot connect to ded1368dter.maximumasp.com.
ADDITIONAL INFORMATION:
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
Connect to SSIS Service on machine "ded1368dter.maximumasp.com" failed:
The RPC server is unavailable.
.
Connect to SSIS Service on machine "ded1368dter.maximumasp.com" failed:
The RPC server is unavailable.
.
BUTTONS:
OK
|||
I have the same problem. What's different about our setups that we have to jump through all these hoops ? Did everyone else in the world know to add themselves to the DCOM group ? (which didn't seem to help me anyway). What account do people use on the server for the SQL services ? LocalSystem, or a special windows account ?
When I go into Surface Area Configuration, I notice that "Database Engine" and "Analysis Services" have a sub-tab for "Service" and "Remote Connections". However, "Integration Services" only has a sub-tab for Service, not Remote Connections. Is that OK ?
|||FYI Same problems... tried all the setups including manually adding the group... still "access denied" except for people that are admin on the server.|||I believe that the problem was caused by a bad file of some sort on the CD. We were using the MSDN license CDs and everything else seemed to work. Another guy in the dept had his own MSDN CD he got at a trade show, and his worked fine. When his was installed on the other developers machines, they worked fine as well ........ So maybe others have similar bad CDs ?Local connection to SQL Server 2005 Express fails
Visual Studio using C#. I get the following error when trying to connect:
"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: Named Pipes Provider, error: 40 - Could not open a connection to
SQL Server)"
I enabled Named Pipes but left TCP/IP disabled because this is a localhost
connection on the same computer.
Here is the portion of the code I am using to connect:
string dbCString = "Persist Security Info=False;Integrated
Security=true;Trusted_Connection=true;Initial
Catalog=MxData;server=(local)";
SqlConnection ThisConnection = new SqlConnection(dbCString);
ThisConnection.Open();
Thanks in advance for any help.
Perhaps these will help:
Configuration -Configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
Configuration -Connect to SQL Express from "downlevel clients"
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:GsCdnUMH0OMdb_DYnZ2dnUVZ_qOdnZ2d@.giganews.com ...
>I just installed SQL Server 2005 Express edition, and created an app in
>Visual Studio using C#. I get the following error when trying to connect:
> "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: Named Pipes Provider, error: 40 - Could not open a
> connection to SQL Server)"
> I enabled Named Pipes but left TCP/IP disabled because this is a localhost
> connection on the same computer.
> Here is the portion of the code I am using to connect:
> string dbCString = "Persist Security Info=False;Integrated
> Security=true;Trusted_Connection=true;Initial
> Catalog=MxData;server=(local)";
> SqlConnection ThisConnection = new SqlConnection(dbCString);
> ThisConnection.Open();
>
> Thanks in advance for any help.
>
>
>
>
>
|||Thanks for the info, but I did everything suggested in those two articles
and I still get the same connection error. I also tried various alterations
of my connection string with no success. Further research indicates that
this is a common problem, so I wonder why Microsoft ships the Express
edition along with Visual Studio 2005, but makes it so difficult to connect.
If you or anyone else has any other ideas, I would be most grateful.
Thanks.
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:OOy2vm$EHHA.1784@.TK2MSFTNGP06.phx.gbl...
> Perhaps these will help:
> Configuration -Configure SQL Server 2005 to allow remote connections
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
> Configuration -Connect to SQL Express from "downlevel clients"
> http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
>
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "TAC" <tac@.noemail.com> wrote in message
> news:GsCdnUMH0OMdb_DYnZ2dnUVZ_qOdnZ2d@.giganews.com ...
>
|||This is a WAG:
You only need one of these two settings, perhaps having both is causing the
connection string to cause failure.
Integrated Security=true;Trusted_Connection=true;
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:ONCdne2ocahst_LYnZ2dnUVZ_u6dnZ2d@.giganews.com ...
> Thanks for the info, but I did everything suggested in those two articles
> and I still get the same connection error. I also tried various
> alterations of my connection string with no success. Further research
> indicates that this is a common problem, so I wonder why Microsoft ships
> the Express edition along with Visual Studio 2005, but makes it so
> difficult to connect.
> If you or anyone else has any other ideas, I would be most grateful.
> Thanks.
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:OOy2vm$EHHA.1784@.TK2MSFTNGP06.phx.gbl...
>
|||Thanks for the suggestion, but using only one or the other didn't work,
either.
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:OD744%23LFHHA.1912@.TK2MSFTNGP03.phx.gbl...
> This is a WAG:
> You only need one of these two settings, perhaps having both is causing
> the connection string to cause failure.
> Integrated Security=true;Trusted_Connection=true;
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "TAC" <tac@.noemail.com> wrote in message
> news:ONCdne2ocahst_LYnZ2dnUVZ_u6dnZ2d@.giganews.com ...
>
|||After a lot of research, here's the answer. The connection string should
read as follows:
"Server=.\\SQLEXPRESS;Initial Catalog=MxData;Integrated Security=SSPI";
Note that you need a dot followed by TWO left slashes in your server name.
BTW, Initial Catalog is whatever database you want to use.
"TAC" <tac@.noemail.com> wrote in message
news:bpadnbRK_s7Mz_LYnZ2dnUVZ_oadnZ2d@.giganews.com ...
> Thanks for the suggestion, but using only one or the other didn't work,
> either.
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:OD744%23LFHHA.1912@.TK2MSFTNGP03.phx.gbl...
>
|||Thanks for following up your own post. It prevents others from wasting their
time trying to help you after you have solved the problem, and it helps
others when you share your solution.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:BKidnUwKtpML-PLYnZ2dnUVZ_qmdnZ2d@.giganews.com...
> After a lot of research, here's the answer. The connection string should
> read as follows:
> "Server=.\\SQLEXPRESS;Initial Catalog=MxData;Integrated Security=SSPI";
> Note that you need a dot followed by TWO left slashes in your server name.
> BTW, Initial Catalog is whatever database you want to use.
>
> "TAC" <tac@.noemail.com> wrote in message
> news:bpadnbRK_s7Mz_LYnZ2dnUVZ_oadnZ2d@.giganews.com ...
>
Local connection to SQL Server 2005 Express fails
Visual Studio using C#. I get the following error when trying to connect:
"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: Named Pipes Provider, error: 40 - Could not open a connection to
SQL Server)"
I enabled Named Pipes but left TCP/IP disabled because this is a localhost
connection on the same computer.
Here is the portion of the code I am using to connect:
string dbCString = "Persist Security Info=False;Integrated
Security=true;Trusted_Connection=true;In
itial
Catalog=MxData;server=(local)";
SqlConnection ThisConnection = new SqlConnection(dbCString);
ThisConnection.Open();
Thanks in advance for any help.Perhaps these will help:
Configuration -Configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/defaul...kb;EN-US;914277
Configuration -Connect to SQL Express from "downlevel clients"
http://blogs.msdn.com/sqlexpress/ar.../23/192044.aspx
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:GsCdnUMH0OMdb_DYnZ2dnUVZ_qOdnZ2d@.gi
ganews.com...
>I just installed SQL Server 2005 Express edition, and created an app in
>Visual Studio using C#. I get the following error when trying to connect:
> "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: Named Pipes Provider, error: 40 - Could not open a
> connection to SQL Server)"
> I enabled Named Pipes but left TCP/IP disabled because this is a localhost
> connection on the same computer.
> Here is the portion of the code I am using to connect:
> string dbCString = "Persist Security Info=False;Integrated
> Security=true;Trusted_Connection=true;In
itial
> Catalog=MxData;server=(local)";
> SqlConnection ThisConnection = new SqlConnection(dbCString);
> ThisConnection.Open();
>
> Thanks in advance for any help.
>
>
>
>
>|||Thanks for the info, but I did everything suggested in those two articles
and I still get the same connection error. I also tried various alterations
of my connection string with no success. Further research indicates that
this is a common problem, so I wonder why Microsoft ships the Express
edition along with Visual Studio 2005, but makes it so difficult to connect.
If you or anyone else has any other ideas, I would be most grateful.
Thanks.
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:OOy2vm$EHHA.1784@.TK2MSFTNGP06.phx.gbl...
> Perhaps these will help:
> Configuration -Configure SQL Server 2005 to allow remote connections
> http://support.microsoft.com/defaul...kb;EN-US;914277
> Configuration -Connect to SQL Express from "downlevel clients"
> http://blogs.msdn.com/sqlexpress/ar.../23/192044.aspx
>
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "TAC" <tac@.noemail.com> wrote in message
> news:GsCdnUMH0OMdb_DYnZ2dnUVZ_qOdnZ2d@.gi
ganews.com...
>|||This is a WAG:
You only need one of these two settings, perhaps having both is causing the
connection string to cause failure.
Integrated Security=true;Trusted_Connection=true;
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:ONCdne2ocahst_LYnZ2dnUVZ_u6dnZ2d@.gi
ganews.com...
> Thanks for the info, but I did everything suggested in those two articles
> and I still get the same connection error. I also tried various
> alterations of my connection string with no success. Further research
> indicates that this is a common problem, so I wonder why Microsoft ships
> the Express edition along with Visual Studio 2005, but makes it so
> difficult to connect.
> If you or anyone else has any other ideas, I would be most grateful.
> Thanks.
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:OOy2vm$EHHA.1784@.TK2MSFTNGP06.phx.gbl...
>|||After a lot of research, here's the answer. The connection string should
read as follows:
"Server=.\\SQLEXPRESS;Initial Catalog=MxData;Integrated Security=SSPI";
Note that you need a dot followed by TWO left slashes in your server name.
BTW, Initial Catalog is whatever database you want to use.
"TAC" <tac@.noemail.com> wrote in message
news:bpadnbRK_s7Mz_LYnZ2dnUVZ_oadnZ2d@.gi
ganews.com...
> Thanks for the suggestion, but using only one or the other didn't work,
> either.
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:OD744%23LFHHA.1912@.TK2MSFTNGP03.phx.gbl...
>|||Thanks for following up your own post. It prevents others from wasting their
time trying to help you after you have solved the problem, and it helps
others when you share your solution.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:BKidnUwKtpML-PLYnZ2dnUVZ_qmdnZ2d@.giganews.com...
> After a lot of research, here's the answer. The connection string should
> read as follows:
> "Server=.\\SQLEXPRESS;Initial Catalog=MxData;Integrated Security=SSPI";
> Note that you need a dot followed by TWO left slashes in your server name.
> BTW, Initial Catalog is whatever database you want to use.
>
> "TAC" <tac@.noemail.com> wrote in message
> news:bpadnbRK_s7Mz_LYnZ2dnUVZ_oadnZ2d@.gi
ganews.com...
>
local connect to sql express server
I can't connect to the local sql express server. I see in microsoft sql server management studio express that the server is running but I don't fint the server in access 2003. I work with vista.
what can be the reason?
thanks a lot!
Have you verified your connection string?
You might check with http://www.connectionstrings.com/ to determine how to properly create a conneciton string for Access to use SQL Server.
|||
You need to enable the TCP/IP protocol in SQL Server Configuration Manager in order to connect to SQL Server from Access. Access uses ODBC connections, which is only supported via TCP/IP, thus you need to enable that.
Regards,
Mike
|||i enabled the TCP/ip protocol in sql server configuration manager, but i stil can't connect. when I test the connection in access I get the massage that something went wrong with the initialisation of the application.
|||I don't understand "verified your connection string" ... excuse me I'm en newby
|||
You'll need to provied the exact error message otherwise we're just guessing.
For Access to connect to SQL Server you need to have a DSN, which you create using the Create New Data Source wizard. This is launched in Access when you select ODBC as the source for a Linked table. When you filled out the wizard, you were asked to provide the name of the Server and the name of the database, what did you enter for those fields?
Mike
|||I found the solution: I wrote te servername wrong: it had to be: computername\servername|||
Just in addition and for nitpicking its Computername\Instancename :-)
Jens K. Suessmeyer
http://www.sqlserver2005.de
Monday, February 20, 2012
local app to access sql server box in a different office
What different methods exist when trying to set up a sql server box to
be accessible to an app that needs to connect to it through DSN.
The app is running in a different city than the sql server box.
Would I need to do this through a VPN, IIS?
Any suggestions much appreciated.
You'll need to establish some form of network connectivity between your
offices. This could be anything from a VPN connection over the internet, to
dedicated lines (an expensive but potentially more reliable option). You
may want to post this question to microsoft.public.windows.server.networking
group for other ideas and advice.
--Brian
(Please reply to the newsgroups only.)
"Developer in Need of Information"
<DeveloperinNeedofInformation@.discussions.microsof t.com> wrote in message
news:9CAD55C5-2D7F-4CDF-8E46-255D1ACEC8DC@.microsoft.com...
> Hello,
> What different methods exist when trying to set up a sql server box to
> be accessible to an app that needs to connect to it through DSN.
> The app is running in a different city than the sql server box.
> Would I need to do this through a VPN, IIS?
> Any suggestions much appreciated.
local app to access sql server box in a different office
What different methods exist when trying to set up a sql server box to
be accessible to an app that needs to connect to it through DSN.
The app is running in a different city than the sql server box.
Would I need to do this through a VPN, IIS?
Any suggestions much appreciated.You'll need to establish some form of network connectivity between your
offices. This could be anything from a VPN connection over the internet, to
dedicated lines (an expensive but potentially more reliable option). You
may want to post this question to microsoft.public.windows.server.networking
group for other ideas and advice.
--Brian
(Please reply to the newsgroups only.)
"Developer in Need of Information"
< DeveloperinNeedofInformation@.discussions
.microsoft.com> wrote in message
news:9CAD55C5-2D7F-4CDF-8E46-255D1ACEC8DC@.microsoft.com...
> Hello,
> What different methods exist when trying to set up a sql server box to
> be accessible to an app that needs to connect to it through DSN.
> The app is running in a different city than the sql server box.
> Would I need to do this through a VPN, IIS?
> Any suggestions much appreciated.