Wednesday, March 28, 2012
How to connect?
I'd like to connect to a SQL Server 2000 instance which listens to not the
default 1433 port. Can anyone help me with how to register the server in EM
and how to connect to the server with QA?
Thanks.
Kolos
Hello,
1 option:- Create a client Alias using Client Network Utility defining the
correct PORT and then use the Alias to register and use in Query Analyzer
2 option: While connecting give IPADDRESS,Port number in the server window.
(Eg: 10.222.1.100,1522)
Thanks
Hari
"Kolos" <Kolos@.discussions.microsoft.com> wrote in message
news:0AE8AA45-09F8-43F3-9CE7-ADCD224DB393@.microsoft.com...
> Hi All,
> I'd like to connect to a SQL Server 2000 instance which listens to not the
> default 1433 port. Can anyone help me with how to register the server in
> EM
> and how to connect to the server with QA?
> Thanks.
> Kolos
How to connect?
I'd like to connect to a SQL Server 2000 instance which listens to not the
default 1433 port. Can anyone help me with how to register the server in EM
and how to connect to the server with QA?
Thanks.
KolosHello,
1 option:- Create a client Alias using Client Network Utility defining the
correct PORT and then use the Alias to register and use in Query Analyzer
2 option: While connecting give IPADDRESS,Port number in the server window.
(Eg: 10.222.1.100,1522)
Thanks
Hari
"Kolos" <Kolos@.discussions.microsoft.com> wrote in message
news:0AE8AA45-09F8-43F3-9CE7-ADCD224DB393@.microsoft.com...
> Hi All,
> I'd like to connect to a SQL Server 2000 instance which listens to not the
> default 1433 port. Can anyone help me with how to register the server in
> EM
> and how to connect to the server with QA?
> Thanks.
> Kolos
How to connect....HELP
I developed many database applications using Access, but now I need a code
snippet to make some of my existing application to run in a remote Sql server
with the same structure (databases, views)...and I can't figure how...
Anybody can help me?
http://www.able-consulting.com/ADO_Conn.htm
"Nando_uy" <Nandouy@.discussions.microsoft.com> wrote in message
news:8E8F6961-D166-45D4-8C8E-3E3CD032B768@.microsoft.com...
> How can I connect to database from a remote computer in the same domain?
> I developed many database applications using Access, but now I need a code
> snippet to make some of my existing application to run in a remote Sql
server
> with the same structure (databases, views)...and I can't figure how...
> Anybody can help me?
sql
How to connect....HELP
I developed many database applications using Access, but now I need a code
snippet to make some of my existing application to run in a remote Sql serve
r
with the same structure (databases, views)...and I can't figure how...
Anybody can help me?http://www.able-consulting.com/ADO_Conn.htm
"Nando_uy" <Nandouy@.discussions.microsoft.com> wrote in message
news:8E8F6961-D166-45D4-8C8E-3E3CD032B768@.microsoft.com...
> How can I connect to database from a remote computer in the same domain?
> I developed many database applications using Access, but now I need a code
> snippet to make some of my existing application to run in a remote Sql
server
> with the same structure (databases, views)...and I can't figure how...
> Anybody can help me?
How to connect, after all ?
i have a problem, so lets to it.
Situation:
I have a COM that connects to SQL2K with that string connection:
"Provider=SQLOLEDB;Persist Security Info = False;DATABASE=MyDatabase;SERVER=MyServer;User Id=myuser;Password=123456;"
that works fine, but we have a problem: the person that compiles de DLL knows user and password, so we decided to change the way the application connects to SQL, and start using AppRoles.
Things we did:
1-I created an approle and gave the permissions to the role.
2-I grant connect permission to domain\user1, only connect, that will be used when registering the COM as domain\user responsible to be used to stablish the connection.
3-Developers changed string connection to: "Provider='SQLOLEDB';Data Source='MyServer';Initial Catalog='Mydatabase';Integrated Security='SSPI';"
New behavior:
The connection goes OK, but the way we did before, when traced with profiler, the sp_reset_connection has been invoked by sqlserver, and with the knew connect string was no more executed.
Another problem is that when the COM is called in a second time, the previous connection is logged out and it stops, not connecting again.
Any ideas ??
thanks a lot.
Leandro.What's the source code of sp_reset_connection ( are you sure this is a standard MS sp)|||i dont know, sp_reset_connection is invoked by sqlserver that controls pooling connection.
the fact is that with the string connection used before the sp_reset... has been invoked, and with the new configuration was no more.
we setup a domain\user responsible to the COM and granted connect permission to it and the code of the COM is executing sp_setapprole.
the first time the COM is called it works fine, but the second time the sp_reset_connection is not invoked, and yhe connection is logged out.
the third time the COM is invoked all works fine again, when i trace the connection the select runs OK, ando so on.
any ideas ?|||I would try adding "Persist Security Info = False;" back into your connection string
how to connect with sqlexpress2005 & asp.net for update insert delete codings
I want to know about the how to connect with asp.net 2005 and sqlexpress through codings using parameters
import System.Data.SqlClient;
related update delete insert codings ...
How to know about the make the new connection with different databases sqlserver, oracle mysql...
Hi
Have you had a lookhttp://quickstarts.asp.net/QuickStartv20/default.aspx andhttp://www.asp.net/learn/data-access/.
Work through these samples.. They explain how to access databases using declarative coding (sqldatasource and the likes) and coe behind coding.
Hope that helps.
VJ
How to connect with SQL database?
I am new learner of ASP.NET and coding in C#.I am not able to connect the SQL database.I have written the code for connection of database but to write the connection string web.config file is neccessary which is not apearing in my application. Please help me .Here is code I have written.
string sCon =ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
SqlConnection oCon =new SqlConnection(sCon);try
{
oCon.Open();
string sQuery ="Select Offering1,Offering2,Offering3 from Offering";SqlCommand oCmd =new SqlCommand(sQuery, oCon);oCmd.ExecuteNonQuery();
DataSet oDs =newDataSet();
SqlDataAdapter oDa =new SqlDataAdapter(oCmd);oDa.Fill(oDs);
DataList1.DataSource = oDs;
DataList1.DataBind();
}
catch (Exception ex){
ex.ToString();
}
What kind of error are you getting?
Can you post a copy of the connectionString settings from your web.config?
|||Hii Jimmy,
Actually I do not see the web.config file in my solution explorer. So that I am unable to write the connection string. Can you please tell me why it is so ?
|||Looks like you may have started with the empty web site template. When you try to start/debug the application, does it not automatically add a web.config for you?
Well, you can manually add one. Right click on your web site and select ADD NEW ITEM then select the WEB CONFIGURATION FILE
Hey thanks,
As there are errors because I have not added the connection string into the web.cofig file it is not able to debug the file.Right now I have added web.config manually.
What the connection string format to add to web.config?
<addname="ConnectionString"connectionString="Server=(local)\SQLEXPRESS;Integrated Security=True;Database=Knowledgebase;Persist Security Info=True"/>is it right?
Now the error coming is "The type or namespace name 'SqlConnection' could not be found" when I try to debug my default.aspx.
|||
Bluestar123:
Now the error coming is "The type or namespace name 'SqlConnection' could not be found" when I try to debug my default.aspx.
That would because you did not import the namespace
Add this to the top of your code behind for your default.aspx
using System.Data.SqlClient;
|||The connection string can look something like this
"Data Source= xxx ;Initial Catalog=xxx; uid=xxx ;pwd=xxx"
where datasource is your database server; could be your machine name or I.P. address, Initial Catalog is the database name, UID is the login name, PWD is the login name's password
If your SQL Server is set up for windows authentication then you can do replace the UID and PWS with "Integrated Security=True"
Have a look at this link for connection string examples
http://connectionstrings.com/?carrier=sqlserver2005
|||Hi Jimmy,
Now I have added using System.Data.SqlClient to my default.aspx.cs and that error has gone thanks for the same.
I am still not able to fetch the data to my datalist from database, is still there any problem with my connection string? in my web.cofig I have used windows authentication.
<addname="ConnectionString"connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Knowledgebase;Integrated Security=True"/>
Please help ..........
|||
Bluestar123:
<addname="ConnectionString"connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Knowledgebase;Integrated Security=True"/>
for the connection string, the data source should be [your machine name]\SQLEXPRESS assuming SQLEXPRESS is the server instance name
update your code to this and give it a go
string sCon = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
SqlConnection oCon =new SqlConnection(sCon);try
{
string sQuery ="Select Offering1,Offering2,Offering3 from Offering";
SqlCommand oCmd =new SqlCommand(sQuery, oCon);DataSet oDs =new DataSet();
SqlDataAdapter oDa =new SqlDataAdapter(oCmd);oDa.Fill(oDs);
DataList1.DataSource = oDs;
DataList1.DataBind();
}
catch (Exception ex)
{
ex.ToString();
}
Add some break points and step through the code, if there any exceptions, take not of the exception message.
|||I have added break points at Select command and line below that ,control goes there when I debug the default.aspx and then it display the page without fetching thedata from database.So i have added the break point to the line
DataSet oDs=new DataSet();
at this line control donot go and directly display the page without showing the data from the database.
|||So when you put a break point at the DataSet oDs=new DataSet(); and when you step over it F10, it does not proceed to the next line? Then that means an exception was raised and it should be caught in your catch. So put a break point in your catch statement, so you can check the exception being thrown if there is one at all and give us the error message
|||oops! Column name I had given was wrong .......Its OfferingName. I made that change but now when I put brk point atDataList1.DataSource = oDs;
after pressing F10 control goes to next line i. e.
DataList1.DataBind();
but data from database is not getting displayed on the page though the page has been displayed......
oh no whats the problem ?am I doing any mistake again?
Follwing output I got in Output window
Warning: Cannot debug script code. Script debugging is disabled for the application you are debugging. Please uncheck the 'Disable script debugging' option on the Internet Options dialog box (Advanced page) for Internet Explorer and restart the process.
'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\knowledgebase\23a636d8\418c589d\App_Web_d4ehzmko.dll', No symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\knowledgebase\23a636d8\418c589d\App_Web_oq4mi2vf.dll', Symbols loaded.
The program '[3368] WebDev.WebServer.EXE: Managed' has exited with code 0 (0x0).
|||Well the obviously question is have you tried executing the SQL statement against your database to make sure it does return data?
after you have stepped over this line of code oDa.Fill(oDs); check it the dataset has returned a datatable with datarows.
|||
No I didnt,how can I check it ?I am using Microsoft SQL server management Studio. When go to line
oDa.Fill(oDs);
it did not return the table contents......
I tried to execute the query by using Execute SQL but not able to execute ,How to do?
Did you get fed up of my questions Jimmy??
|||
Bluestar123:
Did you get fed up of my questions Jimmy??
Not at all, just trying my best to understand your problem which is at times a little hard.
Lets try execute you select statement first in SQL Server Management Studio.
Log onto your database, and select the NEW QUERY option.
Now paste your SQL statement into this window , "Select Offering1,Offering2,Offering3 from Offering" and click execute
Does it return any results?
sql
How to connect via ODBC
Hi,
I would like to connect in SqlServer 2005 via ODBC SQLServer, how are the steps?
1 - How can I connect ODBC?
1.1 - I need SqlServer 2005 name - ok
1.2 - Which option should I take in order to login? Windows NT authentication or Sql Server authentication?
Which one is the best option?
Cheers,
Alessandro
1.2 - Which option should I take in order to login? Windows NT authentication or Sql Server authentication?
That depends - Windows authentication is almost always better but if you cannot use it then SQL Server authentication is fine as long as you have it enabled on the server and you have created a login on the server. With Windows authentication you can easily use existing Windows domains, groups and users, you don't have to create everything on the server and use extra login names and passwords.
What type of application are you using to connect to SQL Server? ODBC should be your last choice, rather use OLE DB or the .NET data provider if you can.
|||Hi,
- I picked windows authentication. I can not use OLE DB from my application.
I've created one windows user and created one login, but I still getting "Not associated with a trusted SQL Server connection". I changed Surface Area configuration and Configuration Manager as well. I heard that I nedd to enable mix mode option, how can I do this?
thanks
|||You haven't told me anything about your application or why you can't use OLE DB, so I'm guessing - but it sounds like you cannot use Windows authentication. In SQL Server Management Studio, right click your server and select Properties. Select the Security page, and on that page select the SQL Server and Windows Authentication mode radio button.
Then add a SQL Server login, and use that login and password in your connection string.
How to Connect VB and Visual Foxpro
and Visual Foxpro 6.0. How to connect VB with .dbf in
Visual Foxpro.Via ADO using the FoxPro ODBC or OLEDB driver.
If you need more help, post to one of the Fox groups such as
microsoft.public.fox.programmer.exchange.
--
David Portas
--
Please reply only to the newsgroup
--
"K.G.Palanisamy" <sendprasath@.yahoo.com> wrote in message
news:04cf01c3460d$605c3280$a001280a@.phx.gbl...
> I have some tables in .dbf format, I want to connect VB
> and Visual Foxpro 6.0. How to connect VB with .dbf in
> Visual Foxpro.
How to connect using C#
I'm trying to connect to a MS SQL Server using ASP.NET / C#. I've
already got some VB code that works but I'm unable to translate it to
working C# code. Can anyone help me out?
Working VB code:
Dim Conn
Conn = CreateObject("ADODB.Connection")
Const ConnectionString = "DSN=dsn_name;database=database_name"
Conn.Open(ConnectionString, "user_name", "password")
Not working C# code:
string ConnectionString = "Initial Catalog=database_name;" +
"Data Source=dsn_name;" +
"User ID=user_name;" +
"Password=password;" +
"Integrated Security=SSPI;";
SqlConnection Connection = new SqlConnection(ConnectionString);
Connection.Open();
Connection.Close();Use exactly the same connection string form C# as for VB. If it works
in one, it'll work in the other.
Specifically, if you are using SSPI, you don't need to specify uid and
pw, and vice-versa.|||AHM (ingen@.spam.tak) writes:
> I'm trying to connect to a MS SQL Server using ASP.NET / C#. I've
> already got some VB code that works but I'm unable to translate it to
> working C# code. Can anyone help me out?
If you help us to help you. Don't just post:
> Not working C# code:
> string ConnectionString = "Initial Catalog=database_name;" +
> "Data Source=dsn_name;" +
> "User ID=user_name;" +
> "Password=password;" +
> "Integrated Security=SSPI;";
> SqlConnection Connection = new SqlConnection(ConnectionString);
> Connection.Open();
> Connection.Close();
Tell us in what way it is not working. Do you get an error message?
Do you get unexpected results? Does the light go out?
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||> string ConnectionString = "Initial Catalog=database_name;" +
> "Data Source=dsn_name;" +
> "User ID=user_name;" +
> "Password=password;" +
> "Integrated Security=SSPI;";
Note the change to 'Data Source' in the example below as well as the removal
of the unnecessary User ID and Password parameters:
string ConnectionString = "Initial Catalog=database_name;" +
"Data Source=database_server_name;" +
"Integrated Security=SSPI;";
--
Hope this helps.
Dan Guzman
SQL Server MVP
"AHM" <ingen@.spam.tak> wrote in message
news:MPG.1cb65eb0b33ffb61989705@.news.inet.tele.dk. ..
> Hi
> I'm trying to connect to a MS SQL Server using ASP.NET / C#. I've
> already got some VB code that works but I'm unable to translate it to
> working C# code. Can anyone help me out?
> Working VB code:
> Dim Conn
> Conn = CreateObject("ADODB.Connection")
> Const ConnectionString = "DSN=dsn_name;database=database_name"
> Conn.Open(ConnectionString, "user_name", "password")
> Not working C# code:
> string ConnectionString = "Initial Catalog=database_name;" +
> "Data Source=dsn_name;" +
> "User ID=user_name;" +
> "Password=password;" +
> "Integrated Security=SSPI;";
> SqlConnection Connection = new SqlConnection(ConnectionString);
> Connection.Open();
> Connection.Close();
How to connect two SQL Server using private network.
I have two SQL Servers physically sitting next to each other. These servers
have Public IPs as 10.10.49.123 and 10.10.49.124. These two servers are also
connected through Cross Over Cables for Private Network and private non
routed IPs are 192.168.1.2 and 192.168.1.3. I have SQL Serever Transactional
Replication set up on it and I want to use private network for transferring
data between these two servers. Private network is on 2 Gigabit switch. Non
replication traffic can come vis normal way as it coming currently. Is it
possbile to implement this kind of setup or not? If so, how? Any help or
whitepaper on it will be highly appreciated.
Server 1 is Publisher and Distributor
Server 2 is Subscriber."Mark" <Mark@.discussions.microsoft.com> wrote in message
news:DADD0D4A-5010-4A57-ADDA-DE898FCCE68D@.microsoft.com...
> Hi All:
> I have two SQL Servers physically sitting next to each other. These
> servers
> have Public IPs as 10.10.49.123 and 10.10.49.124. These two servers are
> also
> connected through Cross Over Cables for Private Network and private non
> routed IPs are 192.168.1.2 and 192.168.1.3. I have SQL Serever
> Transactional
> Replication set up on it and I want to use private network for
> transferring
> data between these two servers. Private network is on 2 Gigabit switch.
> Non
> replication traffic can come vis normal way as it coming currently. Is it
> possbile to implement this kind of setup or not? If so, how? Any help or
> whitepaper on it will be highly appreciated.
> Server 1 is Publisher and Distributor
> Server 2 is Subscriber.
>
Just put entries in the hosts file of each server so when Server 1 goes to
connect to Server 2, its name resolves to 192.168.1.2 and not 10.10.49.123.
David|||I tried this and this didnt work. Why is it that from command prompt on
Server 1, I can ping Server 2's private IP address and yet when I add them
into Host File and then try, it fails.
Anything else that I need to do other than adding entries into Host file?
This is what I did so far.
"David Browne" wrote:
> "Mark" <Mark@.discussions.microsoft.com> wrote in message
> news:DADD0D4A-5010-4A57-ADDA-DE898FCCE68D@.microsoft.com...
> Just put entries in the hosts file of each server so when Server 1 goes to
> connect to Server 2, its name resolves to 192.168.1.2 and not 10.10.49.123
.
> David
>
>|||After you add the entry to the host file, if you ping the server by name
which IP is used?
Have you rebooted after changing the host file?
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:F4C36A18-2D24-4A63-96A6-906126167A12@.microsoft.com...
> I tried this and this didnt work. Why is it that from command prompt on
> Server 1, I can ping Server 2's private IP address and yet when I add them
> into Host File and then try, it fails.
> Anything else that I need to do other than adding entries into Host file?
> This is what I did so far.
>
> "David Browne" wrote:
>
are
non
switch.
it
or
to
10.10.49.123.|||Thanks to both for replying to my problem.
It still shows 10.10.49.124. When I try to conenct to SQL Server using
private IP address in Query Analyzer, I get error saying: Unable to connect
to SQL Server. SQL Server doesn't exist or Access denied.
Is it cached or am I missing something.
So, to clearly understand this, all I have to do is add entry in the host
file to the private IP address and it should worlk. Correct' Anything else?
"Jim Underwood" wrote:
> After you add the entry to the host file, if you ping the server by name
> which IP is used?
> Have you rebooted after changing the host file?
> "Mark" <Mark@.discussions.microsoft.com> wrote in message
> news:F4C36A18-2D24-4A63-96A6-906126167A12@.microsoft.com...
> are
> non
> switch.
> it
> or
> to
> 10.10.49.123.
>
>|||I believe adding the IP to the host file will allow you to refernce the
server by name instead of IP. I would expect that the IP address would work
regardless, assuming your network is setup correctly.
Are you even able to ping the server by IP address? If not then your
network is not set up correctly.
Are you running query analyzer on the server, or on a client that is not
part of the private network?
"Mark" <Mark@.discussions.microsoft.com> wrote in message
news:E0B6F1EC-FFE5-4E5B-946F-4E34BE507D71@.microsoft.com...
> Thanks to both for replying to my problem.
> It still shows 10.10.49.124. When I try to conenct to SQL Server using
> private IP address in Query Analyzer, I get error saying: Unable to
connect
> to SQL Server. SQL Server doesn't exist or Access denied.
> Is it cached or am I missing something.
> So, to clearly understand this, all I have to do is add entry in the host
> file to the private IP address and it should worlk. Correct' Anything
else?
> "Jim Underwood" wrote:
>
on
them
file?
These
servers
private
currently. Is
help
goes|||Correct, but it sounds like you have a different issue. If you can't
connect to Server 2 from Server 1 using the internal ip address, then
the host name won't work either. Sounds like either a bad cross-over
cable, or the internal network cards are disabled.
>From server1, with an IP Address of 192.168.1.2, get a command prompt
and ping the other internal IP address (192.168.1.3). If you don't get
a connection, then you got network issues.
Stu|||Thanks guys. Let me work on it and I will put my feedback here. I have to us
e
different cables and see what happens next. It could be a hardware issue mor
e
than a software.
Once again thanks a lot for all your help
"Stu" wrote:
> Correct, but it sounds like you have a different issue. If you can't
> connect to Server 2 from Server 1 using the internal ip address, then
> the host name won't work either. Sounds like either a bad cross-over
> cable, or the internal network cards are disabled.
>
> and ping the other internal IP address (192.168.1.3). If you don't get
> a connection, then you got network issues.
> Stu
>
How to connect two differect instances of SQL SERVER
and read about linked servers, DTS, replication...|||Each instance of SQL Server 2000 listens on a unique set of network addresses so that applications can connect to different instances. SQL Server 2000 clients do not need any specific configuration to connect to an instance of SQL Server 2000.
The SQL Server 2000 client components query a computer running one or more instances of SQL Server to determine the Net-Libraries and network addresses for each instance. The client components then choose a supported Net-Library and address for the connection automatically, without requiring any configuration work on the client.
The only information the application must supply is the computer name and instance name.
http://www.winnetmag.com/Article/ArticleID/37794/37794.html for further information.sql
How to connect two databases on alocal server in SQL
I want some help .... Its really urgent
In my project I want to connect to two databases on alocal server in SQL ? Is there any SQL query to connect two databases ?
Situation is=>
There are two Databases Db1, Db2. I want to take data from tables of Db1 to data of tables of Db2 and vice versa.I want simple SQL query without any scripting language or VB statements. Its very urgent Please help me in that.If the two databases are on the same server you can reference either one in the other by using the fully qualified object name: [database].[owner].[object]|||Thank You Sir, For your quiock reply. I have tried it but still I am unable to connect.
Sir can we have '-' (Hyphen Character) for our database name? like a_com_-_b, Is It a valid name...
Thank You|||Yes, database names can contain hyphens. But I would not recommend it for reasons of style.
Post the code you are trying that is not working. You should be able to do something like:
Use Database1
go
select Table1.Column1,
Table2.Column2
from Table1
inner join Database2.dbo.Table2 as Table2 on Table1.pkey = Table2.pkey
How to connect to the SQl server EXPRESS using 'ODBC Data Source A
Recently I have installed SQl server express edition. I was able to connect
to the SQL server from my .NET project using connection parameter like:
Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Raju\My
Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
Security=True;Connect Timeout=30;User Instance=True
Now I need to connect to the same SQL server from 'ODBC Data Source
Aministrator' wizard, that I am unable to do. The wizard is asking me (for
system DSn and File DSN) for SQL server name (I do no know what to give, is
it (local) or something) and how to login authenticate (with windows
authentication or something). Now if I goto Services/SQl Server (SQLEXPRESS)
, click LogOn I see that 'Local System Account' is checked. Pls tell me how
to connect to this SQl server using System DSN connection wizard.
By the way I am the administrator of this machine where I have instlled the
SQl server...
Thanks in advance,
--
Sanjib SahaHi
VB.NET
Imports System.Data.Odbc
Dim oODBCConnection As OdbcConnection
Dim ConnString As String = _
"Driver={SQL Server};" & _
"Server=SQLServerName;" & _
"Database=DatabaseName;" & _
"Uid=Username;" & _
"Pwd=Password"
oODBCConnection = New Odbc.OdbcConnection(ConnString)
oODBCConnection.Open()
"sanjib" <sanjib@.discussions.microsoft.com> wrote in message
news:7BE14AB4-9460-4489-B7CB-62880592EFC6@.microsoft.com...
> Hi All,
> Recently I have installed SQl server express edition. I was able to
> connect
> to the SQL server from my .NET project using connection parameter like:
> Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and
> Settings\Raju\My
> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
> Security=True;Connect Timeout=30;User Instance=True
> Now I need to connect to the same SQL server from 'ODBC Data Source
> Aministrator' wizard, that I am unable to do. The wizard is asking me (for
> system DSn and File DSN) for SQL server name (I do no know what to give,
> is
> it (local) or something) and how to login authenticate (with windows
> authentication or something). Now if I goto Services/SQl Server
> (SQLEXPRESS)
> , click LogOn I see that 'Local System Account' is checked. Pls tell me
> how
> to connect to this SQl server using System DSN connection wizard.
> By the way I am the administrator of this machine where I have instlled
> the
> SQl server...
> Thanks in advance,
> --
> Sanjib Saha|||The OP indicates that he is using SQL Server 2005 Express' User Instance. I
do not think he can connect to User Instance through ODBC DSN Wizard (why
use ODBC anyway?). I am not should if it is possible to connect to SQL
Server Express' User Instance through OdbcConnection object in
System.Data.Odbc namespace, but it is certain your sample code will not.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23QvKqzLoGHA.4332@.TK2MSFTNGP03.phx.gbl...
> Hi
> VB.NET
> Imports System.Data.Odbc
> Dim oODBCConnection As OdbcConnection
> Dim ConnString As String = _
> "Driver={SQL Server};" & _
> "Server=SQLServerName;" & _
> "Database=DatabaseName;" & _
> "Uid=Username;" & _
> "Pwd=Password"
> oODBCConnection = New Odbc.OdbcConnection(ConnString)
> oODBCConnection.Open()
>
> "sanjib" <sanjib@.discussions.microsoft.com> wrote in message
> news:7BE14AB4-9460-4489-B7CB-62880592EFC6@.microsoft.com...
>> Hi All,
>> Recently I have installed SQl server express edition. I was able to
>> connect
>> to the SQL server from my .NET project using connection parameter like:
>> Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and
>> Settings\Raju\My
>> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
>> Security=True;Connect Timeout=30;User Instance=True
>> Now I need to connect to the same SQL server from 'ODBC Data Source
>> Aministrator' wizard, that I am unable to do. The wizard is asking me
>> (for
>> system DSn and File DSN) for SQL server name (I do no know what to give,
>> is
>> it (local) or something) and how to login authenticate (with windows
>> authentication or something). Now if I goto Services/SQl Server
>> (SQLEXPRESS)
>> , click LogOn I see that 'Local System Account' is checked. Pls tell me
>> how
>> to connect to this SQl server using System DSN connection wizard.
>> By the way I am the administrator of this machine where I have instlled
>> the
>> SQl server...
>> Thanks in advance,
>> --
>> Sanjib Saha
>|||Norman,
There should be some way to connect to the SQl server 2005 Express user
instance. I need to connect to this SQl server b'case one of my application
is demandint that...There should be some way, tht we do not know...Anyway
thanks...Someone pls guide me...
Thanks,
Sanjib
--
Sanjib Saha
"sanjib" wrote:
> Hi All,
> Recently I have installed SQl server express edition. I was able to connect
> to the SQL server from my .NET project using connection parameter like:
> Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Raju\My
> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
> Security=True;Connect Timeout=30;User Instance=True
> Now I need to connect to the same SQL server from 'ODBC Data Source
> Aministrator' wizard, that I am unable to do. The wizard is asking me (for
> system DSn and File DSN) for SQL server name (I do no know what to give, is
> it (local) or something) and how to login authenticate (with windows
> authentication or something). Now if I goto Services/SQl Server (SQLEXPRESS)
> , click LogOn I see that 'Local System Account' is checked. Pls tell me how
> to connect to this SQl server using System DSN connection wizard.
> By the way I am the administrator of this machine where I have instlled the
> SQl server...
> Thanks in advance,
> --
> Sanjib Saha|||You can access an User Instance once it is started by specifying the Named
Pipe name for the instance but if you haven't already started the user
instance with a managed code connection, ODBC won't start it. If your main
application is using ODBC, I would recommend attaching the database to the
main instance so it is always running and the ODBC connection can find it.
There is more information on named instances and how to connect to them
here:
http://msdn.microsoft.com/sql/express/default.aspx?pull=/library/en-us/dnsse/html/sqlexpuserinst.asp
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sanjib" <sanjib@.discussions.microsoft.com> wrote in message
news:2AB671B3-FEAD-49C9-A309-8DBF8BF07815@.microsoft.com...
> Norman,
> There should be some way to connect to the SQl server 2005 Express user
> instance. I need to connect to this SQl server b'case one of my
> application
> is demandint that...There should be some way, tht we do not know...Anyway
> thanks...Someone pls guide me...
> Thanks,
> Sanjib
> --
> Sanjib Saha
>
> "sanjib" wrote:
>> Hi All,
>> Recently I have installed SQl server express edition. I was able to
>> connect
>> to the SQL server from my .NET project using connection parameter like:
>> Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and
>> Settings\Raju\My
>> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
>> Security=True;Connect Timeout=30;User Instance=True
>> Now I need to connect to the same SQL server from 'ODBC Data Source
>> Aministrator' wizard, that I am unable to do. The wizard is asking me
>> (for
>> system DSn and File DSN) for SQL server name (I do no know what to give,
>> is
>> it (local) or something) and how to login authenticate (with windows
>> authentication or something). Now if I goto Services/SQl Server
>> (SQLEXPRESS)
>> , click LogOn I see that 'Local System Account' is checked. Pls tell me
>> how
>> to connect to this SQl server using System DSN connection wizard.
>> By the way I am the administrator of this machine where I have instlled
>> the
>> SQl server...
>> Thanks in advance,
>> --
>> Sanjib Saha|||I agree with Roger.
If you HAVE to access the database on SQL Server Express via something other
than ADO.NET2.0's System.Data SqlClient namespace, why use User Instannce?
The whole point of using user instance is to limit the database setup/access
within current user's privilidge of access to the computer. If a user has to
use ODBC DSN Wizard, it may well requires the user has a bit more privilidge
that usual. Also, an user instance is not available to other user even the
other user uses the same computer.
"sanjib" <sanjib@.discussions.microsoft.com> wrote in message
news:2AB671B3-FEAD-49C9-A309-8DBF8BF07815@.microsoft.com...
> Norman,
> There should be some way to connect to the SQl server 2005 Express user
> instance. I need to connect to this SQl server b'case one of my
> application
> is demandint that...There should be some way, tht we do not know...Anyway
> thanks...Someone pls guide me...
> Thanks,
> Sanjib
> --
> Sanjib Saha
>
> "sanjib" wrote:
>> Hi All,
>> Recently I have installed SQl server express edition. I was able to
>> connect
>> to the SQL server from my .NET project using connection parameter like:
>> Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and
>> Settings\Raju\My
>> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
>> Security=True;Connect Timeout=30;User Instance=True
>> Now I need to connect to the same SQL server from 'ODBC Data Source
>> Aministrator' wizard, that I am unable to do. The wizard is asking me
>> (for
>> system DSn and File DSN) for SQL server name (I do no know what to give,
>> is
>> it (local) or something) and how to login authenticate (with windows
>> authentication or something). Now if I goto Services/SQl Server
>> (SQLEXPRESS)
>> , click LogOn I see that 'Local System Account' is checked. Pls tell me
>> how
>> to connect to this SQl server using System DSN connection wizard.
>> By the way I am the administrator of this machine where I have instlled
>> the
>> SQl server...
>> Thanks in advance,
>> --
>> Sanjib Saha|||Roger/Norman,
The whole point came like this. I am trying to install a SQl server driven
3rd party application and after the applications gets installed the database
installation wizard appears and tht wizard asks me to connect to the SQL
server using ODBC DSN, so I need to know the parameters for connecting to the
SQL server, which I don't know it seems, b'case while installing SQL server
2005 it never asked me for a server name/login password. And now it is
running using the 'Local System Account' i.e. Local Admin account that is me.
May be my SQL server 2005 is using user instance, although I am not sure.
The fact that I am not that much knowlegeble in SQL severs, much worked in
microsoft programming languages, and SQl server for me is a database server
tht always worked.
I will try from the URL provided by Roger and let u know...
Thanks,
Sanjib
--
Sanjib Saha
"Roger Wolter[MSFT]" wrote:
> You can access an User Instance once it is started by specifying the Named
> Pipe name for the instance but if you haven't already started the user
> instance with a managed code connection, ODBC won't start it. If your main
> application is using ODBC, I would recommend attaching the database to the
> main instance so it is always running and the ODBC connection can find it.
> There is more information on named instances and how to connect to them
> here:
> http://msdn.microsoft.com/sql/express/default.aspx?pull=/library/en-us/dnsse/html/sqlexpuserinst.asp
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "sanjib" <sanjib@.discussions.microsoft.com> wrote in message
> news:2AB671B3-FEAD-49C9-A309-8DBF8BF07815@.microsoft.com...
> > Norman,
> >
> > There should be some way to connect to the SQl server 2005 Express user
> > instance. I need to connect to this SQl server b'case one of my
> > application
> > is demandint that...There should be some way, tht we do not know...Anyway
> > thanks...Someone pls guide me...
> >
> > Thanks,
> > Sanjib
> > --
> > Sanjib Saha
> >
> >
> > "sanjib" wrote:
> >
> >> Hi All,
> >>
> >> Recently I have installed SQl server express edition. I was able to
> >> connect
> >> to the SQL server from my .NET project using connection parameter like:
> >>
> >> Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and
> >> Settings\Raju\My
> >> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
> >> Security=True;Connect Timeout=30;User Instance=True
> >>
> >> Now I need to connect to the same SQL server from 'ODBC Data Source
> >> Aministrator' wizard, that I am unable to do. The wizard is asking me
> >> (for
> >> system DSn and File DSN) for SQL server name (I do no know what to give,
> >> is
> >> it (local) or something) and how to login authenticate (with windows
> >> authentication or something). Now if I goto Services/SQl Server
> >> (SQLEXPRESS)
> >> , click LogOn I see that 'Local System Account' is checked. Pls tell me
> >> how
> >> to connect to this SQl server using System DSN connection wizard.
> >>
> >> By the way I am the administrator of this machine where I have instlled
> >> the
> >> SQl server...
> >>
> >> Thanks in advance,
> >> --
> >> Sanjib Saha
>
>|||From your description in this post, it seems your installation does not
install an user instance (I am not sure). However, form your first post,
according to the ConnectionString, you are trying to use an User Instance.
User Instance of SQL Server Express is a special installation of SQL Server
Express. It seems you need a bit more study on what an user instance is, so
that you can tell if your intallation is an user instance or not, and
whether you need an user instance or not. IMO, SQL Server Express's user
instance does not go with ODBC.
"sanjib" <sanjib@.discussions.microsoft.com> wrote in message
news:33A10BC3-2103-4BD3-B9E7-5AE71965D745@.microsoft.com...
> Roger/Norman,
> The whole point came like this. I am trying to install a SQl server driven
> 3rd party application and after the applications gets installed the
> database
> installation wizard appears and tht wizard asks me to connect to the SQL
> server using ODBC DSN, so I need to know the parameters for connecting to
> the
> SQL server, which I don't know it seems, b'case while installing SQL
> server
> 2005 it never asked me for a server name/login password. And now it is
> running using the 'Local System Account' i.e. Local Admin account that is
> me.
> May be my SQL server 2005 is using user instance, although I am not sure.
> The fact that I am not that much knowlegeble in SQL severs, much worked in
> microsoft programming languages, and SQl server for me is a database
> server
> tht always worked.
> I will try from the URL provided by Roger and let u know...
> Thanks,
> Sanjib
> --
> Sanjib Saha
>
> "Roger Wolter[MSFT]" wrote:
>> You can access an User Instance once it is started by specifying the
>> Named
>> Pipe name for the instance but if you haven't already started the user
>> instance with a managed code connection, ODBC won't start it. If your
>> main
>> application is using ODBC, I would recommend attaching the database to
>> the
>> main instance so it is always running and the ODBC connection can find
>> it.
>> There is more information on named instances and how to connect to them
>> here:
>> http://msdn.microsoft.com/sql/express/default.aspx?pull=/library/en-us/dnsse/html/sqlexpuserinst.asp
>>
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> Use of included script samples are subject to the terms specified at
>> http://www.microsoft.com/info/cpyright.htm
>> "sanjib" <sanjib@.discussions.microsoft.com> wrote in message
>> news:2AB671B3-FEAD-49C9-A309-8DBF8BF07815@.microsoft.com...
>> > Norman,
>> >
>> > There should be some way to connect to the SQl server 2005 Express user
>> > instance. I need to connect to this SQl server b'case one of my
>> > application
>> > is demandint that...There should be some way, tht we do not
>> > know...Anyway
>> > thanks...Someone pls guide me...
>> >
>> > Thanks,
>> > Sanjib
>> > --
>> > Sanjib Saha
>> >
>> >
>> > "sanjib" wrote:
>> >
>> >> Hi All,
>> >>
>> >> Recently I have installed SQl server express edition. I was able to
>> >> connect
>> >> to the SQL server from my .NET project using connection parameter
>> >> like:
>> >>
>> >> Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and
>> >> Settings\Raju\My
>> >> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
>> >> Security=True;Connect Timeout=30;User Instance=True
>> >>
>> >> Now I need to connect to the same SQL server from 'ODBC Data Source
>> >> Aministrator' wizard, that I am unable to do. The wizard is asking me
>> >> (for
>> >> system DSn and File DSN) for SQL server name (I do no know what to
>> >> give,
>> >> is
>> >> it (local) or something) and how to login authenticate (with windows
>> >> authentication or something). Now if I goto Services/SQl Server
>> >> (SQLEXPRESS)
>> >> , click LogOn I see that 'Local System Account' is checked. Pls tell
>> >> me
>> >> how
>> >> to connect to this SQl server using System DSN connection wizard.
>> >>
>> >> By the way I am the administrator of this machine where I have
>> >> instlled
>> >> the
>> >> SQl server...
>> >>
>> >> Thanks in advance,
>> >> --
>> >> Sanjib Saha
>>|||I think I may understand what you're asking now. You have two completely
unrelated elements in your posting. First you were able to use ADO.Net in
Visual Studio to create a database. This database was a user instance which
is why this came up in our answers. On a completely unrelated note you now
want to install a third party application that uses ODBC to connect to the
database.
Go into the Windows Control Panel and select Administrative Tools. One of
the tools is ODBC data sources. Select the System DSN or User DSN as
required for your application and click ADD. Select the SQL Native Client
Driver. Fill in a name which you get to choose (probably the application is
looking for a particular name), leave the description blank and put
.\SQLExpress in the server field. Select the defaults for the rest unless
you already know the database name you want to make your default database.
If not, the default will be "master".
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Norman Yuan" <NotReal@.NotReal.not> wrote in message
news:eQyQnkToGHA.956@.TK2MSFTNGP03.phx.gbl...
>I agree with Roger.
> If you HAVE to access the database on SQL Server Express via something
> other than ADO.NET2.0's System.Data SqlClient namespace, why use User
> Instannce? The whole point of using user instance is to limit the database
> setup/access within current user's privilidge of access to the computer.
> If a user has to use ODBC DSN Wizard, it may well requires the user has a
> bit more privilidge that usual. Also, an user instance is not available to
> other user even the other user uses the same computer.
>
> "sanjib" <sanjib@.discussions.microsoft.com> wrote in message
> news:2AB671B3-FEAD-49C9-A309-8DBF8BF07815@.microsoft.com...
>> Norman,
>> There should be some way to connect to the SQl server 2005 Express user
>> instance. I need to connect to this SQl server b'case one of my
>> application
>> is demandint that...There should be some way, tht we do not
>> know...Anyway
>> thanks...Someone pls guide me...
>> Thanks,
>> Sanjib
>> --
>> Sanjib Saha
>>
>> "sanjib" wrote:
>> Hi All,
>> Recently I have installed SQl server express edition. I was able to
>> connect
>> to the SQL server from my .NET project using connection parameter like:
>> Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and
>> Settings\Raju\My
>> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
>> Security=True;Connect Timeout=30;User Instance=True
>> Now I need to connect to the same SQL server from 'ODBC Data Source
>> Aministrator' wizard, that I am unable to do. The wizard is asking me
>> (for
>> system DSn and File DSN) for SQL server name (I do no know what to give,
>> is
>> it (local) or something) and how to login authenticate (with windows
>> authentication or something). Now if I goto Services/SQl Server
>> (SQLEXPRESS)
>> , click LogOn I see that 'Local System Account' is checked. Pls tell me
>> how
>> to connect to this SQl server using System DSN connection wizard.
>> By the way I am the administrator of this machine where I have instlled
>> the
>> SQl server...
>> Thanks in advance,
>> --
>> Sanjib Saha
>|||Roger/Norman,
Roger's trick to connect to the SQL server worked for me, I was able to use
the ODBC data source wizard to connect to the SQL server. It worked for me.
Now I will be happy if this SQL server let me create a user (for this SQL
server) for me, at least one user with all the DBA permission. Is tht
possible, pls let me know...
By the time I have started reading some materials for SQL server. ANother
thing with this SQL server 2005 express, there is no SQl explore window where
I can find create the SQL server Datavase/queries etc. Why is it so.
Although many thanks for your kind help and suggestions...
Sanjib
--
Sanjib Saha
"Roger Wolter[MSFT]" wrote:
> I think I may understand what you're asking now. You have two completely
> unrelated elements in your posting. First you were able to use ADO.Net in
> Visual Studio to create a database. This database was a user instance which
> is why this came up in our answers. On a completely unrelated note you now
> want to install a third party application that uses ODBC to connect to the
> database.
> Go into the Windows Control Panel and select Administrative Tools. One of
> the tools is ODBC data sources. Select the System DSN or User DSN as
> required for your application and click ADD. Select the SQL Native Client
> Driver. Fill in a name which you get to choose (probably the application is
> looking for a particular name), leave the description blank and put
> ..\SQLExpress in the server field. Select the defaults for the rest unless
> you already know the database name you want to make your default database.
> If not, the default will be "master".
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Norman Yuan" <NotReal@.NotReal.not> wrote in message
> news:eQyQnkToGHA.956@.TK2MSFTNGP03.phx.gbl...
> >I agree with Roger.
> >
> > If you HAVE to access the database on SQL Server Express via something
> > other than ADO.NET2.0's System.Data SqlClient namespace, why use User
> > Instannce? The whole point of using user instance is to limit the database
> > setup/access within current user's privilidge of access to the computer.
> > If a user has to use ODBC DSN Wizard, it may well requires the user has a
> > bit more privilidge that usual. Also, an user instance is not available to
> > other user even the other user uses the same computer.
> >
> >
> > "sanjib" <sanjib@.discussions.microsoft.com> wrote in message
> > news:2AB671B3-FEAD-49C9-A309-8DBF8BF07815@.microsoft.com...
> >> Norman,
> >>
> >> There should be some way to connect to the SQl server 2005 Express user
> >> instance. I need to connect to this SQl server b'case one of my
> >> application
> >> is demandint that...There should be some way, tht we do not
> >> know...Anyway
> >> thanks...Someone pls guide me...
> >>
> >> Thanks,
> >> Sanjib
> >> --
> >> Sanjib Saha
> >>
> >>
> >> "sanjib" wrote:
> >>
> >> Hi All,
> >>
> >> Recently I have installed SQl server express edition. I was able to
> >> connect
> >> to the SQL server from my .NET project using connection parameter like:
> >>
> >> Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and
> >> Settings\Raju\My
> >> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
> >> Security=True;Connect Timeout=30;User Instance=True
> >>
> >> Now I need to connect to the same SQL server from 'ODBC Data Source
> >> Aministrator' wizard, that I am unable to do. The wizard is asking me
> >> (for
> >> system DSn and File DSN) for SQL server name (I do no know what to give,
> >> is
> >> it (local) or something) and how to login authenticate (with windows
> >> authentication or something). Now if I goto Services/SQl Server
> >> (SQLEXPRESS)
> >> , click LogOn I see that 'Local System Account' is checked. Pls tell me
> >> how
> >> to connect to this SQl server using System DSN connection wizard.
> >>
> >> By the way I am the administrator of this machine where I have instlled
> >> the
> >> SQl server...
> >>
> >> Thanks in advance,
> >> --
> >> Sanjib Saha
> >
> >
>
>|||You can download Sql Server Management Studio Express (free) from MS and it
is desinged for managing SQL Server /Express,
"sanjib" <sanjib@.discussions.microsoft.com> wrote in message
news:7AC96FD6-B69E-4A90-8CB7-C5151A5BD193@.microsoft.com...
> Roger/Norman,
> Roger's trick to connect to the SQL server worked for me, I was able to
> use
> the ODBC data source wizard to connect to the SQL server. It worked for
> me.
> Now I will be happy if this SQL server let me create a user (for this SQL
> server) for me, at least one user with all the DBA permission. Is tht
> possible, pls let me know...
> By the time I have started reading some materials for SQL server. ANother
> thing with this SQL server 2005 express, there is no SQl explore window
> where
> I can find create the SQL server Datavase/queries etc. Why is it so.
> Although many thanks for your kind help and suggestions...
> Sanjib
> --
> Sanjib Saha
>
> "Roger Wolter[MSFT]" wrote:
>> I think I may understand what you're asking now. You have two completely
>> unrelated elements in your posting. First you were able to use ADO.Net
>> in
>> Visual Studio to create a database. This database was a user instance
>> which
>> is why this came up in our answers. On a completely unrelated note you
>> now
>> want to install a third party application that uses ODBC to connect to
>> the
>> database.
>> Go into the Windows Control Panel and select Administrative Tools. One
>> of
>> the tools is ODBC data sources. Select the System DSN or User DSN as
>> required for your application and click ADD. Select the SQL Native
>> Client
>> Driver. Fill in a name which you get to choose (probably the application
>> is
>> looking for a particular name), leave the description blank and put
>> ..\SQLExpress in the server field. Select the defaults for the rest
>> unless
>> you already know the database name you want to make your default
>> database.
>> If not, the default will be "master".
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> Use of included script samples are subject to the terms specified at
>> http://www.microsoft.com/info/cpyright.htm
>> "Norman Yuan" <NotReal@.NotReal.not> wrote in message
>> news:eQyQnkToGHA.956@.TK2MSFTNGP03.phx.gbl...
>> >I agree with Roger.
>> >
>> > If you HAVE to access the database on SQL Server Express via something
>> > other than ADO.NET2.0's System.Data SqlClient namespace, why use User
>> > Instannce? The whole point of using user instance is to limit the
>> > database
>> > setup/access within current user's privilidge of access to the
>> > computer.
>> > If a user has to use ODBC DSN Wizard, it may well requires the user has
>> > a
>> > bit more privilidge that usual. Also, an user instance is not available
>> > to
>> > other user even the other user uses the same computer.
>> >
>> >
>> > "sanjib" <sanjib@.discussions.microsoft.com> wrote in message
>> > news:2AB671B3-FEAD-49C9-A309-8DBF8BF07815@.microsoft.com...
>> >> Norman,
>> >>
>> >> There should be some way to connect to the SQl server 2005 Express
>> >> user
>> >> instance. I need to connect to this SQl server b'case one of my
>> >> application
>> >> is demandint that...There should be some way, tht we do not
>> >> know...Anyway
>> >> thanks...Someone pls guide me...
>> >>
>> >> Thanks,
>> >> Sanjib
>> >> --
>> >> Sanjib Saha
>> >>
>> >>
>> >> "sanjib" wrote:
>> >>
>> >> Hi All,
>> >>
>> >> Recently I have installed SQl server express edition. I was able to
>> >> connect
>> >> to the SQL server from my .NET project using connection parameter
>> >> like:
>> >>
>> >> Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and
>> >> Settings\Raju\My
>> >> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
>> >> Security=True;Connect Timeout=30;User Instance=True
>> >>
>> >> Now I need to connect to the same SQL server from 'ODBC Data Source
>> >> Aministrator' wizard, that I am unable to do. The wizard is asking me
>> >> (for
>> >> system DSn and File DSN) for SQL server name (I do no know what to
>> >> give,
>> >> is
>> >> it (local) or something) and how to login authenticate (with windows
>> >> authentication or something). Now if I goto Services/SQl Server
>> >> (SQLEXPRESS)
>> >> , click LogOn I see that 'Local System Account' is checked. Pls tell
>> >> me
>> >> how
>> >> to connect to this SQl server using System DSN connection wizard.
>> >>
>> >> By the way I am the administrator of this machine where I have
>> >> instlled
>> >> the
>> >> SQl server...
>> >>
>> >> Thanks in advance,
>> >> --
>> >> Sanjib Saha
>> >
>> >
>>
How to connect to the SQl server EXPRESS using 'ODBC Data Source A
Recently I have installed SQl server express edition. I was able to connect
to the SQL server from my .NET project using connection parameter like:
Data Source=. \SQLEXPRESS;AttachDbFilename=C:\Document
s and Settings\Raju\My
Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
Security=True;Connect Timeout=30;User Instance=True
Now I need to connect to the same SQL server from 'ODBC Data Source
Aministrator' wizard, that I am unable to do. The wizard is asking me (for
system DSn and File DSN) for SQL server name (I do no know what to give, is
it (local) or something) and how to login authenticate (with windows
authentication or something). Now if I goto Services/SQl Server (SQLEXPRESS)
, click LogOn I see that 'Local System Account' is checked. Pls tell me how
to connect to this SQl server using System DSN connection wizard.
By the way I am the administrator of this machine where I have instlled the
SQl server...
Thanks in advance,
--
Sanjib SahaHi
VB.NET
Imports System.Data.Odbc
Dim oODBCConnection As OdbcConnection
Dim ConnString As String = _
"Driver={SQL Server};" & _
"Server=SQLServerName;" & _
"Database=DatabaseName;" & _
"Uid=Username;" & _
"Pwd=Password"
oODBCConnection = New Odbc.OdbcConnection(ConnString)
oODBCConnection.Open()
"sanjib" <sanjib@.discussions.microsoft.com> wrote in message
news:7BE14AB4-9460-4489-B7CB-62880592EFC6@.microsoft.com...
> Hi All,
> Recently I have installed SQl server express edition. I was able to
> connect
> to the SQL server from my .NET project using connection parameter like:
> Data Source=. \SQLEXPRESS;AttachDbFilename=C:\Document
s and
> Settings\Raju\My
> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
> Security=True;Connect Timeout=30;User Instance=True
> Now I need to connect to the same SQL server from 'ODBC Data Source
> Aministrator' wizard, that I am unable to do. The wizard is asking me (for
> system DSn and File DSN) for SQL server name (I do no know what to give,
> is
> it (local) or something) and how to login authenticate (with windows
> authentication or something). Now if I goto Services/SQl Server
> (SQLEXPRESS)
> , click LogOn I see that 'Local System Account' is checked. Pls tell me
> how
> to connect to this SQl server using System DSN connection wizard.
> By the way I am the administrator of this machine where I have instlled
> the
> SQl server...
> Thanks in advance,
> --
> Sanjib Saha|||The OP indicates that he is using SQL Server 2005 Express' User Instance. I
do not think he can connect to User Instance through ODBC DSN Wizard (why
use ODBC anyway?). I am not should if it is possible to connect to SQL
Server Express' User Instance through OdbcConnection object in
System.Data.Odbc namespace, but it is certain your sample code will not.
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23QvKqzLoGHA.4332@.TK2MSFTNGP03.phx.gbl...
> Hi
> VB.NET
> Imports System.Data.Odbc
> Dim oODBCConnection As OdbcConnection
> Dim ConnString As String = _
> "Driver={SQL Server};" & _
> "Server=SQLServerName;" & _
> "Database=DatabaseName;" & _
> "Uid=Username;" & _
> "Pwd=Password"
> oODBCConnection = New Odbc.OdbcConnection(ConnString)
> oODBCConnection.Open()
>
> "sanjib" <sanjib@.discussions.microsoft.com> wrote in message
> news:7BE14AB4-9460-4489-B7CB-62880592EFC6@.microsoft.com...
>|||Norman,
There should be some way to connect to the SQl server 2005 Express user
instance. I need to connect to this SQl server b'case one of my application
is demandint that...There should be some way, tht we do not know...Anyway
thanks...Someone pls guide me...
Thanks,
Sanjib
--
Sanjib Saha
"sanjib" wrote:
> Hi All,
> Recently I have installed SQl server express edition. I was able to connec
t
> to the SQL server from my .NET project using connection parameter like:
> Data Source=. \SQLEXPRESS;AttachDbFilename=C:\Document
s and Settings\Raju\M
y
> Documents\Sanjib SQL DBs\IBuyAdventure\IBuyAdventure.mdf;Integrated
> Security=True;Connect Timeout=30;User Instance=True
> Now I need to connect to the same SQL server from 'ODBC Data Source
> Aministrator' wizard, that I am unable to do. The wizard is asking me (for
> system DSn and File DSN) for SQL server name (I do no know what to give, i
s
> it (local) or something) and how to login authenticate (with windows
> authentication or something). Now if I goto Services/SQl Server (SQLEXPRES
S)
> , click LogOn I see that 'Local System Account' is checked. Pls tell me ho
w
> to connect to this SQl server using System DSN connection wizard.
> By the way I am the administrator of this machine where I have instlled th
e
> SQl server...
> Thanks in advance,
> --
> Sanjib Saha|||You can access an User Instance once it is started by specifying the Named
Pipe name for the instance but if you haven't already started the user
instance with a managed code connection, ODBC won't start it. If your main
application is using ODBC, I would recommend attaching the database to the
main instance so it is always running and the ODBC connection can find it.
There is more information on named instances and how to connect to them
here:
http://msdn.microsoft.com/sql/expre...expuserinst.asp
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sanjib" <sanjib@.discussions.microsoft.com> wrote in message
news:2AB671B3-FEAD-49C9-A309-8DBF8BF07815@.microsoft.com...[vbcol=seagreen]
> Norman,
> There should be some way to connect to the SQl server 2005 Express user
> instance. I need to connect to this SQl server b'case one of my
> application
> is demandint that...There should be some way, tht we do not know...Anyway
> thanks...Someone pls guide me...
> Thanks,
> Sanjib
> --
> Sanjib Saha
>
> "sanjib" wrote:
>|||I agree with Roger.
If you HAVE to access the database on SQL Server Express via something other
than ADO.NET2.0's System.Data SqlClient namespace, why use User Instannce?
The whole point of using user instance is to limit the database setup/access
within current user's privilidge of access to the computer. If a user has to
use ODBC DSN Wizard, it may well requires the user has a bit more privilidge
that usual. Also, an user instance is not available to other user even the
other user uses the same computer.
"sanjib" <sanjib@.discussions.microsoft.com> wrote in message
news:2AB671B3-FEAD-49C9-A309-8DBF8BF07815@.microsoft.com...[vbcol=seagreen]
> Norman,
> There should be some way to connect to the SQl server 2005 Express user
> instance. I need to connect to this SQl server b'case one of my
> application
> is demandint that...There should be some way, tht we do not know...Anyway
> thanks...Someone pls guide me...
> Thanks,
> Sanjib
> --
> Sanjib Saha
>
> "sanjib" wrote:
>|||I think I may understand what you're asking now. You have two completely
unrelated elements in your posting. First you were able to use ADO.Net in
Visual Studio to create a database. This database was a user instance which
is why this came up in our answers. On a completely unrelated note you now
want to install a third party application that uses ODBC to connect to the
database.
Go into the Windows Control Panel and select Administrative Tools. One of
the tools is ODBC data sources. Select the System DSN or User DSN as
required for your application and click ADD. Select the SQL Native Client
Driver. Fill in a name which you get to choose (probably the application is
looking for a particular name), leave the description blank and put
.\SQLExpress in the server field. Select the defaults for the rest unless
you already know the database name you want to make your default database.
If not, the default will be "master".
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Norman Yuan" <NotReal@.NotReal.not> wrote in message
news:eQyQnkToGHA.956@.TK2MSFTNGP03.phx.gbl...
>I agree with Roger.
> If you HAVE to access the database on SQL Server Express via something
> other than ADO.NET2.0's System.Data SqlClient namespace, why use User
> Instannce? The whole point of using user instance is to limit the database
> setup/access within current user's privilidge of access to the computer.
> If a user has to use ODBC DSN Wizard, it may well requires the user has a
> bit more privilidge that usual. Also, an user instance is not available to
> other user even the other user uses the same computer.
>
> "sanjib" <sanjib@.discussions.microsoft.com> wrote in message
> news:2AB671B3-FEAD-49C9-A309-8DBF8BF07815@.microsoft.com...
>
How to connect to the June Katmai CTP?
Hi all,
I'm new to the Katmai SQL Server. I have just installed the June CTP x64 developer edition on a Win2003 Server AMD x64 bit. I installed everything. The install went fine.
My question:
How do I connect to the Katmai? There where no Management Studio in the install package.
The SQL Server 2005 Management Studio will not connect. It says that it can only connect to SQL 2000 or SQL 2005.
Best regards,
Lars-Inge
(Lars-Inge Tønnessen@.discussions.microsoft.com) writes: > I'm new to the Katmai SQL Server. I have just installed the June CTP x64 > developer edition on a Win2003 Server AMD x64 bit. I installed > everything. The install went fine. > > > > My question: > > How do I connect to the Katmai? There where no Management Studio in the > install package. There was in mine. Hm, I installed 32-bit. Could it be that tools are in the 32-bit distribution? (Tools are 32-bit anyway.) Also, look for a setup in the Tools directory if there is one. > The SQL Server 2005 Management Studio will not connect. It says that it > can only connect to SQL 2000 or SQL 2005. SQLCMD and OSQL works. And Query Analyzer from SQL 2000, if you have it around. -- Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx|||I also tried to install SQL 2008 on VPC for Orcas. I see only configuration tools.how to connect to ssis service - The RPC server is unavailable err
I am trying to connect to ssis service on remote machine using the sql 2005
management studio
I get the following error :
TITLE: Connect to Server
Cannot connect to <servername>.
Connect to SSIS Service on machine "<servername>" failed:
The RPC server is unavailable.
What do I miss please help
Best regards
Meron FridmanDid you figure out a solution ' I have the same problem
--
homebre
----
homebrew's Profile: http://www.dbtalk.net/m5
View this thread: http://www.dbtalk.net/t29008|||I've got the same problem in a two-node active/active environment.
Anyone got any further info?
"homebrew" wrote:
> Did you figure out a solution ' I have the same problem.
>
> --
> homebrew
> ---
> homebrew's Profile: http://www.dbtalk.net/m55
> View this thread: http://www.dbtalk.net/t290084
> .
>|||I found out that one of our developers (developer #1) wasn't having an
problems, and that he had used a different disk to install on hi
desktop. So then developer #2 used his disk, and her problem went away
I had already put in a call to Microsoft, and we tested my RPC port
and they seemed fine. So I think I got a bad disk ... perhaps som
file is corrupted ?
Then he had another utility for me to try, but I haven't bothered yet
since I'm pretty sure it's the disk, and not something on my desktop
--
homebre
----
homebrew's Profile: http://www.dbtalk.net/m5
View this thread: http://www.dbtalk.net/t29008sql
how to connect to ssis service - The RPC server is unavailable err
I am trying to connect to ssis service on remote machine using the sql 2005
management studio
I get the following error :
TITLE: Connect to Server
Cannot connect to <servername>.
Connect to SSIS Service on machine "<servername>" failed:
The RPC server is unavailable.
What do I miss please help
Best regards
Meron Fridman
Did you figure out a solution ? I have the same problem.
homebrew
homebrew's Profile: http://www.dbtalk.net/m55
View this thread: http://www.dbtalk.net/t290084
how to connect to ssis service - The RPC server is unavailable err
I am trying to connect to ssis service on remote machine using the sql 2005
management studio
I get the following error :
TITLE: Connect to Server
Cannot connect to <servername>.
Connect to SSIS Service on machine "<servername>" failed:
The RPC server is unavailable.
What do I miss please help
Best regards
Meron FridmanDid you figure out a solution ' I have the same problem.
homebrew
---
homebrew's Profile: http://www.dbtalk.net/m55
View this thread: http://www.dbtalk.net/t290084|||I found out that one of our developers (developer #1) wasn't having any
problems, and that he had used a different disk to install on his
desktop. So then developer #2 used his disk, and her problem went away.
I had already put in a call to Microsoft, and we tested my RPC ports
and they seemed fine. So I think I got a bad disk ... perhaps some
file is corrupted ?
Then he had another utility for me to try, but I haven't bothered yet,
since I'm pretty sure it's the disk, and not something on my desktop.
homebrew
---
homebrew's Profile: http://www.dbtalk.net/m55
View this thread: http://www.dbtalk.net/t290084
How to connect to sql server2005 from java using JDBC driver
I need to connect my java app to sql server 2005 using JDBC driver, but I don't know how to do.
Thanks for your help.
AdolfoWe currently have a beta2 driver availalbe for this now:
http://www.microsoft.com/sql/downloads/2005/jdbc.mspx
To connect:
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection conn = DriverManager.getConnection("jdbc:sqlserver://mysqlserver;user=myuser;password=mypassword;databaseName=mydataBase;");
|||
Ok. happen that I have installed the sqlserver 2005 beta 2, using windows authentication, so it needs a name instance to get access. When I use the JDBC driver I can't connect using that name instance.
regards,
Adolfo
|||The beta version of windows authentication has some known issues -- did you try connection to the named instance with SQL Server authentication?-shelby