Thursday, March 8, 2012
.NET Data Adapter not taking Alias added in ClientNetwork Utility
I am in Administrators and hence was able to add the ALias.
Alias Name : MyDatabase
Protocols Enabled : Named Pipes, TCP/IP.
Protocol for Alias : tried both Tcp/ip and Named Pipes
Server : MyServer
From query analyser if I try to open "MyDatabase" it opens the server
From .NET Windows Server, I give it in connection string - it doesnt take
it.
Note : this is not working only on this server. Another similarly configured
server, takes this.
Any Help is much appreciated.
Gan
--
Ganesan Subramanian
Microsoft Technologies and SolutionsI wasn't aware that .NET would even look at the client network utility. Are
you sure that's in its list of things to check (especially considering that
SQL Server / client network utility is not always going to be installed
where .NET is installed)? I thought for most applications it was HOSTS,
then WINS, then DNS... and SQL Server uses the client network utility on its
own?
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Ganesan Subramanian" <gansub@.hotmail.com> wrote in message
news:eODEacVREHA.4048@.TK2MSFTNGP10.phx.gbl...
>I added an alias in Client Network Utility. (cliconfg.exe).
> I am in Administrators and hence was able to add the ALias.
> Alias Name : MyDatabase
> Protocols Enabled : Named Pipes, TCP/IP.
> Protocol for Alias : tried both Tcp/ip and Named Pipes
> Server : MyServer
> From query analyser if I try to open "MyDatabase" it opens the server
> From .NET Windows Server, I give it in connection string - it doesnt take
> it.
> Note : this is not working only on this server. Another similarly
> configured
> server, takes this.
> Any Help is much appreciated.
> Gan
> --
> Ganesan Subramanian
> Microsoft Technologies and Solutions
>
>|||It was .NET SQL Data adapter for SQL Server.
This was working on another similar box.
I gave "MyDatabase" for datasource in connection string and it was working.
Any idea what setting should be set on to get this working?
Gan
--
Ganesan Subramanian
Microsoft Technologies and Solutions
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
news:OF#DNObREHA.4020@.TK2MSFTNGP11.phx.gbl...
> I wasn't aware that .NET would even look at the client network utility.
Are
> you sure that's in its list of things to check (especially considering
that
> SQL Server / client network utility is not always going to be installed
> where .NET is installed)? I thought for most applications it was HOSTS,
> then WINS, then DNS... and SQL Server uses the client network utility on
its
> own?
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
> "Ganesan Subramanian" <gansub@.hotmail.com> wrote in message
> news:eODEacVREHA.4048@.TK2MSFTNGP10.phx.gbl...
> >I added an alias in Client Network Utility. (cliconfg.exe).
> > I am in Administrators and hence was able to add the ALias.
> >
> > Alias Name : MyDatabase
> > Protocols Enabled : Named Pipes, TCP/IP.
> > Protocol for Alias : tried both Tcp/ip and Named Pipes
> > Server : MyServer
> >
> > From query analyser if I try to open "MyDatabase" it opens the server
> >
> > From .NET Windows Server, I give it in connection string - it doesnt
take
> > it.
> >
> > Note : this is not working only on this server. Another similarly
> > configured
> > server, takes this.
> >
> > Any Help is much appreciated.
> >
> > Gan
> >
> > --
> > Ganesan Subramanian
> > Microsoft Technologies and Solutions
> >
> >
> >
>|||This is nothing more than name resolution issue. When you use cliconfg.exe
and entry is added to:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo]
which should be enumerated by ADO/.Net. Check to see if the running user has
access to read the registry.
-oj
http://www.rac4sql.net
"Ganesan Subramanian" <gansub@.hotmail.com> wrote in message
news:%23GnrrNgREHA.2876@.TK2MSFTNGP09.phx.gbl...
> It was .NET SQL Data adapter for SQL Server.
> This was working on another similar box.
> I gave "MyDatabase" for datasource in connection string and it was
working.
> Any idea what setting should be set on to get this working?
> Gan
> --
> Ganesan Subramanian
> Microsoft Technologies and Solutions
>
> "Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
> news:OF#DNObREHA.4020@.TK2MSFTNGP11.phx.gbl...
> > I wasn't aware that .NET would even look at the client network utility.
> Are
> > you sure that's in its list of things to check (especially considering
> that
> > SQL Server / client network utility is not always going to be installed
> > where .NET is installed)? I thought for most applications it was HOSTS,
> > then WINS, then DNS... and SQL Server uses the client network utility on
> its
> > own?
> >
> > --
> > Aaron Bertrand
> > SQL Server MVP
> > http://www.aspfaq.com/
> >
> >
> >
> >
> >
> > "Ganesan Subramanian" <gansub@.hotmail.com> wrote in message
> > news:eODEacVREHA.4048@.TK2MSFTNGP10.phx.gbl...
> > >I added an alias in Client Network Utility. (cliconfg.exe).
> > > I am in Administrators and hence was able to add the ALias.
> > >
> > > Alias Name : MyDatabase
> > > Protocols Enabled : Named Pipes, TCP/IP.
> > > Protocol for Alias : tried both Tcp/ip and Named Pipes
> > > Server : MyServer
> > >
> > > From query analyser if I try to open "MyDatabase" it opens the server
> > >
> > > From .NET Windows Server, I give it in connection string - it doesnt
> take
> > > it.
> > >
> > > Note : this is not working only on this server. Another similarly
> > > configured
> > > server, takes this.
> > >
> > > Any Help is much appreciated.
> > >
> > > Gan
> > >
> > > --
> > > Ganesan Subramanian
> > > Microsoft Technologies and Solutions
> > >
> > >
> > >
> >
> >
>|||Hi Group
Anyone had this issue before. I am eager to get an answer for this.
--
Ganesan Subramanian
Microsoft Technologies and Solutions
"Ganesan Subramanian" <gansub@.hotmail.com> wrote in message
news:#GnrrNgREHA.2876@.TK2MSFTNGP09.phx.gbl...
> It was .NET SQL Data adapter for SQL Server.
> This was working on another similar box.
> I gave "MyDatabase" for datasource in connection string and it was
working.
> Any idea what setting should be set on to get this working?
> Gan
> --
> Ganesan Subramanian
> Microsoft Technologies and Solutions
>
> "Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
> news:OF#DNObREHA.4020@.TK2MSFTNGP11.phx.gbl...
> > I wasn't aware that .NET would even look at the client network utility.
> Are
> > you sure that's in its list of things to check (especially considering
> that
> > SQL Server / client network utility is not always going to be installed
> > where .NET is installed)? I thought for most applications it was HOSTS,
> > then WINS, then DNS... and SQL Server uses the client network utility on
> its
> > own?
> >
> > --
> > Aaron Bertrand
> > SQL Server MVP
> > http://www.aspfaq.com/
> >
> >
> >
> >
> >
> > "Ganesan Subramanian" <gansub@.hotmail.com> wrote in message
> > news:eODEacVREHA.4048@.TK2MSFTNGP10.phx.gbl...
> > >I added an alias in Client Network Utility. (cliconfg.exe).
> > > I am in Administrators and hence was able to add the ALias.
> > >
> > > Alias Name : MyDatabase
> > > Protocols Enabled : Named Pipes, TCP/IP.
> > > Protocol for Alias : tried both Tcp/ip and Named Pipes
> > > Server : MyServer
> > >
> > > From query analyser if I try to open "MyDatabase" it opens the server
> > >
> > > From .NET Windows Server, I give it in connection string - it doesnt
> take
> > > it.
> > >
> > > Note : this is not working only on this server. Another similarly
> > > configured
> > > server, takes this.
> > >
> > > Any Help is much appreciated.
> > >
> > > Gan
> > >
> > > --
> > > Ganesan Subramanian
> > > Microsoft Technologies and Solutions
> > >
> > >
> > >
> >
> >
>
.NET Data Adapter not taking Alias added in ClientNetwork Utility
I am in Administrators and hence was able to add the ALias.
Alias Name : MyDatabase
Protocols Enabled : Named Pipes, TCP/IP.
Protocol for Alias : tried both Tcp/ip and Named Pipes
Server : MyServer
From query analyser if I try to open "MyDatabase" it opens the server
From .NET Windows Server, I give it in connection string - it doesnt take
it.
Note : this is not working only on this server. Another similarly configured
server, takes this.
Any Help is much appreciated.
Gan
Ganesan Subramanian
Microsoft Technologies and Solutions
I wasn't aware that .NET would even look at the client network utility. Are
you sure that's in its list of things to check (especially considering that
SQL Server / client network utility is not always going to be installed
where .NET is installed)? I thought for most applications it was HOSTS,
then WINS, then DNS... and SQL Server uses the client network utility on its
own?
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Ganesan Subramanian" <gansub@.hotmail.com> wrote in message
news:eODEacVREHA.4048@.TK2MSFTNGP10.phx.gbl...
>I added an alias in Client Network Utility. (cliconfg.exe).
> I am in Administrators and hence was able to add the ALias.
> Alias Name : MyDatabase
> Protocols Enabled : Named Pipes, TCP/IP.
> Protocol for Alias : tried both Tcp/ip and Named Pipes
> Server : MyServer
> From query analyser if I try to open "MyDatabase" it opens the server
> From .NET Windows Server, I give it in connection string - it doesnt take
> it.
> Note : this is not working only on this server. Another similarly
> configured
> server, takes this.
> Any Help is much appreciated.
> Gan
> --
> Ganesan Subramanian
> Microsoft Technologies and Solutions
>
>
|||It was .NET SQL Data adapter for SQL Server.
This was working on another similar box.
I gave "MyDatabase" for datasource in connection string and it was working.
Any idea what setting should be set on to get this working?
Gan
Ganesan Subramanian
Microsoft Technologies and Solutions
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
news:OF#DNObREHA.4020@.TK2MSFTNGP11.phx.gbl...
> I wasn't aware that .NET would even look at the client network utility.
Are
> you sure that's in its list of things to check (especially considering
that
> SQL Server / client network utility is not always going to be installed
> where .NET is installed)? I thought for most applications it was HOSTS,
> then WINS, then DNS... and SQL Server uses the client network utility on
its[vbcol=seagreen]
> own?
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
> "Ganesan Subramanian" <gansub@.hotmail.com> wrote in message
> news:eODEacVREHA.4048@.TK2MSFTNGP10.phx.gbl...
take
>
|||This is nothing more than name resolution issue. When you use cliconfg.exe
and entry is added to:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer \Client\ConnectTo]
which should be enumerated by ADO/.Net. Check to see if the running user has
access to read the registry.
-oj
http://www.rac4sql.net
"Ganesan Subramanian" <gansub@.hotmail.com> wrote in message
news:%23GnrrNgREHA.2876@.TK2MSFTNGP09.phx.gbl...
> It was .NET SQL Data adapter for SQL Server.
> This was working on another similar box.
> I gave "MyDatabase" for datasource in connection string and it was
working.
> Any idea what setting should be set on to get this working?
> Gan
> --
> Ganesan Subramanian
> Microsoft Technologies and Solutions
>
> "Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
> news:OF#DNObREHA.4020@.TK2MSFTNGP11.phx.gbl...
> Are
> that
> its
> take
>
|||Hi Group
Anyone had this issue before. I am eager to get an answer for this.
Ganesan Subramanian
Microsoft Technologies and Solutions
"Ganesan Subramanian" <gansub@.hotmail.com> wrote in message
news:#GnrrNgREHA.2876@.TK2MSFTNGP09.phx.gbl...
> It was .NET SQL Data adapter for SQL Server.
> This was working on another similar box.
> I gave "MyDatabase" for datasource in connection string and it was
working.
> Any idea what setting should be set on to get this working?
> Gan
> --
> Ganesan Subramanian
> Microsoft Technologies and Solutions
>
> "Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
> news:OF#DNObREHA.4020@.TK2MSFTNGP11.phx.gbl...
> Are
> that
> its
> take
>
Tuesday, March 6, 2012
.NET assembly for BULK INSERT
Is there any .NET package/module/assembly for BCPing the data into SQL
Server.
The BULK INSERT utility works fine, but we are kind of worried on
placing the data.
If there is any utility to build the data into a data structure and BCP
in into the SQL Server, please let know. It would be of great use.
Let know if I should post this elsewhere
Regards,
ThyaguThyagu (tdelli@.gmail.com) writes:
Quote:
Originally Posted by
Is there any .NET package/module/assembly for BCPing the data into SQL
Server.
The BULK INSERT utility works fine, but we are kind of worried on
placing the data.
>
If there is any utility to build the data into a data structure and BCP
in into the SQL Server, please let know. It would be of great use.
SqlClient has classes for bulk-copying. I have not used it, but a quick
look in MSDN Library telles me that you write from a datarow.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||To add to Erland's response, the SqlBulkCopy class was introduced with .Net
Framework 2.0 (VS 2005 et. al.). SqlBulkCopy includes a WriteToServer
method that allows you to pass a DataTable, DataRow array or IDataReader.
The ColumnMappings property specifies the mappings between source and
destination columns.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Thyagu" <tdelli@.gmail.comwrote in message
news:1157727628.683912.128730@.b28g2000cwb.googlegr oups.com...
Quote:
Originally Posted by
Hi,
>
Is there any .NET package/module/assembly for BCPing the data into SQL
Server.
The BULK INSERT utility works fine, but we are kind of worried on
placing the data.
>
If there is any utility to build the data into a data structure and BCP
in into the SQL Server, please let know. It would be of great use.
>
Let know if I should post this elsewhere
>
Regards,
Thyagu
>
>
Regards,
Thyagu.
Dan Guzman wrote:
Quote:
Originally Posted by
To add to Erland's response, the SqlBulkCopy class was introduced with .Net
Framework 2.0 (VS 2005 et. al.). SqlBulkCopy includes a WriteToServer
method that allows you to pass a DataTable, DataRow array or IDataReader.
The ColumnMappings property specifies the mappings between source and
destination columns.
>
--
Hope this helps.
>
Dan Guzman
SQL Server MVP
>
"Thyagu" <tdelli@.gmail.comwrote in message
news:1157727628.683912.128730@.b28g2000cwb.googlegr oups.com...
Quote:
Originally Posted by
Hi,
Is there any .NET package/module/assembly for BCPing the data into SQL
Server.
The BULK INSERT utility works fine, but we are kind of worried on
placing the data.
If there is any utility to build the data into a data structure and BCP
in into the SQL Server, please let know. It would be of great use.
Let know if I should post this elsewhere
Regards,
Thyagu