Tuesday, March 27, 2012
connecting to SQL Server 2000
I have a SQL server ent. edition installed on windows 2003, I want to
register another SQL server instance installed on windows xp, in my
enterprise manager. When I try to do that i get the following error message.
"SQL server does not exists or access denied."
note that no domain controller is installed on the network.
What is reason, and how can i resolve it?
all ideas would be highly appreciated...
AnsariYou have to verify that :
1. you have nioo network problems , you can test sharing a folder on the XP
machine and access this share from Win2003
2. Verifiy that you have no accounts problems and permissions
3.verify thant services are really started on the xp machine
4. try to register xp server from Win2003 using the IP adresss first second
try with the netbios name .
5. activate the mixed security on the xp machine and try to register with SA
login .
I think that with these 5 tests you should fix the poblem
hch
"Ansari" a écrit :
> hi all;
> I have a SQL server ent. edition installed on windows 2003, I want to
> register another SQL server instance installed on windows xp, in my
> enterprise manager. When I try to do that i get the following error messag
e.
> "SQL server does not exists or access denied."
> note that no domain controller is installed on the network.
> What is reason, and how can i resolve it?
> all ideas would be highly appreciated...
> Ansari
>
>
connecting to SQL Server 2000
I have a SQL server ent. edition installed on windows 2003, I want to
register another SQL server instance installed on windows xp, in my
enterprise manager. When I try to do that i get the following error message.
"SQL server does not exists or access denied."
note that no domain controller is installed on the network.
What is reason, and how can i resolve it?
all ideas would be highly appreciated...
Ansari
You have to verify that :
1. you have nioo network problems , you can test sharing a folder on the XP
machine and access this share from Win2003
2. Verifiy that you have no accounts problems and permissions
3.verify thant services are really started on the xp machine
4. try to register xp server from Win2003 using the IP adresss first second
try with the netbios name .
5. activate the mixed security on the xp machine and try to register with SA
login .
I think that with these 5 tests you should fix the poblem
hch
"Ansari" a écrit :
> hi all;
> I have a SQL server ent. edition installed on windows 2003, I want to
> register another SQL server instance installed on windows xp, in my
> enterprise manager. When I try to do that i get the following error message.
> "SQL server does not exists or access denied."
> note that no domain controller is installed on the network.
> What is reason, and how can i resolve it?
> all ideas would be highly appreciated...
> Ansari
>
>
sqlsql
Tuesday, March 20, 2012
Connecting to Remote Database using EM
Hi to all:
I always had a problem connecting to SQL Server from home using EM.
I do add a new server registration, but i always get the following exception:
A Connection could not be established to IP ADDRESSReason: SQL Server does not exist or access denied.ConnectionOpen(Connect())At the same time, I do use a utility, found athttp://sql.bhaidar.net to connect to the same database and works perfect.
Is there any configuration I should do to my pc, don't know maybe some port configuration or so, to allow EM to connect to those remote databases?
Thanks in advance.
Regards
Can you 'ping' the IP address successful? If yes, can you 'telnet' the IP with the port used by SQL server service?(use Network Utility to configure it) How about force to connect with TCP/IP? That means when you register the server in EM, using 'tcp:xxx.xx.xx.xx,yyyy' as server identifier (where x stands for IP address, and y for port number)|||Well, I am unable to ping it, although it is a working server. Is it something related to Win XP FireWall? Should I allow a port or so?
Thanks
|||Maybe. As I know the Internet Connection Firewall (ICF) on WinXp does not allow resposing to ICMP packages (used by ping) from unknown IP. You can configrue this in ICF: go to 'Advance' pannel->'Local Area Connection'->Find ICMP pannel->enable 'Allow Response...'(something like this, I don't remember exactly options on WinXP, please be patient to find it out).
If after 'ping' enabled and you can 'ping' successful, then you can try to create a alias for the SQL Server and connect via the alias on the client machine.. You'd better enable both TCP/IP and Named Pipe network protocols on the SQL machine. Go to 'Start'->'All Programs'->'Microsoft SQL Server', you can find 'Client Network Utility' and 'Server Network Utility, where you can configure your SQL connection options. The 'Alias' pannel can be found in 'Client Network Utility'.
Hope this helps:)
sqlsqlSunday, March 11, 2012
Connecting to another SQL SErver
I am trying to connect to another instance using Transact SQL, but I didn't
get it yet.
Could we help me with it?
I tryed to use, CONNECT TO, but I always receive the same error message.
CONNECT TO server.db USER usr.password
"Incorrect syntax near the keyword 'to'."
Thanks
Juliano Horta
Message posted via http://www.droptable.com
You cannot switch instance for your connection. The instance the connection logged on to is the one
it has to live with. The client app can do this, but not at the TSQL level. Perhaps you should look
into the Linked Servers concept?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Juliano H via droptable.com" <u13014@.uwe> wrote in message news:5a9702b47ea38@.uwe...
> Hello, All!
> I am trying to connect to another instance using Transact SQL, but I didn't
> get it yet.
> Could we help me with it?
> I tryed to use, CONNECT TO, but I always receive the same error message.
> CONNECT TO server.db USER usr.password
> "Incorrect syntax near the keyword 'to'."
> Thanks
> Juliano Horta
> --
> Message posted via http://www.droptable.com
|||Thanks very much!
I will take a look into the Linked Server.
Bye
Tibor Karaszi wrote:[vbcol=seagreen]
>You cannot switch instance for your connection. The instance the connection logged on to is the one
>it has to live with. The client app can do this, but not at the TSQL level. Perhaps you should look
>into the Linked Servers concept?
>[quoted text clipped - 9 lines]
Message posted via http://www.droptable.com
|||Hi Juliano,
Create link server that try using query.
Jitesh k
"Juliano H via droptable.com" wrote:
> Hello, All!
> I am trying to connect to another instance using Transact SQL, but I didn't
> get it yet.
> Could we help me with it?
> I tryed to use, CONNECT TO, but I always receive the same error message.
> CONNECT TO server.db USER usr.password
> "Incorrect syntax near the keyword 'to'."
> Thanks
> Juliano Horta
> --
> Message posted via http://www.droptable.com
>
|||If you are trying to do a simple select (assuming you have permissions) you
need to either use OPENROWSET or set up a linked server and use:
Select col1, col2
From [Server\instance2].[Mydb].[dbo].MyTable
Kevin Hill
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.expertsrt.com - not your average tech Q&A site
"Juliano H via droptable.com" <u13014@.uwe> wrote in message
news:5a9702b47ea38@.uwe...
> Hello, All!
> I am trying to connect to another instance using Transact SQL, but I
> didn't
> get it yet.
> Could we help me with it?
> I tryed to use, CONNECT TO, but I always receive the same error message.
> CONNECT TO server.db USER usr.password
> "Incorrect syntax near the keyword 'to'."
> Thanks
> Juliano Horta
> --
> Message posted via http://www.droptable.com
|||Thanks very much!
It executed properly.
Very nice
Bye
Kevin3NF wrote:[vbcol=seagreen]
>If you are trying to do a simple select (assuming you have permissions) you
>need to either use OPENROWSET or set up a linked server and use:
>Select col1, col2
>From [Server\instance2].[Mydb].[dbo].MyTable
>[quoted text clipped - 10 lines]
Message posted via http://www.droptable.com
Thursday, March 8, 2012
Connecting to another SQL SErver
I am trying to connect to another instance using Transact SQL, but I didn't
get it yet.
Could we help me with it?
I tryed to use, CONNECT TO, but I always receive the same error message.
CONNECT TO server.db USER usr.password
"Incorrect syntax near the keyword 'to'."
Thanks
Juliano Horta
Message posted via http://www.droptable.comYou cannot switch instance for your connection. The instance the connection
logged on to is the one
it has to live with. The client app can do this, but not at the TSQL level.
Perhaps you should look
into the Linked Servers concept?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Juliano H via droptable.com" <u13014@.uwe> wrote in message news:5a9702b47ea38@.uwe...[vbcol
=seagreen]
> Hello, All!
> I am trying to connect to another instance using Transact SQL, but I didn'
t
> get it yet.
> Could we help me with it?
> I tryed to use, CONNECT TO, but I always receive the same error message.
> CONNECT TO server.db USER usr.password
> "Incorrect syntax near the keyword 'to'."
> Thanks
> Juliano Horta
> --
> Message posted via http://www.droptable.com[/vbcol]|||Thanks very much!
I will take a look into the Linked Server.
Bye
Tibor Karaszi wrote:[vbcol=seagreen]
>You cannot switch instance for your connection. The instance the connection
logged on to is the one
>it has to live with. The client app can do this, but not at the TSQL level.
Perhaps you should look
>into the Linked Servers concept?
>
>[quoted text clipped - 9 lines]
Message posted via http://www.droptable.com|||Hi Juliano,
Create link server that try using query.
Jitesh k
"Juliano H via droptable.com" wrote:
> Hello, All!
> I am trying to connect to another instance using Transact SQL, but I didn'
t
> get it yet.
> Could we help me with it?
> I tryed to use, CONNECT TO, but I always receive the same error message.
> CONNECT TO server.db USER usr.password
> "Incorrect syntax near the keyword 'to'."
> Thanks
> Juliano Horta
> --
> Message posted via http://www.droptable.com
>|||If you are trying to do a simple select (assuming you have permissions) you
need to either use OPENROWSET or set up a linked server and use:
Select col1, col2
From [Server\instance2].[Mydb].[dbo].MyTable
Kevin Hill
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.expertsrt.com - not your average tech Q&A site
"Juliano H via droptable.com" <u13014@.uwe> wrote in message
news:5a9702b47ea38@.uwe...
> Hello, All!
> I am trying to connect to another instance using Transact SQL, but I
> didn't
> get it yet.
> Could we help me with it?
> I tryed to use, CONNECT TO, but I always receive the same error message.
> CONNECT TO server.db USER usr.password
> "Incorrect syntax near the keyword 'to'."
> Thanks
> Juliano Horta
> --
> Message posted via http://www.droptable.com|||Thanks very much!
It executed properly.
Very nice
Bye
Kevin3NF wrote:[vbcol=seagreen]
>If you are trying to do a simple select (assuming you have permissions) you
>need to either use OPENROWSET or set up a linked server and use:
>Select col1, col2
>From [Server\instance2].[Mydb].[dbo].MyTable
>
>[quoted text clipped - 10 lines]
Message posted via http://www.droptable.com
Sunday, February 19, 2012
Connecting Dynamic Port from Client
I tried to connect to MSDE_SP3a using dynamic port from client machine
1.I set 0 to the port in server machine, using ServerNetworkUtility
2.I restart MSDE, and I see that port is configured new value(like 1500)
3.Now I boot isql utility from Client machine(installed SQL-DMO), and I send
'isql -S Server -U *** -P ***'
4.But that's failed!!!
I cheked:
1.I have already checked that TCP/IP is enabled in ClientNetworkUtility
2.And port number is DIFFERENT from the one coufigured in server
machine(like 1433)
3.I understand that UDP1434 negotiate with server machine about MSDE
listening port
4.So, I think that client machine may resolve port in dynamic
5.I cheked that WindowsFirewall is off
6.I cheked that UDP negotiation by Portqry.exe, and Portqry.exe returned
correct infomation
7.And I set the same port number as server machine to client machine, and
that was successful...
How can I make 'Dynamic port negotiation' successful?
and sorry for my poor English...
hi,
"Atchy" <bakedmind@.hotmail.com> ha scritto nel messaggio
news:%23snAFxKpEHA.3488@.TK2MSFTNGP12.phx.gbl
> Hi all
> I tried to connect to MSDE_SP3a using dynamic port from client machine
> 1.I set 0 to the port in server machine, using ServerNetworkUtility
> 2.I restart MSDE, and I see that port is configured new value(like
> 1500)
> 3.Now I boot isql utility from Client machine(installed SQL-DMO), and
> I send 'isql -S Server -U *** -P ***'
> 4.But that's failed!!!
> I cheked:
> 1.I have already checked that TCP/IP is enabled in
> ClientNetworkUtility
> 2.And port number is DIFFERENT from the one coufigured in server
> machine(like 1433)
> 3.I understand that UDP1434 negotiate with server machine about MSDE
> listening port
> 4.So, I think that client machine may resolve port in dynamic
> 5.I cheked that WindowsFirewall is off
> 6.I cheked that UDP negotiation by Portqry.exe, and Portqry.exe
> returned correct infomation
> 7.And I set the same port number as server machine to client machine,
> and that was successful...
> How can I make 'Dynamic port negotiation' successful?
> and sorry for my poor English...
dynamic port redirection is a feature that requires MDAC stack 2.6 at least
at the client level as well.. on the server this is not a problem as the
service pack 3a installs MDAC 2.7.1, but please check the client...
the service listening on UDP 1434 on the server (not on the clients) will
provide automatic redirection to the required port for each installed
instance, actually a small delay for named instance is due for that
overhead...
I'm not sure of the causes of your problem, but please, running regedit,
verify that the
HKLM\SOFTWARE\Microsoft\Microsoft SQL
Server\InstanceName\MSSQLServer\SuperSocketNetLib\ Tcp
TcpPort
and TcpDynamicPorts
have the same value...
if TcpDynamicPorts is blank then the port is static and not dynamic...
have you tried setting a fixed static port and creating an Alias (client
side) with Client Network Utilty (cliconfg.exe) pointing to that (fixed
port) MSDE instance?
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||> dynamic port redirection is a feature that requires MDAC stack 2.6 at
> least
> at the client level as well.. on the server this is not a problem as the
> service pack 3a installs MDAC 2.7.1, but please check the client...
> the service listening on UDP 1434 on the server (not on the clients) will
> provide automatic redirection to the required port for each installed
> instance, actually a small delay for named instance is due for that
> overhead...
> I'm not sure of the causes of your problem, but please, running regedit,
> verify that the
> HKLM\SOFTWARE\Microsoft\Microsoft SQL
> Server\InstanceName\MSSQLServer\SuperSocketNetLib\ Tcp
> TcpPort
> and TcpDynamicPorts
> have the same value...
> if TcpDynamicPorts is blank then the port is static and not dynamic...
> have you tried setting a fixed static port and creating an Alias (client
> side) with Client Network Utilty (cliconfg.exe) pointing to that (fixed
> port) MSDE instance?
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
I thank your response
I found the MS article:
823938 :How to use static and dynamic port allocation in SQL Server 2000
http://support.microsoft.com/default.aspx?kbid=823938
Dynamic port allocation
Only named instances of SQL Server can use the dynamic port allocation
process
That's mean normal instance(NOT named instance) of MSDE can not use dynamic
ports allocation?
I tried and failed in normal instance network
And I tried named instance network and that's successed...
The conclusion:
Normal instance of MSDE is not supported dymamic port allocation
That's really!?
|||hi,
"Atchy" <bakedmind@.hotmail.com> ha scritto nel messaggio
news:uMd$YBjpEHA.2636@.TK2MSFTNGP09.phx.gbl
> I found the MS article:
> 823938 :How to use static and dynamic port allocation in SQL Server
> 2000 http://support.microsoft.com/default.aspx?kbid=823938
> ----
--
> Dynamic port allocation
> Only named instances of SQL Server can use the dynamic port allocation
> process
> ----
--
> That's mean normal instance(NOT named instance) of MSDE can not use
> dynamic ports allocation?
> I tried and failed in normal instance network
> And I tried named instance network and that's successed...
> The conclusion:
> Normal instance of MSDE is not supported dymamic port allocation
> That's really!?
why should it be else?
dynamic redirection has been established as more instances (up to 16) can be
installed on the same server and, if the DEFAULT instance is listening on
TCP 1433, there should be a way to set connections without requiring an
Alias to be defined on the client side (each client) and defining a static
alternate port server side...
this is no more a viable solution on Windows XP sp2 as the Windows Firewall
requires a better security policy, so static redirection is again the way to
go, opening the desired port and defining Alias on the client side
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Friday, February 17, 2012
Connecting
I have installed MSDE, using Windows Authentication. I can connect to it from a Query GUI tool I downloaded, which has an automatic option of NT Authentication. It does not ask me for a user, and has the password (too long to be my password) already writt
en in. I cannot connect using anything else, including Andrea Montanori's DbaMgr2k. I get a msg:
Login failed for user 'sa' Reason: not associated with a trusted SQL Server Connection.
I am running this on Win XP.
I know I can add users for specific databases, but I think I should be able to log in with 'sa' and the password. Am i getting my own password wrong?
Thanks.
andrew.
Hi Andrew,
This is because you have not enabled mixed mode authenticaton. As an
installation option, enter SECURITYMODE=SQL to enable this.
HTH,
Greg Low (MVP)
MSDE Manager SQL Tools
www.whitebearconsulting.com
"andrewnichols" <anonymous@.discussions.microsoft.com> wrote in message
news:E7B59B91-D84D-4E52-8192-96473E52C339@.microsoft.com...
> Hello All:
> I have installed MSDE, using Windows Authentication. I can connect to it
from a Query GUI tool I downloaded, which has an automatic option of NT
Authentication. It does not ask me for a user, and has the password (too
long to be my password) already written in. I cannot connect using anything
else, including Andrea Montanori's DbaMgr2k. I get a msg:
> Login failed for user 'sa' Reason: not associated with a trusted SQL
Server Connection.
> I am running this on Win XP.
> I know I can add users for specific databases, but I think I should be
able to log in with 'sa' and the password. Am i getting my own password
wrong?
> Thanks.
> andrew.
|||If you don't want to re-install MSDE, you can change the registry key to
enable mixed auth and reset the sa password.
1. use regedit to change HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SQL Server\MSSQL.1\MSSQLServer\LoginMode to 2 (mixed authentication) and 2.
execute following query: EXEC sp_password NULL, 'yourpassword', 'sa'
Amy
| From: "Greg Low \(MVP\)" <greglow@.lowell.com.au>
| References: <E7B59B91-D84D-4E52-8192-96473E52C339@.microsoft.com>
| Subject: Re: Connecting
| Date: Thu, 8 Apr 2004 00:16:44 +1000
| Lines: 36
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <ew4j2rKHEHA.688@.tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.msde
| NNTP-Posting-Host: 66.17.222.193
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.msde:13478
| X-Tomcat-NG: microsoft.public.sqlserver.msde
|
| Hi Andrew,
|
| This is because you have not enabled mixed mode authenticaton. As an
| installation option, enter SECURITYMODE=SQL to enable this.
|
| HTH,
|
| --
| Greg Low (MVP)
| MSDE Manager SQL Tools
| www.whitebearconsulting.com
|
| "andrewnichols" <anonymous@.discussions.microsoft.com> wrote in message
| news:E7B59B91-D84D-4E52-8192-96473E52C339@.microsoft.com...
| > Hello All:
| >
| > I have installed MSDE, using Windows Authentication. I can connect to it
| from a Query GUI tool I downloaded, which has an automatic option of NT
| Authentication. It does not ask me for a user, and has the password (too
| long to be my password) already written in. I cannot connect using
anything
| else, including Andrea Montanori's DbaMgr2k. I get a msg:
| >
| > Login failed for user 'sa' Reason: not associated with a trusted SQL
| Server Connection.
| >
| > I am running this on Win XP.
| >
| > I know I can add users for specific databases, but I think I should be
| able to log in with 'sa' and the password. Am i getting my own password
| wrong?
| >
| > Thanks.
| >
| > andrew.
|
|
|
Friday, February 10, 2012
Connect to SQL server 2005 using SQLDMO
i need to know if sql dmo can connect to SQL server 2005
if can! how can i do this ?
i have this code
Dim xServer a SQLDMO.Server
.....bla..bla...
xServer.LoginSecure = True
xServer.Connect("SQLServer2005")
but it cant connect.
is there anyother way ?
thks
JSB
Hi,
What are you trying to do with sqldmo?
Ken
"Joo Santa Brbara" <joaosb@.i24portugal.com> wrote in message
news:OA1xjFcZFHA.3400@.tk2msftngp13.phx.gbl...
Hi all
i need to know if sql dmo can connect to SQL server 2005
if can! how can i do this ?
i have this code
Dim xServer a SQLDMO.Server
.....bla..bla...
xServer.LoginSecure = True
xServer.Connect("SQLServer2005")
but it cant connect.
is there anyother way ?
thks
JSB
|||i just want the get databases listname
thks
"Ken Tucker [MVP]" <vb2ae@.bellsouth.net> wrote in message
news:%23cgSblcZFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Hi,
> What are you trying to do with sqldmo?
> Ken
> --
> "Joo Santa Brbara" <joaosb@.i24portugal.com> wrote in message
> news:OA1xjFcZFHA.3400@.tk2msftngp13.phx.gbl...
> Hi all
> i need to know if sql dmo can connect to SQL server 2005
> if can! how can i do this ?
> i have this code
> Dim xServer a SQLDMO.Server
> ....bla..bla...
> xServer.LoginSecure = True
> xServer.Connect("SQLServer2005")
> but it cant connect.
> is there anyother way ?
> thks
> JSB
>
>
|||Hi,
Use the sp_databases stored procedure to list database names.
Dim strConn As String
Dim conn As SqlConnection
Dim cmd As SqlCommand
Dim dr As SqlDataReader
strConn = "Server =(local);"
strConn &= "Database = ; Integrated Security = SSPI;"
conn = New SqlConnection(strConn)
cmd = New SqlCommand("sp_Databases", conn)
cmd.CommandType = CommandType.StoredProcedure
conn.Open()
dr = cmd.ExecuteReader
If dr.HasRows Then
Do While dr.Read
Trace.WriteLine(String.Format("Name {0} Size {1}", _
dr.Item("Database_Name"), dr.Item("Database_Size")))
Loop
End If
dr.Close()
conn.Close()
Ken
"Joo Santa Brbara" <joaosb@.i24portugal.com> wrote in message
news:OWYlApcZFHA.3164@.TK2MSFTNGP09.phx.gbl...
i just want the get databases listname
thks
"Ken Tucker [MVP]" <vb2ae@.bellsouth.net> wrote in message
news:%23cgSblcZFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Hi,
> What are you trying to do with sqldmo?
> Ken
> --
> "Joo Santa Brbara" <joaosb@.i24portugal.com> wrote in message
> news:OA1xjFcZFHA.3400@.tk2msftngp13.phx.gbl...
> Hi all
> i need to know if sql dmo can connect to SQL server 2005
> if can! how can i do this ?
> i have this code
> Dim xServer a SQLDMO.Server
> ....bla..bla...
> xServer.LoginSecure = True
> xServer.Connect("SQLServer2005")
> but it cant connect.
> is there anyother way ?
> thks
> JSB
>
>
Connect to SQL server 2005 using SQLDMO
i need to know if sql dmo can connect to SQL server 2005
if can! how can i do this '
i have this code
Dim xServer a SQLDMO.Server
....bla..bla...
xServer.LoginSecure = True
xServer.Connect("SQLServer2005")
but it cant connect.
is there anyother way '
thks
JSBHi,
What are you trying to do with sqldmo?
Ken
--
"Joo Santa Brbara" <joaosb@.i24portugal.com> wrote in message
news:OA1xjFcZFHA.3400@.tk2msftngp13.phx.gbl...
Hi all
i need to know if sql dmo can connect to SQL server 2005
if can! how can i do this '
i have this code
Dim xServer a SQLDMO.Server
....bla..bla...
xServer.LoginSecure = True
xServer.Connect("SQLServer2005")
but it cant connect.
is there anyother way '
thks
JSB|||i just want the get databases listname
thks
"Ken Tucker [MVP]" <vb2ae@.bellsouth.net> wrote in message
news:%23cgSblcZFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Hi,
> What are you trying to do with sqldmo?
> Ken
> --
> "Joo Santa Brbara" <joaosb@.i24portugal.com> wrote in message
> news:OA1xjFcZFHA.3400@.tk2msftngp13.phx.gbl...
> Hi all
> i need to know if sql dmo can connect to SQL server 2005
> if can! how can i do this '
> i have this code
> Dim xServer a SQLDMO.Server
> ....bla..bla...
> xServer.LoginSecure = True
> xServer.Connect("SQLServer2005")
> but it cant connect.
> is there anyother way '
> thks
> JSB
>
>|||Hi,
Use the sp_databases stored procedure to list database names.
Dim strConn As String
Dim conn As SqlConnection
Dim cmd As SqlCommand
Dim dr As SqlDataReader
strConn = "Server =(local);"
strConn &= "Database = ; Integrated Security = SSPI;"
conn = New SqlConnection(strConn)
cmd = New SqlCommand("sp_Databases", conn)
cmd.CommandType = CommandType.StoredProcedure
conn.Open()
dr = cmd.ExecuteReader
If dr.HasRows Then
Do While dr.Read
Trace.WriteLine(String.Format("Name {0} Size {1}", _
dr.Item("Database_Name"), dr.Item("Database_Size")))
Loop
End If
dr.Close()
conn.Close()
Ken
"Joo Santa Brbara" <joaosb@.i24portugal.com> wrote in message
news:OWYlApcZFHA.3164@.TK2MSFTNGP09.phx.gbl...
i just want the get databases listname
thks
"Ken Tucker [MVP]" <vb2ae@.bellsouth.net> wrote in message
news:%23cgSblcZFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Hi,
> What are you trying to do with sqldmo?
> Ken
> --
> "Joo Santa Brbara" <joaosb@.i24portugal.com> wrote in message
> news:OA1xjFcZFHA.3400@.tk2msftngp13.phx.gbl...
> Hi all
> i need to know if sql dmo can connect to SQL server 2005
> if can! how can i do this '
> i have this code
> Dim xServer a SQLDMO.Server
> ....bla..bla...
> xServer.LoginSecure = True
> xServer.Connect("SQLServer2005")
> but it cant connect.
> is there anyother way '
> thks
> JSB
>
>