Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
what are the differences when query from remote server using these
Select count(*) from SERVER1.dbTest.dbo.tableA
Select count(*) from [SERVER1\USERTEST].DB1.dbo.TABLE_A
If i connect to database SERVER1 with using sa account, and create a new user newUser,can I reconnect to the database as newUser, and query in this way?
Select count(*) from [SERVER1\newUser].DB1.dbo.TABLE_A
juicyapple
Posting Yak Master
176 Posts
Posted - 2008-01-25 : 04:34:41
Just get confirmed that USERTEST is actually referring to named instance....Select count(*) from [SERVER1\USERTEST].DB1.dbo.TABLE_ABut I have another problem for the query in asp.net and get error msg 'no table found...'. DATABASE1 is running on default instance.
SELECT COUNT(*) FROM SERVER1.DATABASE1.dbo.tbl_User WHERE UserID = 'ADM' and Password = 1234
Please help!!
jackv
Master Smack Fu Yak Hacker
2179 Posts
Posted - 2008-01-25 : 10:13:03
Is the server1b set up as a linked server?Jack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com
sodeep
Master Smack Fu Yak Hacker
7174 Posts
Posted - 2008-01-25 : 11:43:22
Set up as a linked server with the userand type following query:SELECT COUNT(*) FROM [SERVER1\USERTEST].DATABASE1.DBO.tbl_User WHERE UserID = 'ADM' and Password = 1234