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
Old Hand
Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)

Group: General Forum Members
Points: 341 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
SSCertifiable
SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)

Group: General Forum Members
Points: 7104 Visits: 4379
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
Old Hand
Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)

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

dirent server name wont work in tht right?
sgmunson
sgmunson
SSCertifiable
SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)

Group: General Forum Members
Points: 7104 Visits: 4379
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
Old Hand
Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)

Group: General Forum Members
Points: 341 Visits: 1125
ok thanks a ton for your help :-)
SQLisAwE5OmE
SQLisAwE5OmE
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1062 Visits: 3068
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
Old Hand
Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)Old Hand (341 reputation)

Group: General Forum Members
Points: 341 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