SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Access table from different instance


Access table from different instance

Author
Message
Zeal-DBA
Zeal-DBA
SSC Eights!
SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)

Group: General Forum Members
Points: 813 Visits: 1125
hello experts,
i want to write a select query which will access table from different instance, but cant create linked server on tht server bcos thts a production server.

please advice

thanks
sgmunson
sgmunson
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16801 Visits: 4634
Not sure if using OPENROWSET would help. Might depend on security settings. Look it up in Books Online (aka BOL) and see if that will work...

Steve
‌(aka sgmunson)
Smile Smile Smile
Health & Nutrition
Zeal-DBA
Zeal-DBA
SSC Eights!
SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)

Group: General Forum Members
Points: 813 Visits: 1125
i believe openrowset still require linked server name to pass.

dirent server name wont work in tht right?
sgmunson
sgmunson
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16801 Visits: 4634
That's why I suggested you look at BOL, as I can't recall the exact syntax, but I do know that OPENQUERY has to have a LINKED SERVER NAME, while OPENROWSET uses a connection string. I just don't know if using OPENROWSET can be locked down so that no temporary linked servers can be created via OPENROWSET.

Steve
‌(aka sgmunson)
Smile Smile Smile
Health & Nutrition
Zeal-DBA
Zeal-DBA
SSC Eights!
SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)

Group: General Forum Members
Points: 813 Visits: 1125
ok thanks a ton for your help :-)
SQLisAwE5OmE
SQLisAwE5OmE
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2962 Visits: 3075
Zeal-DBA (12/14/2012)
ok thanks a ton for your help :-)


Did openrowset works for you?....I am curious.

SueTons.

Regards,
SQLisAwe5oMe.
Zeal-DBA
Zeal-DBA
SSC Eights!
SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)SSC Eights! (813 reputation)

Group: General Forum Members
Points: 813 Visits: 1125
yeah OPENROWSET works, it requires connection string, it does'nt require linked server to configure, but "ad hoc distributed queries" should be enabled through sp_configure.....

thank you so much
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search