I have two sql database at different PC.how can link b/w
database and database tables.
Answers were Sorted based on User's Feedback
Answer / meenakshi
we can link database If both the DBs are on same Server and
the current user have access permission on both database
then you can use the following query..
Select SomeColumns From CurrentDBName..TableName
Select SomeColumns From OtherDBName..TableName
If the databases are on different Server then you have to
use the Linked Server..
EXEC sp_addlinkedserver @server = 'SERVER', @provider
= 'SQLOLEDB.1', @srvproduct = '', @provstr
= 'Privider=SQLOLEDB.1;Data Source=TargetServer;Initial
Catalog=Database'
go
Exec sp_addlinkedsrvlogin @rmtsrvname = 'SERVER', @useself
= true, @locallogin = null, @rmtuser = 'Userid',
@rmtpassword = 'Password'
On your SP you can use..
Select * From OpenQuery(MyRemoteServer, 'Select * From
Sysobjects')
--OR
Select * From MyRemoteServer.DatabaseName.dbo.Sysobjects
| Is This Answer Correct ? | 9 Yes | 4 No |
Answer / anil
You can also use curl function for use defferent database
| Is This Answer Correct ? | 1 Yes | 0 No |
Can u give the example by taking an unnormalized table and make that 1nf and then 25nf, and then 3 nf?
How can you add and remove any column of a table?
How to create trigger in mysql workbench?
What is difference between Sql server and MySql database? It may be silly question but i really dont know.
Consider a scenario where you have to send an email to a client from the sql database. How do you think you can achieve this task?
Is mysql a free database?
How do you flush privileges?
What is max_used_connections in mysql?
How to get data from mysql in php?
What is RMS Migrations
In which language it is written?
What do you understand by mysql terminal?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)