Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Wylbur
Starting Member
29 Posts |
Posted - 2010-03-15 : 23:40:46
|
| Hi all;I am trying to load the "pubs" sample database to MS SQL 2005 using the osql utility,and I am having some problems.I tried the command with an active server instance specifiedwithin the command, osql -E -S SAM-V01\\SQL2005D-01 -Q "EXEC sp_attach_db N'pubs' N'c:\SQL Server 2000 Sample Databases\pubs.mdf'"I got the following error:-------------------------------------------------------------------[SQL Native Client]Client unable to establish connection due to preloginfailure-------------------------------------------------------------------I tried the command without an active server instance being specifiedwithin the command, osql -E -Q "EXEC sp_attach_db N'pubs' N'c:\SQL Server 2000 Sample Databases\pubs.mdf'"I got the following error:-------------------------------------------------------------------[SQL Native Client]Named Pipes Provider: Could not open a connection to SQLServer [2].[SQL Native Client]Login timeout expired[SQL Native Client]An error has occurred while establishing a connectionto the server. When connecting to SQL Server 2005, this failure may becaused by the fact that under the default settings SQL Server does notallow remote connections.-------------------------------------------------------------------In Server properties > Connections,"Allow remote connections to this server" is checkedCan anyone tell me what I am missing here?Thanks!!!Wylbur======================== |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-03-16 : 03:08:40
|
| Could this be the problem...? ->SAM-V01\\SQL2005D-01replace withSAM-V01\SQL2005D-01Are you sure that "SQL2005D-01" is the correct instance name?- LumbagoIf the facts don't fit the theory, change the facts. Albert Einstein |
 |
|
|
Wylbur
Starting Member
29 Posts |
Posted - 2010-03-16 : 13:15:56
|
Hi Lumbago;quote: Originally posted by Lumbago Could this be the problem...? ->SAM-V01\\SQL2005D-01replace withSAM-V01\SQL2005D-01
AH!I should have mentioned that I am running this from a batch file,and two slashes are needed to get one.My bad.quote: Are you sure that "SQL2005D-01" is the correct instance name?
Yes.Thanks for the attention!Wylbur======================== |
 |
|
|
|
|
|