Thursday, March 29, 2012
Consoldating data across databases
Is there an easy way to "link" data from one SQL database to another, preferably within a view?
More specifically, can one "link" to data from 2 seperate databases to a 3rd without importing the data?
Thanks,
LeeSure, if they are on the same server then just use 3-part naming convention in your queries:
select t1.f2, t2.f2, t3.f2
from db1.dbo.t t1
inner join db2.dbo.t t2 on t1.f1=t2.f1
inner join db3.dbo.t t3 on t1.f1=t3.f1 and t2.f1=t3.f1
...and if on different servers then create linked servers and use 4-part naming convention by preceeding the database name with the alias of the server.|||Thanks so much! It was so easy that I am embarrased
Monday, March 19, 2012
ConnectionCheckForData((null)())?
I have 2 servers - Financial and Trilogy. Trilogy is a linked server on the Financial Database. It uses MSDASQL to link it. Now I have a insert trigger on one of the tables on the financial Database that inserts data to a table that resides on the trilogy database. A few days ago it was working fine. Any inserts into the financial table would insert data into the trilogy table, however now I get the following error when I try to an insert into the financial table....
Changed Language setting to Us_English
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionCheckForData((null)()).
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]General Network Error. Check your Network Documentation.
The only thing that has been done within these few days was a reboot of the trilogy server.
Also when I remove this trigger and do an insert into the financial table it works fine, so I unsure whether this error occurs due to ODBC or MSDTC?? Can anyone help with this?? And what causes this error and how do I go about fixing it??
Thanks
AnthonyThis sounds like a known issue. Please see article for info.
http://support.microsoft.com/?id=317852
Thursday, March 8, 2012
Connection to sql server 2000
webpage for user to use as front end application ? Pls advise. Thanks
Rgds
DanielYou have to do some coding in the coding language of your choice.
-jens Suessmeyer.|||What language/ platform are you using?
--
Jack Vamvas
__________________________________________________ ________________
Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
New article by Jack Vamvas - SQL and Markov Chains -
www.ciquery.com/articles/art_04.asp
<Danieltbt05@.gmail.com> wrote in message
news:1138725750.293962.191770@.g49g2000cwa.googlegr oups.com...
> Hi, I've created database in sql server 2000 but how to i link it to
> webpage for user to use as front end application ? Pls advise. Thanks
> Rgds
> Daniel|||Now using SQL Server 2000 on win2003 and using QA/enterprise manager
to connect in intranet now. Is it normal for user to connect to sql
server using QA or enterprise manager ? I mean do you consider it user
friendly ? So i intend to design it to become a webpage for end user to
view the data. I've been using DAO or ADO quite some time ago. is it ok
? what abt ODBC ? what do you recommend ? pls advise. thanks
Rgds
Daniel
Jack Vamvas wrote:
> What language/ platform are you using?
> --
> Jack Vamvas
> __________________________________________________ ________________
> Receive free SQL tips - register at www.ciquery.com/sqlserver.htm
> SQL Server Performance Audit - check www.ciquery.com/sqlserver_audit.htm
> New article by Jack Vamvas - SQL and Markov Chains -
> www.ciquery.com/articles/art_04.asp
> <Danieltbt05@.gmail.com> wrote in message
> news:1138725750.293962.191770@.g49g2000cwa.googlegr oups.com...
> > Hi, I've created database in sql server 2000 but how to i link it to
> > webpage for user to use as front end application ? Pls advise. Thanks
> > Rgds
> > Daniel|||ya correct but i not sure which language should i use. ADO, DAO or ODBC
? pls advise. Thanks|||(Danieltbt05@.gmail.com) writes:
> Now using SQL Server 2000 on win2003 and using QA/enterprise manager
> to connect in intranet now. Is it normal for user to connect to sql
> server using QA or enterprise manager ? I mean do you consider it user
> friendly ? So i intend to design it to become a webpage for end user to
> view the data. I've been using DAO or ADO quite some time ago. is it ok
> ? what abt ODBC ? what do you recommend ? pls advise. thanks
End-users normally don't use tools like Query Analyzer or Enterprise
Manager, but rather they access the database through an application
or a web page.
If I understand things right, you are looking into the latter. There
are several tools on the market: ASP, ASP .Net, Cold Fusion, and
probably more. I don't know any of them myself. Once you've chosen
a tool for your web site, then you have more or less also settled on
a client API. For ASP that would be ADO, for ASP .Net that would
be ADO .Net. (Which is very different from ADO, and also a lot better.)
I don't know if DAO can connect to SQL Server, but anyway that's really
old stuff that you should not use.
Sorry if the answer is not crystal clear, but this is not really the
best newsgrop to ask questions about building a web site.
--
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|||Erland, if i want to build it into like VB do i have to use ASP or
others tools u mentioned ? Only ADO.net can be used in webpage ? DAO or
ADO cannot be used ? Anywhere can learn step by step of it whether
build into VB app. or webpage ? Thanks
Rgds
Daniel|||(Danieltbt05@.gmail.com) writes:
> Erland, if i want to build it into like VB do i have to use ASP or
> others tools u mentioned ? Only ADO.net can be used in webpage ? DAO or
> ADO cannot be used ? Anywhere can learn step by step of it whether
> build into VB app. or webpage ? Thanks
As I said, this is not really the right place to ask question on how to
build web pages.
But, no, ADO .Net is not sufficient. ADO .Net - as well as ADO and DAO - is
a client API for access data sources. For building a web site, you can
use ASP. Net or ASP. I believe that they use some variation of VB script,
but exactly what this ASP thing is, I'm quite in the dark myself. I would
recommend you to look for newsgroups with "aspnet" in the name.
--
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
Wednesday, March 7, 2012
Connection to an iSeries (AS/400) DB
Can someone tell me if there is a way to link an MS SQL Database to a table
on an iSeries server? There's some data I would like to read from a DB2
server, but I'm not sure how to access it through a Windows 2000 system.
Can MS SQL Server link tables like MS Access?
If not, can someone suggest how I could access the data from an ASP page?
I'm having trouble writing a DSN-less connection to a DB2 server, but I have
one to an MSSQL server. If I could link to the DB2 table, I could use my
DSN-less code for the MSSQL server.
Thanks,
Brian.
Install Client Access on the SQL Server box and then you can create a
linked server to the AS400. Linked servers are a bit similar to linked
tables in that they allow you access to an external data source. You
don't access them as if they are local tables as you can with linked
tables in Access. You can find more information on linked servers in
books online.
When configuring the linked server, for data source use the IP address
of the AS400. For provider string, you need to include the library you
are using, connect timeout setting and code page. There is some
documentation for the settings in the Client Access help files. You'd
set the provider string somewhat like:
InitCat=YourLibrary;CCSID=37;PCCodePage=1252;
Data Source=xxx.xxx.xxx.xxx
Settings will depend on how your AS400 is configured. Again,
the Client Access help files have information on the necessary
connection string settings but the above info should help get you
going.
-Sue
On Wed, 6 Oct 2004 12:42:08 -0400, "Brian Piotrowski"
<bpiotrowski@.NOSPAM.simcoeparts.com> wrote:
>Hi All,
>Can someone tell me if there is a way to link an MS SQL Database to a table
>on an iSeries server? There's some data I would like to read from a DB2
>server, but I'm not sure how to access it through a Windows 2000 system.
>Can MS SQL Server link tables like MS Access?
>If not, can someone suggest how I could access the data from an ASP page?
>I'm having trouble writing a DSN-less connection to a DB2 server, but I have
>one to an MSSQL server. If I could link to the DB2 table, I could use my
>DSN-less code for the MSSQL server.
>Thanks,
>Brian.
>