Tuesday, March 27, 2012
Establishing VPN Connection thru DTS package
I have defined a DTS package which establishes VPN connection with my
client's server. When I execute this package thru SQL Enterprise
Manager (SEM) it works fine, but when I schedule it as a job or try to
execute thru SQL Query Analyzer using 'xp_cmdShell' stored proc, it
doesn't establish connection. NE ideas on what am I doing wrong?
Yr prompt response will be highly appreciated.
Thanks,
Um JunkWhen you execute it using xp_cmdshell the package is run under the context
of the SQL Server startup account (if the user connected via Query Analyzer
is a member of the sysadmin role) or the SQL Proxy account (if the user
connected via Query Analyzer is not a member of the sysadmin role).
Login to the machine using these accounts and see if you can run the
package from Enterprise Manager. This could give you some additional
information.
Rand
This posting is provided "as is" with no warranties and confers no rights.sql
Monday, March 26, 2012
Establishing VPN Connection thru DTS package
I have defined a DTS package which establishes VPN connection with my
client's server. When I execute this package thru SQL Enterprise
Manager (SEM) it works fine, but when I schedule it as a job or try to
execute thru SQL Query Analyzer using 'xp_cmdShell' stored proc, it
doesn't establish connection. NE ideas on what am I doing wrong?
Yr prompt response will be highly appreciated.
Thanks,
Um Junk
When you execute it using xp_cmdshell the package is run under the context
of the SQL Server startup account (if the user connected via Query Analyzer
is a member of the sysadmin role) or the SQL Proxy account (if the user
connected via Query Analyzer is not a member of the sysadmin role).
Login to the machine using these accounts and see if you can run the
package from Enterprise Manager. This could give you some additional
information.
Rand
This posting is provided "as is" with no warranties and confers no rights.
Establishing connection to SQL 2005 Server Express
Using localhost (127.0.0.1) an error occurred while establishing a connection to SQL Server 2005.
Error message - 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 connection could be made because the target machine actively refused it.) (.Net SqlClient Data Provider)
Error Number: 10061
Event Source: MSSQLServer
Message text: Cannot connect to 127.0.0.1.
Any ideas?
I have just tried this idea and it worked ! ! !
- Removed SQL Native Client through Add or Remove programmes
- Reinstalled SQLServer 2005 Express
- Used .\sqlexpress as server name
- Clicked Connect
and I got connected to the server ! ! !
Thanks.
|||I was having trouble connecting to the sql server from visual studio.Then I realized that "server name" actually means "sql server name".
I'll consider it a bug.
The drop down list contains server names, such as the name of my local computer as well as other servers on my LAN. Since the list contains server names, and the label says server name, you'd think they mean server name.... but they don't; they mean sql server name.
It's easiest to use ".\" as the server name for localhost, and "sqlexpress" as the name of the sql server instance. So for server name, enter ".\sqlexpress".
By the way, visual studio 2005 is great. What's gotten into microsoft? Ever since windows xp, they seem to be getting their act together... taking time to make things right (e.g. delaying vista, adding visual queues for docking so you don't have to guess where things are gonna land when you drop them). Good job!
|||thanks for posting this! was having the same problems but now it worked in a few seconds!
|||Thank you! Thank You! This is most helpfull. I won't say how much time I spent trying to reconnect to my server after upgrading SQL Express to SP2.
Great formum. Hopefully I'll know enough to give back some day.
|||
Another greatful user of your post. Allow me to add that my database name ended up being msdb
I had been trying to use Northwind
Establishing connection to SQL 2005 Server Express
Using localhost (127.0.0.1) an error occurred while establishing a connection to SQL Server 2005.
Error message - 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 connection could be made because the target machine actively refused it.) (.Net SqlClient Data Provider)
Error Number: 10061
Event Source: MSSQLServer
Message text: Cannot connect to 127.0.0.1.
Any ideas?
I have just tried this idea and it worked ! ! !
- Removed SQL Native Client through Add or Remove programmes
- Reinstalled SQLServer 2005 Express
- Used .\sqlexpress as server name
- Clicked Connect
and I got connected to the server ! ! !
Thanks.
|||I was having trouble connecting to the sql server from visual studio.Then I realized that "server name" actually means "sql server name".
I'll consider it a bug.
The drop down list contains server names, such as the name of my local computer as well as other servers on my LAN. Since the list contains server names, and the label says server name, you'd think they mean server name.... but they don't; they mean sql server name.
It's easiest to use ".\" as the server name for localhost, and "sqlexpress" as the name of the sql server instance. So for server name, enter ".\sqlexpress".
By the way, visual studio 2005 is great. What's gotten into microsoft? Ever since windows xp, they seem to be getting their act together... taking time to make things right (e.g. delaying vista, adding visual queues for docking so you don't have to guess where things are gonna land when you drop them). Good job!|||thanks for posting this! was having the same problems but now it worked in a few seconds!|||Thank you! Thank You! This is most helpfull. I won't say how much time I spent trying to reconnect to my server after upgrading SQL Express to SP2.
Great formum. Hopefully I'll know enough to give back some day.|||
Another greatful user of your post. Allow me to add that my database name ended up being msdb
I had been trying to use Northwind
Establishing connection to SQL 2005 Server Express
Using localhost (127.0.0.1) an error occurred while establishing a connection to SQL Server 2005.
Error message - 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 connection could be made because the target machine actively refused it.) (.Net SqlClient Data Provider)
Error Number: 10061
Event Source: MSSQLServer
Message text: Cannot connect to 127.0.0.1.
Any ideas?
I have just tried this idea and it worked ! ! !
- Removed SQL Native Client through Add or Remove programmes
- Reinstalled SQLServer 2005 Express
- Used .\sqlexpress as server name
- Clicked Connect
and I got connected to the server ! ! !
Thanks.
|||I was having trouble connecting to the sql server from visual studio.Then I realized that "server name" actually means "sql server name".
I'll consider it a bug.
The drop down list contains server names, such as the name of my local computer as well as other servers on my LAN. Since the list contains server names, and the label says server name, you'd think they mean server name.... but they don't; they mean sql server name.
It's easiest to use ".\" as the server name for localhost, and "sqlexpress" as the name of the sql server instance. So for server name, enter ".\sqlexpress".
By the way, visual studio 2005 is great. What's gotten into microsoft? Ever since windows xp, they seem to be getting their act together... taking time to make things right (e.g. delaying vista, adding visual queues for docking so you don't have to guess where things are gonna land when you drop them). Good job!
|||thanks for posting this! was having the same problems but now it worked in a few seconds!
|||Thank you! Thank You! This is most helpfull. I won't say how much time I spent trying to reconnect to my server after upgrading SQL Express to SP2.
Great formum. Hopefully I'll know enough to give back some day.
|||
Another greatful user of your post. Allow me to add that my database name ended up being msdb
I had been trying to use Northwind
|||Scripting as new Table with insert data isn't supported in SQL Server. I found a C# program that does this; http://www.eggheadcafe.com/articles/20040913.aspJust needed the server name. Worked beautifully.
Thank you Thank you.
Fred
sqlEstablishing connection to SQL 2005 Server Express
Using localhost (127.0.0.1) an error occurred while establishing a connection to SQL Server 2005.
Error message - 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 connection could be made because the target machine actively refused it.) (.Net SqlClient Data Provider)
Error Number: 10061
Event Source: MSSQLServer
Message text: Cannot connect to 127.0.0.1.
Any ideas?
I have just tried this idea and it worked ! ! !
- Removed SQL Native Client through Add or Remove programmes
- Reinstalled SQLServer 2005 Express
- Used .\sqlexpress as server name
- Clicked Connect
and I got connected to the server ! ! !
Thanks.
|||I was having trouble connecting to the sql server from visual studio.Then I realized that "server name" actually means "sql server name".
I'll consider it a bug.
The drop down list contains server names, such as the name of my local computer as well as other servers on my LAN. Since the list contains server names, and the label says server name, you'd think they mean server name.... but they don't; they mean sql server name.
It's easiest to use ".\" as the server name for localhost, and "sqlexpress" as the name of the sql server instance. So for server name, enter ".\sqlexpress".
By the way, visual studio 2005 is great. What's gotten into microsoft? Ever since windows xp, they seem to be getting their act together... taking time to make things right (e.g. delaying vista, adding visual queues for docking so you don't have to guess where things are gonna land when you drop them). Good job!|||thanks for posting this! was having the same problems but now it worked in a few seconds!|||Thank you! Thank You! This is most helpfull. I won't say how much time I spent trying to reconnect to my server after upgrading SQL Express to SP2.
Great formum. Hopefully I'll know enough to give back some day.|||
Another greatful user of your post. Allow me to add that my database name ended up being msdb
I had been trying to use Northwind
Establishing connection to SQL 2005 Server Express
Using localhost (127.0.0.1) an error occurred while establishing a connection to SQL Server 2005.
Error message - 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 connection could be made because the target machine actively refused it.) (.Net SqlClient Data Provider)
Error Number: 10061
Event Source: MSSQLServer
Message text: Cannot connect to 127.0.0.1.
Any ideas?
I have just tried this idea and it worked ! ! !
- Removed SQL Native Client through Add or Remove programmes
- Reinstalled SQLServer 2005 Express
- Used .\sqlexpress as server name
- Clicked Connect
and I got connected to the server ! ! !
Thanks.
|||I was having trouble connecting to the sql server from visual studio.Then I realized that "server name" actually means "sql server name".
I'll consider it a bug.
The drop down list contains server names, such as the name of my local computer as well as other servers on my LAN. Since the list contains server names, and the label says server name, you'd think they mean server name.... but they don't; they mean sql server name.
It's easiest to use ".\" as the server name for localhost, and "sqlexpress" as the name of the sql server instance. So for server name, enter ".\sqlexpress".
By the way, visual studio 2005 is great. What's gotten into microsoft? Ever since windows xp, they seem to be getting their act together... taking time to make things right (e.g. delaying vista, adding visual queues for docking so you don't have to guess where things are gonna land when you drop them). Good job!
|||thanks for posting this! was having the same problems but now it worked in a few seconds!
|||Thank you! Thank You! This is most helpfull. I won't say how much time I spent trying to reconnect to my server after upgrading SQL Express to SP2.
Great formum. Hopefully I'll know enough to give back some day.
|||
Another greatful user of your post. Allow me to add that my database name ended up being msdb
I had been trying to use Northwind
Establishing connection from SQL MMC fails
I have Win2003 and SQL server 2000 installed. I have restarted SQL services
and the services crashed and could not be killed. I have killed the
processes manually but when I open SQL Server Enterprise Manager, expand SQL
Server group and click on the desired SQL Server group it is failing and the
MMC becomes not responding.
It fails on 'Establing connection to SQL Server and checking Windows
security'
I have tried to telnet on the respective SQL Server port and the port
responds ok. I have also done a netstat and the server is listening on the
respective port.
From the sql error logs, the following information is being logged
2007-09-26 16:45:04.32 spid8 63 transactions rolled forward in database
'msdb' (4)
2007-09-26 16:45:34.04 spid5 Starting up database 'tempdb'
2007-09-26 16:50:33.06 spid8 Time out occurred while waiting for buffer
latch type 4,bp 0xf97e40, page 1:1508), stat 0x9, object ID 4:2073058421:0,
EC 0x42CAC3F0 : 0, waittime 3000. Continuing to wait.
2007-09-26 16:50:33.06 spid8 Waiting for type 0x4, current count
0x10000a, current owning EC 0x42CAC3F0.
Your suggetions will be highly appreciated.Dear Quintin,
Thank you for posting here.
From the problem description, I understand that the error message
"Establish connection to SQL Server and checking Windows security" is
encountered when trying to connect to the SQL Server 2000 via the
Enterprise Manage. If I have misunderstood about your concern, feel free to
let me know.
Before moving on, I suggest that you try the following method to check if
you could connect via osql.exe
1. Click Start, click Run, type cmd, and then click OK
2. At the command prompt, type the following command, and then press ENTER.
OSQL -E -S <server name>\<instance name>
OSQL -E -S tcp:<computer name>,<port number>
Also, you could try SQL authentication by using sa
OSQL -S <server name>\<instance name> -Usa -P<password>
3. Please check if we can successfully connect to the instance of SQL
Server 2000 by using osql.exe.
If any error message appears, please let me know the extract error message
we received.
Please also help me gather the following information for the further
research:
Information One: SQL MPS Report
=====================Please help create a MPSReport on the problematic machine, which will
collect ERRORLOG, Windows event log and other helpful information about the
SQL Server. To create a MPSReport, please visit the following web site:
http://www.microsoft.com/downloads/details.aspx?FamilyId=CEBF3C7C-7CA5-408F-
88B7-F9C79B7306C0&displaylang=en
And look for MPSRPT_SQL.EXE. Download it and run it on the machine. Dismiss
the prompted dialog boxes and the readme window (usually a Notepad) after
you read them. After the Command Prompt window closes itself, collect the
cab file the tool has generated and sent it to me.
Information Two: Screenshot
=====================Please also help me to capture a screenshot when the error message
"Establish connection to SQL Server and checking Windows security" appears.
1. When the error appears, please press the Print Screen key (PrtScn) on
your keyboard.
2. Click Start, click Run, type MSPAINT, and click OK.
3. In Paint, click Paste under the Edit Menu, click Save under the File
menu, type a file name for the snap shot, choose JPEG as "Save as type",
click "Desktop" on the left pane, and click Save.
Please send above files to me at v-adamqu@.microsoft.com
If anything is unclear in my post, please don't hesitate to let me know and
I will be glad to help. Thank you for your efforts and time.
Have a nice day!
Best regards,
Adams Qu
MCSE, MCDBA, MCTS
Microsoft Online Support
Microsoft Global Technical Support Center
Get Secure! - www.microsoft.com/security
=====================================================When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
--
| From: "Quintin Zammit" <qztarantino@.newsgroup.nospam>
| Subject: Establishing connection from SQL MMC fails
| Date: Wed, 26 Sep 2007 19:27:40 +0200
| Lines: 30
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
| X-RFC2646: Format=Flowed; Original
| Message-ID: <eNQDMKGAIHA.4880@.TK2MSFTNGP03.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.server
| NNTP-Posting-Host: 80.85.100.38
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP03.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:26395
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Hi,
|
| I have Win2003 and SQL server 2000 installed. I have restarted SQL
services
| and the services crashed and could not be killed. I have killed the
| processes manually but when I open SQL Server Enterprise Manager, expand
SQL
| Server group and click on the desired SQL Server group it is failing and
the
| MMC becomes not responding.
|
| It fails on 'Establing connection to SQL Server and checking Windows
| security'
|
| I have tried to telnet on the respective SQL Server port and the port
| responds ok. I have also done a netstat and the server is listening on
the
| respective port.
|
| From the sql error logs, the following information is being logged
|
| 2007-09-26 16:45:04.32 spid8 63 transactions rolled forward in
database
| 'msdb' (4)
| 2007-09-26 16:45:34.04 spid5 Starting up database 'tempdb'
| 2007-09-26 16:50:33.06 spid8 Time out occurred while waiting for
buffer
| latch type 4,bp 0xf97e40, page 1:1508), stat 0x9, object ID
4:2073058421:0,
| EC 0x42CAC3F0 : 0, waittime 3000. Continuing to wait.
| 2007-09-26 16:50:33.06 spid8 Waiting for type 0x4, current count
| 0x10000a, current owning EC 0x42CAC3F0.
|
| Your suggetions will be highly appreciated.
|
|
|
||||Dear Quintin,
I am just writing to see if you have had the opportunity to try the
troubleshooting steps or collect the requested information. If you have any
questions with the previous information I've provided, please don't
hesitate to let me know.
I appreciate your time and look forward to hearing from you.
Have a nice day!
Best regards,
Adams Qu
MCSE, MCDBA, MCTS
Microsoft Online Support
Microsoft Global Technical Support Center
Get Secure! - www.microsoft.com/security
=====================================================When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
| X-Tomcat-ID: 141089102
| References: <eNQDMKGAIHA.4880@.TK2MSFTNGP03.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: v-adamqu@.online.microsoft.com (Adams Qu [MSFT])
| Organization: Microsoft
| Date: Thu, 27 Sep 2007 09:48:43 GMT
| Subject: RE: Establishing connection from SQL MMC fails
| X-Tomcat-NG: microsoft.public.sqlserver.server
| Message-ID: <TcGwYuOAIHA.5204@.TK2MSFTNGHUB02.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.server
| Lines: 126
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:26437
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| Dear Quintin,
|
| Thank you for posting here.
|
| From the problem description, I understand that the error message
| "Establish connection to SQL Server and checking Windows security" is
| encountered when trying to connect to the SQL Server 2000 via the
| Enterprise Manage. If I have misunderstood about your concern, feel free
to
| let me know.
|
| Before moving on, I suggest that you try the following method to check if
| you could connect via osql.exe
|
| 1. Click Start, click Run, type cmd, and then click OK
| 2. At the command prompt, type the following command, and then press
ENTER.
|
|
| OSQL -E -S <server name>\<instance name>
| OSQL -E -S tcp:<computer name>,<port number>
|
| Also, you could try SQL authentication by using sa
|
| OSQL -S <server name>\<instance name> -Usa -P<password>
|
| 3. Please check if we can successfully connect to the instance of SQL
| Server 2000 by using osql.exe.
|
| If any error message appears, please let me know the extract error
message
| we received.
|
| Please also help me gather the following information for the further
| research:
|
| Information One: SQL MPS Report
| =====================| Please help create a MPSReport on the problematic machine, which will
| collect ERRORLOG, Windows event log and other helpful information about
the
| SQL Server. To create a MPSReport, please visit the following web site:
|
http://www.microsoft.com/downloads/details.aspx?FamilyId=CEBF3C7C-7CA5-408F-
| 88B7-F9C79B7306C0&displaylang=en
|
| And look for MPSRPT_SQL.EXE. Download it and run it on the machine.
Dismiss
| the prompted dialog boxes and the readme window (usually a Notepad) after
| you read them. After the Command Prompt window closes itself, collect the
| cab file the tool has generated and sent it to me.
|
| Information Two: Screenshot
| =====================| Please also help me to capture a screenshot when the error message
| "Establish connection to SQL Server and checking Windows security"
appears.
|
| 1. When the error appears, please press the Print Screen key (PrtScn) on
| your keyboard.
| 2. Click Start, click Run, type MSPAINT, and click OK.
| 3. In Paint, click Paste under the Edit Menu, click Save under the File
| menu, type a file name for the snap shot, choose JPEG as "Save as type",
| click "Desktop" on the left pane, and click Save.
|
| Please send above files to me at v-adamqu@.microsoft.com
|
| If anything is unclear in my post, please don't hesitate to let me know
and
| I will be glad to help. Thank you for your efforts and time.
|
| Have a nice day!
|
| Best regards,
|
| Adams Qu
| MCSE, MCDBA, MCTS
| Microsoft Online Support
|
| Microsoft Global Technical Support Center
|
| Get Secure! - www.microsoft.com/security
| =====================================================| When responding to posts, please "Reply to Group" via your newsreader so
| that others may learn and benefit from your issue.
| =====================================================| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
| --
| | From: "Quintin Zammit" <qztarantino@.newsgroup.nospam>
| | Subject: Establishing connection from SQL MMC fails
| | Date: Wed, 26 Sep 2007 19:27:40 +0200
| | Lines: 30
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
| | X-RFC2646: Format=Flowed; Original
| | Message-ID: <eNQDMKGAIHA.4880@.TK2MSFTNGP03.phx.gbl>
| | Newsgroups: microsoft.public.sqlserver.server
| | NNTP-Posting-Host: 80.85.100.38
| | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP03.phx.gbl
| | Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:26395
| | X-Tomcat-NG: microsoft.public.sqlserver.server
| |
| | Hi,
| |
| | I have Win2003 and SQL server 2000 installed. I have restarted SQL
| services
| | and the services crashed and could not be killed. I have killed the
| | processes manually but when I open SQL Server Enterprise Manager,
expand
| SQL
| | Server group and click on the desired SQL Server group it is failing
and
| the
| | MMC becomes not responding.
| |
| | It fails on 'Establing connection to SQL Server and checking Windows
| | security'
| |
| | I have tried to telnet on the respective SQL Server port and the port
| | responds ok. I have also done a netstat and the server is listening on
| the
| | respective port.
| |
| | From the sql error logs, the following information is being logged
| |
| | 2007-09-26 16:45:04.32 spid8 63 transactions rolled forward in
| database
| | 'msdb' (4)
| | 2007-09-26 16:45:34.04 spid5 Starting up database 'tempdb'
| | 2007-09-26 16:50:33.06 spid8 Time out occurred while waiting for
| buffer
| | latch type 4,bp 0xf97e40, page 1:1508), stat 0x9, object ID
| 4:2073058421:0,
| | EC 0x42CAC3F0 : 0, waittime 3000. Continuing to wait.
| | 2007-09-26 16:50:33.06 spid8 Waiting for type 0x4, current count
| | 0x10000a, current owning EC 0x42CAC3F0.
| |
| | Your suggetions will be highly appreciated.
| |
| |
| |
| |
|
|
Establishing a remote connection..! (Again)
Hi,
I am trying to connect via the Management Studio Express. I share a LAN with the server. In Netowrk connections I can see the server and I can even access the "Shared" folders. However,when I try to connect I get an error that says the error may be caused by the server not allowing remote connections. I have already done the following:
With the Surface Area Configuration facility I have set the server to allow remote connections I have selected TCP/IP as the preferred mode of connection. I have selected Windows authentification as mode of authorisationWhat else can I do?
Please help.
Derekprinsloo
Verify that there is no local firewall blocking.
These resources should help 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
Establishing a remote connection..!
How can I establish a remote connection for using remote database in SQL Server 2K5?
Thanks.
Take a look at this link:
http://msdn2.microsoft.com/en-us/library(d=robot)/ms188721.aspx
Is this what you are looking for? If not, please provide additional information on the scenario you want to enable.
Thanks
Laurentiu
my scenario :
my computer is into a LAN. I want to connect from my PC to a database on another computer in this LAN. I have username and password for logging in to the another computer in SQL Server Authentication mode.
please help me!
|||How did you try to connect so far?
Normally, you would need to specify the server name, and the user name and password. But you should check that the server accepts remote connections and that you're not blocked by a firewall. Also check to see that the type of connection that you make is enabled on the server (if you use TCP, check that TCP is enabled).
Thanks
Laurentiu
Establish SQL Connection
Hi! (my first post)
I'm ASP.NET newbie and i´ve got anSQL connection error, i know why, ididn´t establish a connection...
my questions are: how do i establish the connection state?, and where in my project should i do it?
I added the connection section to my web.config, is that enough to establish a connection?
<connectionStrings>
<add name="buscomConnectionString" connectionString="Data Source=myserver.net;Initial Catalog=mycatalog;Persist Security Info=True;User ID=myuser;Password=mypassword"
providerName="System.Data.SqlClient" />
</connectionStrings>
The error i get is:
Object reference not set to an instance of an object.
Description:Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.Exception Details:System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 2443:
Line 2444://If connection is not open then attempt to open it.
Line 2445:if (connection.State == System.Data.ConnectionState.Closed)
Line 2446:{
Line 2447:try
Source File: d:\User\buscom\App_Code\PHP.cs Line: 2445
Thanks and cheers!
Bill Murphy (litio.net)
Welcome to ASP.NET Forums The section you added in web.config is just to store a conneciton string which then can be used in your application. You can create a connection using the connection string like:
SqlConnection conn= new SqlConnection(ConfigurationManager.ConnectionStrings["Access"].ConnectionString.ToString());
Then use Open method to open it:
Conn.Open();
Or you can create a SqlCommand with the connection:
SqlCommand cmd= new SqlCommand("SELECT * FROM sysobjects",conn);
Or do other things as you like. To learn various database connections in ASP .NET, you can start from here:
http://msdn2.microsoft.com/en-us/library/ms254937.aspx
However I suggest you use 'using' block to embed database operations so that the connection will be automatically disposed, so to avoid leaving unuseful open connections. That is:
using (SqlConnection conn= new SqlConnection(ConfigurationManager.ConnectionStrings["Access"].ConnectionString.ToString()))
{//add your code
}
To learn more about connection Close/Dispose in .NET, you can take a look at this article:
http://codebetter.com/blogs/sahil.malik/archive/2004/12/31/40036.aspx
|||That was what I was looking for!! just didn´t seem to find it :D
Both link where very helpfull.
Thanks a lot!
|||sorry, buy looking into that didn´t work out. i have to reopen my question...
I am using the PHPMigration assistant, so i went ahead and generated the connect command and got the following:
try {PHP.MSSQLSupport.Connect(host, user, password); }
catch(System.Exception) {Response.Write("Error, no server"); }
try {PHP.MSSQLSupport.ChangeDatabas
________________________________________________________
This is a duplicate of your other post:http://forums.asp.net/thread/1387576.aspx
Duplicate posts are not permitted on theASP.NET Forums. As a result, the duplicate post has been deleted. We trust however that you will receive helpful replies to your other post, linked above.
Please be aware that theASP.NET Forums are moderated. This means that there will always be a delay between submitting a message and seeing it appear on the forums. There is no need to submit a message multiple times.
Thanks,
ASP.NET Forums team
",0]);//-->e(bbdd);}
catch (System.Exception) { Response.Write( bbdd + " not found"); }
Inserted it into my page and the error above persists.
i am passing a null to PHP.MSSQLSupport.Query, that should reopen the last connection, so i guessI'm just not opening the connection as i should...
How should iestablish the connection with the PHPMigration assistant generatedcode? should i remove the info on the web. config or the above lines?
should i mention my connection string name ( buscomConnectionString )anywhere in the code? or should the above code be enough?
if the databese isn´t connecting properly, would i get a different error? (maybe Error, no server as i specified??)
|||This is what i meant to post:
sorry, buy looking into that didn´t work out. i have to reopen my question...
I am using the PHPMigration assistant, so i went ahead and generated the connect command and got the following:
try {PHP.MSSQLSupport.Connect(host, user, password); }
catch(System.Exception) {Response.Write("Error, no server"); }
try {PHP.MSSQLSupport.ChangeDatabase(bbdd);}
catch (System.Exception) { Response.Write( bbdd + " not found"); }
Inserted it into my page and the error above persists.
i am passing a null to PHP.MSSQLSupport.Query, that should reopen the last connection, so i guessI'm just not opening the connection as i should...
How should iestablish the connection with the PHPMigration assistant generatedcode? should i remove the info on the web. config or the above lines?
should i mention my connection string name ( buscomConnectionString )anywhere in the code? or should the above code be enough?
if the databese isn´t connecting properly, would i get a different error? (maybe Error, no server as i specified??)
Establish connection to the server
I have a problem editing my SQL databases in Visual Studio 2005, i have searched the web for answers, but those were not clear enough to me, somthing about changing my settings for SQL server, but i didn't follow it all to well, the current error mesage I get when i click in the Server Explorer on my data connections is:
An error has occured 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 do have followed some tips, bit end to this error mesage every time. Bevore i followed that tips the error said:
(provider: TCP/IP, error ... i dont remember anymore...)I have tried to delete SQL and Visual Studio but it didn't help, and reinstall it.
Please can somebody help me, i am realy fFrustrated about the fact i cant fix it!By default SQL Server Express does not have remote connections enabled. You can do this using the following instructions: http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx|||Yes, i have seen these instructions before, and i apply them again. But again without any succes. the error i now get is:
Connecting to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251 I downloaded the file, open it. It recognizes the Named Instance as SQLExpress but then it said:
Name: Microsoft SQL Server 2005 Express Edition (SQLEXPRESS)
Allowed Action: Maintain (Action is only available from Add or Remove Programs)
Reason: Cannot maintain product, to maintain the product go to Add or Remove ProgramsAnd the things i have in my Add or Remove Programs are:
Microsoft SQL Server 2005
Microsoft SQL Server 2005 Mobile
Microsoft SQL Server Native Client
Microsoft SQL Server Settup supporting files
Microsoft SQL Server VSS writer
What must i do?
|||I encountered the same error message while trying to create a data connection from Visual Studio 2005 using the Server Explorer.
An error has occured 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)
|||
Hi
Have to tried
sp_configure 'remote admin connections',1
go
Reconfigure
go
Establish connection to the server
I have a problem editing my SQL databases in Visual Studio 2005, i have searched the web for answers, but those were not clear enough to me, somthing about changing my settings for SQL server, but i didn't follow it all to well, the current error mesage I get when i click in the Server Explorer on my data connections is:
An error has occured 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 do have followed some tips, bit end to this error mesage every time. Bevore i followed that tips the error said:
(provider: TCP/IP, error ... i dont remember anymore...)I have tried to delete SQL and Visual Studio but it didn't help, and reinstall it.
Please can somebody help me, i am realy fFrustrated about the fact i cant fix it!By default SQL Server Express does not have remote connections enabled. You can do this using the following instructions: http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx|||Yes, i have seen these instructions before, and i apply them again. But again without any succes. the error i now get is:
Connecting to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251 I downloaded the file, open it. It recognizes the Named Instance as SQLExpress but then it said:
Name: Microsoft SQL Server 2005 Express Edition (SQLEXPRESS)
Allowed Action: Maintain (Action is only available from Add or Remove Programs)
Reason: Cannot maintain product, to maintain the product go to Add or Remove ProgramsAnd the things i have in my Add or Remove Programs are:
Microsoft SQL Server 2005
Microsoft SQL Server 2005 Mobile
Microsoft SQL Server Native Client
Microsoft SQL Server Settup supporting files
Microsoft SQL Server VSS writer
What must i do?
|||I encountered the same error message while trying to create a data connection from Visual Studio 2005 using the Server Explorer.
An error has occured 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)
|||
Hi
Have to tried
sp_configure 'remote admin connections',1
go
Reconfigure
go
Thursday, March 22, 2012
ERwin
I have just installed ERwin data modeler and can't seem to get past
the 'connection manager'. In 'Master dafatase' I have put: master but
it is saying invalid object master..m7License. I have enteretd the
license keys during installation. Do I have to make any changes in the
database too?
Thanks
It looks like the problem was either with your installation, your
configuration, or your rights. (I have not installed any of the more recent
versions of ERwin, so just things to look for.)
Installation: The installation apparently should have created the table
m7License in the master database, but perhaps that step failed.
Configuration: The table m7License was successfully created in another
database, but the ERwin application configuration does not know where the
table is.
Rights: Everything is where it should be, but you personally do not have
rights to the m7License table in master.
FWIW,
RLF
<othellomy@.yahoo.com> wrote in message
news:1175056298.365698.98030@.d57g2000hsg.googlegro ups.com...
> Hi,
> I have just installed ERwin data modeler and can't seem to get past
> the 'connection manager'. In 'Master dafatase' I have put: master but
> it is saying invalid object master..m7License. I have enteretd the
> license keys during installation. Do I have to make any changes in the
> database too?
> Thanks
>
ERwin
I have just installed ERwin data modeler and can't seem to get past
the 'connection manager'. In 'Master dafatase' I have put: master but
it is saying invalid object master..m7License. I have enteretd the
license keys during installation. Do I have to make any changes in the
database too?
ThanksIt looks like the problem was either with your installation, your
configuration, or your rights. (I have not installed any of the more recent
versions of ERwin, so just things to look for.)
Installation: The installation apparently should have created the table
m7License in the master database, but perhaps that step failed.
Configuration: The table m7License was successfully created in another
database, but the ERwin application configuration does not know where the
table is.
Rights: Everything is where it should be, but you personally do not have
rights to the m7License table in master.
FWIW,
RLF
<othellomy@.yahoo.com> wrote in message
news:1175056298.365698.98030@.d57g2000hsg.googlegroups.com...
> Hi,
> I have just installed ERwin data modeler and can't seem to get past
> the 'connection manager'. In 'Master dafatase' I have put: master but
> it is saying invalid object master..m7License. I have enteretd the
> license keys during installation. Do I have to make any changes in the
> database too?
> Thanks
>
ERwin
I have just installed ERwin data modeler and can't seem to get past
the 'connection manager'. In 'Master dafatase' I have put: master but
it is saying invalid object master..m7License. I have enteretd the
license keys during installation. Do I have to make any changes in the
database too?
ThanksIt looks like the problem was either with your installation, your
configuration, or your rights. (I have not installed any of the more recent
versions of ERwin, so just things to look for.)
Installation: The installation apparently should have created the table
m7License in the master database, but perhaps that step failed.
Configuration: The table m7License was successfully created in another
database, but the ERwin application configuration does not know where the
table is.
Rights: Everything is where it should be, but you personally do not have
rights to the m7License table in master.
FWIW,
RLF
<othellomy@.yahoo.com> wrote in message
news:1175056298.365698.98030@.d57g2000hsg.googlegroups.com...
> Hi,
> I have just installed ERwin data modeler and can't seem to get past
> the 'connection manager'. In 'Master dafatase' I have put: master but
> it is saying invalid object master..m7License. I have enteretd the
> license keys during installation. Do I have to make any changes in the
> database too?
> Thanks
>
Wednesday, March 21, 2012
Errors when trying to run SQL
"SQL Server Registration failed because of the connection failure displayed below.
SQL Server does not exist or access denied.
ConnectionOpen (Connect())"
"An Error 1069 occured while performing this service operation on the
MSSQLServer Service"
I even went as far as uninstalling and reinstalling, but to no avail. Does anyone have an idea what's causing this? It was working fine and then all the sudden one day I start getting these messages and it won't work.
Thanks!
SmittyYou using sql server security ot trusted connection?
Do you have a dba, or are you it?
Does anyone else have sa priviliges to the box?|||Thanks for replying Brett...
It's my own personal computer at home so I'm the SA and no one else uses it nor has the ability to. It is the 120-day evaluation edition that I got with the text book that I use for school. I don't understand, it worked fine then it didn't... :confused:
Smitty|||You past the 120 days?
I think it messes with the registry...
You can by a full blown version for $49.00
It just can't be used for production systems...
http://www.microsoft.com/sql/howtobuy/development.asp|||I suppose that's most like the case :( Guess I'll need to buy it sooner or later heh..
Thanks Brett,
Smitty|||If its for study purpose then you can uninstall the SQL and remove all registry keys referred to SQL Server, reboot and reinstall Evaluation edition.|||Thank you Satya,
My instructor told me to do the same. :D
Friday, March 9, 2012
errors but finished with success
My ssis package errors out because one of the database connection failed. I successfully logged error but also indicated that package finished successfully. My confusion is if a sheduling software schedules this package, what would be return code sent by dtexe... . would it be success or failure? In this scnerio i want it to return failure so that appropriate team can be contacted.
thanks,
kushpaw
Hi Kushpaw,There is a property on the tasks in the control flow entitled FailPackageOnFailure. If you set this to true on the tasks that fail then the entire package will fail. The returned value should reflect this.
Hope this helps,
Grant
Friday, February 24, 2012
error:25 - connection string is not valid
I have installed SQL Server 2005 Developer edition. When I open SQL Server Management Studio, and try to connect to the database engine, I enter these credentials:
Server name: LT2000\MSSQLSERVER
Login: sa
Password: my password
When I try to connect I receive the following error:
An error has occured while trying to establish 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: sql network interfaces, error:25 - connection string is not valid)(Microsoft SQL Server, Error:87)
What can I do?
Peter Smith:
I have installed SQL Server 2005 Developer edition. When I open SQL Server Management Studio, and try to connect to the database engine, I enter these credentials:
What can I do?
I don't understand what you mean by connecting to the database engine because I have not had the need for that in 8years plus using SQL Server, but your error means you are trying to connect with only named pipes you need to use both named pipes and TCP/IP. Then enable remote connection that is covered by Microsoft below. Hope this helps.
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
|||The surface area configuration tool used to configure SQL Serve 2005 check the doc below remote connection.
http://msdn2.microsoft.com/en-us/library/ms178763.aspx
|||Actually the error has nothing to do with pipes. If you look in the error message you find the message "error:25 - connection string is not valid", that is the error. If you are sure those are that is your valid credential you should use a connection string just like this one: "Data Source=LT2000\MSSQLSERVER;Initial Catalog=Northwind;User ID=sa;Password=mypassword"; Initial catalog is of course the name of your database. If that doesn't work, then use a data source wizard and enter your credentials, then test the connection and see if it works. If it doesn't you probably have wrong credentials. You can try also using the Windows Authentication('cause you set your sql server to user mixed authentication mode), in that way your connection string will be: "Data Source=LT2000\MSSQLSERVER;Initial Catalog=Northwind;Integrated Security=true".
Tell us if that works for you.
|||
Hi,
When I use MS SQL Management Studio and I want to connect, I get to see a dropdown...in this dropdown I can select "database engine".
I then fill in the type of authentication (sql server in this case), and I can log on.
I dont have the problem anymore, but that might be that out of frustration I just reinstalled SQL Server...it works fine now :)
ERROR: Using Flat File Connection Manager Editor with delimited format
Hello everyone:
I am new with SSIS and I have a problem that I don’t know solving it.
I have a simple package with a delimited flat file source which is loaded into a table in a SQL Server database.
Below is the import format:
- Row delimiter: carriage return and line feed {CR/LF}
- Column delimiter: Comma {,}
- Text qualifier: “
In the source file, the data looks like this:
“string1”, 34, “”, , ,” string2 “text1” string2” , ““,
This package with DTS works, but now with SSIS does not, when I see the “previous rows” in the Flat File Connection Manager Editor, the last column has incorrect information and when I create a new file without spaces and without twice “” in the same string, it works. I don’t know what I am missing with SSIS.
Regards,
Fanny Tejera
Well, technically double quotes inside a field should be escaped with another double quote.
"string1 ", 34, "", , , "string2 ""text1"" continued string2", " ",|||
Yes, but I do not have the control of the information that contains these source files. Can I fix this problem with the Flat File Connection Manager Editor? Am I missing something with SSIS?
|||See below post where Donald Farmer answered a similar question
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=546729&SiteID=1
| SSIS does not support embedded text qualifiers in this version. However, you can look at these sample components that I mentioned elsewhere recently ... http://www.microsoft.com/downloads/details.aspx?familyid=b51463e9-2907-4b82-a353-e15016486e1d http://www.microsoft.com/downloads/details.aspx?FamilyID=9c624eab-6893-4734-b5dd-f80d0d487aa1 http://www.microsoft.com/downloads/details.aspx?familyid=91e24d1d-acf0-45b1-a9a5-9ea1c7bd0463 Donald
Donald Farmer, Microsoft -- www.pamboli.com -- www.beyeblogs.com/donaldfarmer
- Ranjeeta |
Thank you so much!
Fanny Tejera
|||Hi Fanny,
Even i too have the same problem with delimiter.
I tried it by using the same links.
but i am getting the error right at the source file during validation. can you please explain me how to use the Undouble component.
Thanks in advance,
Anand kumar
|||Hi
even i too have the same problem. I tried it with the same links you have provided. But i am getting the same error at flat source file.
i have downloaded, installed and build the components.
when i am using the undouble or undouble component it could not remove the ", i am getting the error at flat file source during validation itself. can you please reply me as soon as possible.
can you please tell me how and where to use the undouble component.
Thanks in advance,
Anand
|||I installed the undouble but getting the error that i can't use it with DT_NTEXT?
How to solve this or is there a other solution. I must place it in DT_NTEXT because the field is longer then 8000.
In access i can import it in a memo field without any problems.