Help needed in sqlservers connection

Hi,
I have two database in different servers and i need to access one db object in another db. for ex, server1 (db1) and server2(db2(tableA,tableB) )
I will be writing a stored procedure in in db1 and i wanted to access the TableA's data of db2. i am aware of using the linked server. but i am, looking for alternate for linked server because i need to pass credentials at runtime to connect the server and
access the objects. 
Ex: 
Create Procedure Test(@server varchar(50),@username varchar(20), @pwd varchar(20))
as
Begin
select * from server2.db2.tableA;
End
the alternate i found is OpenQuery. not sure how should i accomplish using openquery and am not sure about the drawback of using this. please suggest me the best way to achieve this and if possible show me some sample.
Thanks in advance
loving dotnet

Hi ,
yes i could create proc on server2.
Thanks for your reply. I will not be using this mechanism often. also i am informed to use non linked server that's why i started to do the research. Finally i tried with open Rowset and i am able to acheive with concern. My concern is , i tried in my local
database and for just returning 4 rows it took 00:00:01 by means 1 second which is bad. because my table has only 4 rows. so to return 4 rows it should not take 1 second. any suggestion please
My code:
declare @sql nvarchar(max)
select @sql = 'select a.* from openrowset(''MSDASQL'', ''Driver={SQL SERVER}; Server=testserver;UID=sa; PWD=loginpwd;'', ''select * from [sample].dbo.Company'') as a'
exec sp_executeSQL @sql
any suggestion please
loving dotnet

Similar Messages

  • HELP NEEDED.  Cannot connect to Music Store.

    After upgrading to iTunes 6 I have been unable to connect to the Music Store or download any tracks. Its not my Norton Internet Security and my Windows Firewall is off. In fact, nothing has changed on my PC apart from upgrading iTunes, at which point everything went wrong!!
    I've tried uninstalling and re-installing numerous times, restoring my PC to an earlier time when all was well and I've also tried installing standalone Quicktime from the Apple website, but every time I get an error message saying that some of the files are corrupt and to install it again, which I do, then I get the same message.
    In desperation I managed to re-install my previous version of iTunes 5 (with which I had absolutely no problems at all) but unfortunately I still can't connect to the Music Store or download any tracks, so basically there is no point in me using the iPod or iTunes at all.
    If anyone knows how I can solve this problem I'd be really grateful for some input.
    Thanks.
    Bec
    eMachines 420   Windows XP  

    .
    I'm getting the same error message when i connect my linksys router. With the router connected I can get on the internet just fine. Thw problem is that music store in iTunes is refused. I can access the music store if i connect the modem directly to my PC. This leads me to believe the internal firewall in the router needs to be configured to allow iTunes to connect to the music store. If any one knows how to do this that would be great. I think it would also help a lot of other people having this as well   Windows XP   </span<br>
      Windows XP  

  • Help needed:MBP net connection slow on OSX but fast on Vista...

    Ok..I've searched these forums for a while, seen lots of posts taking about people having problems with their airport card, routers and the like..but I haven't seen anyone having quite the same problem as me. My 17" 2.33Ghz C2D is linked to my 1Mb ADSL internet connection via an Aztech DSL600EW modem router.The problem is that the connection speed is really slow when I'm running the machine on OSX. I know it's an OSX thing cos the same machine,connected to the same router and running Windows Vista via Bootcamp will connect to the net ALOT faster. For example, if I'm viewing videos on youtube with OSX, I have to wait every few seconds for the video to buffer, but on Vista, the buffering is way ahead of the video. Another example would be downloading files...say from rapidshare. The typical download speed I get on OSX would be around 5-10Kbps, but with Vista, I get at least 25Kbps.
    I'm quite new to OSX, and still trying to learn my way around the operating system. It seems such a pity for a really great machine with a really great operating system to be let down by slow internet connection. I hope someone out there will be able to help me sort this out. Thanks in advance.

    Great, happy that it "seems to speed up things ..." Why not run the SpeedTest and "know?"
    I use IPNetTuner ($30, free 21 day trial).
    http://www.sustworks.com/site/prodiptxoverview.html
    "*Why is it Sometimes Necessary To Tune TCP/IP*?
    TCP/IP is not controlled by any manufacturer and is designed to work on almost any kind of underlying network with widely varying characteristics.
    To meet this challenge, the protocol designers made TCP adaptive. TCP is self monitoring and optimizes its own behavior to match the network environment.
    *Why can't somebody just write a utility that analyzes my network and automatically selects the optimum settings?* Such a tool would be both useful and popular. The answer is they already have, it's called TCP/IP, but sometimes it needs a little help.
    In most cases, TCP works remarkably well all by itself. Tuning is needed in those cases where TCP doesn't quite get it right because the the network behavior is outside the expected range. Typical problems include:
    Asymmetric connections that are much faster downstream than upstream.
    High performance connections with relatively long latency ..."

  • Help Needed in establishing connection between Kepware OPC server and UDS 4

    Hi All,
    I am in the process of establishing connection between Kepware OPC server and UDS 4.0,
    Can anyone guide me through the process of configuring UDS 4.0 to establish conection with the Kepware.
    Any standard documentation on UDS 4.0 will be of great help.
    Thanks in advance,
    Shyam

    HI Rajesh,
    I am creating OPC DA instance and when i try to browse for the OPC servers available in the machine, the list is blank. i am not able to view any OPC servers.
    Actuallt the Kepware OPC server and UDS are installed in the same machine.
    Can you plz through some ligh on this
    Regards,
    SHyam

  • Trade show magic interactive help needed with adobe connect 8

    Please see my website http://www.magicduncan.co.uk - I am a trade show magician as per my website and was wondering if this can be incorporated into my site to create a webinar presentation? Can I do screen sharing using adobe connect 8 as this is one of the things I am exploring for a live trade show magic show based around technology.
    Can anyone recommend any indepth tutorials regarding how to tame this mammoth but amazing new tool from adobe?!
    Many thanks for your help in advance.

    Moved to InDesign forum.
    When you export you will note that you export an Adobe PDF. There's a reason for that.
    Mac Preview is fine for a plain vanilla PDF but it ends there.
    Bob

  • Help needed for WiFi connection problem

    Hello
    My wife's iPad2 with current iOS 8.3 sometimes will not connect to Wi-Fi - any ideas on how to correct the problem?
    It's inconsistent! 
    Thanks for any thoughts about this.
    David

    If you want to do this in sql you've to use dynamic sql to select only columns having the data.
    And you can always use end user tools like SSRS to display only columns having values by using expression for visibility property.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
    Visakh16-
                    Can you please help me on how can I achieve this using SSRS. 
    Thanks.
    Hi Mutali,
    Personally, I don't recommend using SSRS.
    If you want to design a SSRS report,you should retireve all columns and specify column visibility for each column with following expression.
    =IIF(Fields!SomeFieldValue.Value > 0, True, False)  (Note:Supposing the data type of the field is INT).
    You can refer to the solution as
    Jingyang Li post above.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Help needed with internet connection

    i just but 875p neo and every thing work until i tried connecting on the net driver is install corectly and installed the software of my internet provider and nothingtried everything and theres also 2.0 usb port that does not work can anyone help me,

    Did you do a Clean install of your Operating System, or did you put the Hard drive in from another Motherboard?......Also It will help us to help you if you POST your Complete Sytem Specifacations (Create a Signature with your Forum Control Panel)....I ask this because it is hard to help if we only know what Motherboard you have ...........Sean REILLY875

  • Help needed on Bluetooth connection

    Hey, is there a way to maintain bluetooth connection and check that the bluetooth connection is still active.

    any help would be appreciated, thanks.

  • Help needed understanding this connection

    I am trying to follow some previous written code to understand JDBC better. When i have previously connected to a database, i have created a connection and then called it up when needed. In this code i have found though, they seem to use somthing called a datasource?
    public static Connection getXADBConnection() { Connection conn = null; DataSource ds = null; try { Object obj = lookup(MovieConstants.MOVIE_XA_DATASOURCE_NAME); ds = (DataSource) narrow(obj, DataSource.class); conn = ds.getConnection(); } catch (SQLException ex) { throw new DAORuntimeException(ex); } return conn; }
    So is datasource a connection already provided?? If so, is it better to use a datasource or to register through a driver manager? Also, if its not too much to ask, i am struggling to understand the first two lines in the try loop, what exactly is this doing?
    cheers

    nick2price wrote:
    ...try loop...Unless that was a typo, I think you should put off learning JDBC for a while and start with the basics.
    Start here:
    [http://java.sun.com/docs/books/tutorial/]

  • Help Needed in AD Connection form Java Code

    Hi,
    I want to connect to AD target form my java program.
    We are doing this as we don't want to use the OOTB Connectors.
    How can any one connect to AD target from Java program?
    After connecting,
    How to Create a User in AD? Is there any API? Which one?
    Regards,
    SK

    You'll want to do a search on JNDI and Java code. There are lots of sample code available on the web and tutorials. Here's a list of the classes you'll probably be using:
    import javax.naming.CommunicationException;
    import javax.naming.Context;
    import javax.naming.NameNotFoundException;
    import javax.naming.NamingEnumeration;
    import javax.naming.NamingException;
    import javax.naming.OperationNotSupportedException;
    import javax.naming.directory.Attribute;
    import javax.naming.directory.Attributes;
    import javax.naming.directory.BasicAttribute;
    import javax.naming.directory.BasicAttributes;
    import javax.naming.directory.DirContext;
    import javax.naming.directory.InitialDirContext;
    import javax.naming.directory.ModificationItem;
    import javax.naming.directory.SearchControls;
    import javax.naming.directory.SearchResult;
    -Kevin

  • Help needed on Unity Connection

    I'm setting up a new branch office with CUCM and Unity connection in HQ and h323 GW in branch office.  The phones are registered with HQ CUCM and everything works fine.  The issue is with Unity Connection.  I followed exactly how other remote site is setup.  However, when I dialed the new remote office, it rings and it goes to our company main greetings not their individual voice mail box.  On the CUCM side, I created VM pilot and VM profile for a new office along with calling search space, partition.  And, assigned all new DNs to a new VM profile.  Any suggestion?  I'm very new to Unity Connection.
    Thanks. 

    Hi Peter
    How is your CUCM integrated with Unity Connection ? By VM Ports or Sip Trunk ?
    Regards
    Aditya Gupta

  • Help needed Iphone 4 connection problems in windows 7

    Device Manager in Windows 7 does not recognize iPhone 4 iOS 4.3.3 whether in normal mode or in recovery mode and not in DFU mode,  but my second iPhone 4S is recognized immediately. I do not understand.

    I would try another computer to verify if the iphones connector is damaged and thats why it dont connect

  • It says it needs to be connected to itunes and restored.  when i do that, it goes through the whole process then comes up with "iphone could not be restored. unknown error code (-1)".  Please help

    My brother gave me his old iphone when the touch screen went out on mine.  It's in great shape but when I received it, it says that it needs to be connected to itunes to be restored.  I have done this and it goes through the whole process then says iphone "iphone" could not be restored.  unknown error code (-1).  There is not a -1 code on the list and I have tried most of the suggestions.
    Does my sim card need to be in when I am doing this?  And any other suggestions?

    I did put it in DFU mode but its still not working, although everytime it shows your iphone needs to be restored. Kindly help.

  • Help needed in connecting a Mac Mini to AT&T DSL

    Any suggestions on how to troubleshoot this problem will be appreciated. I'm helping a friend connect a Mac to the Internet using AT&T DSL. The computer is a Mac Mini, 1.42 GHz PPC G4, running OS X 10.5. It is connected by Ethernet to an AT&T DSL modem. The Mini's Network preference is configured to connect using DHCP.
    Strange symptoms include:
    1. Safari will not connect to the Internet.
    2. However, Firefox WILL connect and loads all websites I tried.
    3. Apple Mail will connect and download messages from my friend's previous email address (not AT&T), but will not connect to allow me to configure his new AT&T account.
    4. Other programs that need a network connection won't run; for example, the Software Update preference, when checking for new updates, claims that there is no network connection.
    Do these symptoms indicate that the Mini's network preferences are not configured correctly, or that the DSL modem is not configured correctly?
    More information: with the modem is an "Installation Wizard Disc" CD with a setup program. It's supposed to work for any PPC G3 or greater Mac, which certainly fits this Mini. BUT, when run on the Mini, the setup program displays a message that the computer's processor is "unrecognized". Then the setup program quits. I ran the setup program on my MacBook Pro laptop connected to the DSL modem. It went through a lengthy process with messages about "configuring the modem". After this, I was able to connect to the Internet with Safari using the laptop. This seems to indicated that there's nothing basically wrong with the modem or DSL connection. However, I can't run the setup program on the Mini. (The above symptoms were after getting the laptop to work, then switching the Ethernet connection back to the Mini.)

    This is a strange problem, especially since Firefox is working OK.
    You might try using OpenDNS. They have a good set of instructions about how to do this here:
    https://www.opendns.com/start
    It's possible that AT&T's DNS servers aren't responding fast enough, and Safari is timing out quicker than Firefox.
    The other option is to call AT&T and ask for support in accessing their DSL modem.
    A third option would be to download a system maintenance utility like Yasu
    http://jimmitchell.org/projects/yasu/
    and use it to clear all the caches in the system -- in case the Mini somehow is using stale information about the net.

  • My nook app continues to state "Please be sure you have internet connectivity, then try again."  I am currently connected to wifi and it seems that all my other apps that need to be connect to the internet are properly working.  Help!

    My nook app keeps telling me "Please be sure you have internet connectivity, then try again."  I am currently connected to wifi and it seems that all my other apps that need to be connect to the internet are properly working.  I have turn off my phone, signed off my wifi, installed a new app, but nothing is working.  My friend is having similar issues.  My phone is up to date.  I even tried taking off the wifi in hopes that it could just connect to the 3g but nothing.  Not sure if anyone else is experiencieng this issue or knows what I can do.  I think that it may be an app problem that needs fixed, but not sure. Help!

    Maybe its a Viber problem. As that is not an Apple product, why don't you try and contact the developer?

Maybe you are looking for