URGENT : MS SQL Server and SAP BW 3.5 Connection problem....

Hello All,
How ya all doin ?
I got job as a fresher, and now we are facing some problem here with
the datasource creation / generation. We have already generated views
& DSs for some tables, for some views we can see the data in the
datasource in the BW datasources but for some views it is giving
information NO DATA IN THE TABLE for that we can see the data in the
DB Table in MS SQL Server using select ......
Kindly help with this issue as soon as possible.
Thanks in advance....
Best Regards....
Sankar Kumar

Hello Sankar,
Thanks...
For Varchar(500) you can try this way.
When you are getting data from DBConnect, include that VARCHAR(500) field in view (so this includes this field to be in transfer structure). But don't map any transfer rules for this field (This avoids the problems to be raised by DB Connect).
Create a Start Routine in the Transfer Rules. In this routine, you can access your VARCHAR(500) field. (I don't know what is your requirement for VARCHAR(500) field with respect to reporting perspective.)
One way is create 9 InfoObjects with char(60). Then parse the varchar(500) field and assign to InfoObject1, InfoObject2 so on....
Another way is, create a table using se11. With key fields to identify individual comments, comment Line number and actual comment. Parse varchar field and insert into this table. Based on your requirement either create a generic extractor using this table and load the data into ODS. Then you can join this ODS and rest of the data ODS and display. or write an ABAP program to show as report using this table...
Hope this helps,
GSM.

Similar Messages

  • Need help:Urgent:MS SQL Server and J2EE Server

    Hello,
    i am developing simple bean managed persistence bean. i want to know how could i use microsoft SQL Server as my database with ejb's in J2EE. i don't want to use cloudscape rather i want to connect through jdbc bridge with sql server. can any body help me out ?
    i have developed DSN for my database with the name of DsnProduct and user name for DB is guest and password is guest123.
    so do i have to change configuration is my J2EE server . or put some additional code. so far i have added the following line in my implementation class
    private String dbName= "java:comp/env/jdbc/ProductDB";
    DataSource ds = (DataSource) ic.lookup(dbName);
    con = ds.getConnection("guest","guest123");
    moreover in server configuration i have added driver
    sun.jdbc.odbc.JdbcOdbcDriver
    and also provide the following JNDI Name
    jdbc/ProductDB
    and
    it's url is
    jdbc:odbc:DsnProduct
    i am thankfull for your support.
    [email protected]

    hi llturro,
    Thanks for answering my question. I have tried out what you suggested, but I still can't fix my problem. The following are the messages that display when I try to run my servlet. It seems that the DataSource, Connection and Statement are ok, however when it comes to the ResultSet the error message appear. What's wrong with my ResultSet coding ?
    ResultSet rs = stat.executeQuery("SELECT ISBN FROM BOOKSINFO WHERE ISBN='"+primarykey+"'");
    setEntityContext Method
    Find by primary key
    DataSource OK
    Connection OK
    Primary Key = 013-00-675721-9
    Statement OK
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: Unknown Exception/Error thrown by EJB method.; nested exception is:
    java.lang.NullPointerException
    java.rmi.RemoteException: Unknown Exception/Error thrown by EJB method.; nested exception is:
    java.lang.NullPointerException
    java.lang.NullPointerException
    <<no stack trace available>>

  • Load table structure definition from Sql server and mirroring

    Hi, we have to replicate some tables from sql server
    into SAP dictionary.
    Is there a tool/transaction for import the table structure
    from a DBRMS like sql/oracle ?
    Adn is there some third part solution for replicate data
    from/to sql server and Sap ?
    Thanks in advance.
    Riccardo Galli.

    Hi,
    Dont know if there are any tools for this but onething is sure you will need to create the table thru SE11.
    I had done something similar, created a BDC to create table and it works.
    Provide the BDC with list of fields, datatype, len, key fields and the BDC will create the table.
    You will need to activate the table once its created, for some reason sap put the table in "partial active" status after creation .
    Good luck.
    Ravi

  • Put some data form the databse of SQL Server into SAP and auto general PR?

    Dear all,
            Can you tell me how I can put some data from the databse of SQL Server into SAP and auto general PR?
    Best regards,
    Merryzhang
    Edited by: merry zhang on Feb 4, 2009 9:10 AM

    Hi Zhang,
    If i have understood your question properly, I guess you wanted to create Purchase Requistion automatically right?
    Then you have lots of option simpilest one would be create a couple of Z table with all the fields that you require for header and Item.
    create a Program and use BAPI function module to create the PR by reading the values from those Z tables. after creation delete the contents from the table. Schedule this program in Background periodically like everyday or weekly once however you would like it to be. So once the table has contents in it and when the program runs it will create the PR's (Purchase Requisition).
    You can also use a workflow with the Z table. Once the Z table is filled you can trigger a workflow based on the Table change. I'm not sure like how to do it but I nkow that this process can also be used.
    Hope this might have thrown some light upon.
    Thanks,
    Prashanth

  • SQL Agent and SAP Agent

    hello gurus,
         I am in need of technical details of SQL agent and SAP agent of Symantec database backup server for SQL server/ windows.
        Can anybody please help me in this??
    Thanks and Regards,
    Rahul

    Hi Kevin,
         I have some queries and i believe, you can answer it.
    I have the following system
    OS/ Applications details
    1) Windows 2003 enterprise edition 32 bit
    2) MS SQL Server 2005
    3) SAP ECC 6.0
    Sever details
    1)     IBM x3650 dual Xeon server 5120@ 1.86 GHz,
    2)     RAID level I
    3)     RAM 8 GB
    I want to go for Symantec database backup software. What information I have is, to take SAP system’s database backup through Symantec you need to have.
    1) SQL Agent of Symantec
    2) SAP Agent of Symantec
                    Given these information can you please help me out in putting the backup system in place.?
    Thanks and Regards,
    Rahul

  • Accessing SQL Server form SAP

    HI,
    I want to get data on SQL Server from SAP.
    What is the procedure to do the above.
    Thanks.

    hi
    in the SAP HELP Content,followthe instructions for Tutorial 2: Accessing SQL Server
    <u><i><b>also take  alook at this presentation</b></i></u>
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2e81685c-0701-0010-0eb3-918c6d56783a
    Below: is the Tutorial 2 instructions.
    In this tutorial you will create a portal component that retrieves and displays information from an MS SQL Server database. Your portal component will display information from the Northwind Categories table in a SAP NetWeaver .NET Table control. You will create a dataset to fill with the data and bind the Table control to this dataset to display data.
    Note: using a dataset is one of the data access options, which is not always recommended. You will use a dataset in this tutorial for the simplicity.
    To complete this tutorial, you need:
    Access to a MS SQL Server with valid permissions for the Northwind sample database
    Access to a running portal
    A portal user account with administrator's permissions
    The tutorial is split into a number of smaller pieces:
    Section 1. Creating the SAP Portal Application project
    Section 2. Creating and configuring the dataset
    Section 3. Adding the SAP NetWeaver Table control and binding it to the data
    Section 4. Adding code to fill the dataset and display the data
    Section 5. Viewing the component in the portal
    Section 1.
    =========================================================
    Creating the SAP Portal Application Project
    On the File menu, point to New, and then click Project.
    1. In the New Project dialog box, do the following:
    (a)In the Project Types pane, choose Visual C# Projects or Visual Basic Projects.
    (b)In the Templates pane, choose SAP Portal Application.
    (c)Specify a different name and location, or accept defaults.
    (d)Click OK.
    A new SAP Portal Application project is created at the specified location. A new portal component named PortalComponent1.ascx is added to your project automatically.
    Section 2.
    =========================================================
    Creating and Configuring the Dataset
    Prior to creating a dataset, you need to create and configure the data connection and data adapter.
    To create the data connection and data adapter
    1. From the Data tab of the Toolbox, drag an SqlDataAdapter object onto your portal component form. Data Adapter Configuration Wizard will help you create both the connection and the adapter.
    2. In the wizard, do the following:
    2(a)In the Choose Your Data Connection pane, create or select an existing connection to the SQL Server Northwind database.
    Important: when you configure the database connection, select the option Use a specific user name and password for server logon information. If your password is not blank, select the Allow to save password checkbox, and then select to Include the password in the connection string, when prompted. Although this is not a recommended practice, we use it in this tutorial for simplicity.
    2(b) In the Choose a Query Type pane, select the Use SQL statements option.
    2(c) In the Generate the SQL Statements pane, create the following SQL statement:
    SELECT CategoryID, CategoryName, Description FROM Categories
    If you need to build a different SQL statement, click Query Builder to open the Query Builder dialog box.
    2(d) Click Finish.
    The wizard adds two objects to your portal component: the SqlConnection1 object containing the database connection information and the SqlDataAdapter1 object containing the data definition.
    To generate the dataset
    1. From the Data menu, choose Generate DataSet. The Generate Dataset dialog box opens.
    Tip: If you do not see the Data menu, click the form; the form must have focus for the menu to appear.
    2. Select the New option and name the dataset dsCategories.
    3. Select the Categories table in the Choose which table(s) to add to the dataset listbox.
    4. Select the Add this dataset to the designer checkbox and click OK.
    Visual Studio generates the new dsCategories dataset class and the dsCategories.xsd schema that is added to Solution Explorer. An instance of the new dataset class (dsCategories1) is then added to the form.
    Section 3.
    =========================================================
    Adding the SAP NetWeaver .NET Table and Binding It to The Data
    1. From the SAP NetWeaver tab of the Toolbox, drag a Table control onto the portal component.
    2. Right-click it to open the Properties box.
    3. Set the DataSource property to dsCategories1.
    4. Set the DataMember property to Categories.
    Section 4.
    =========================================================
    Adding Code to Fill the Dataset and Display the Data
    Although the table is bound to the dataset, the data is not displayed automatically. You must explicitly fill the dataset and bind the table to its data source.
    To fill the dataset and display data in the Table control
    1. Double-click the form to switch to Code Editor.
    2. In the Page_Load event handler, call the data adapter's Fill method, passing it the dataset you want to fill:
    [C#]
    sqlDataAdapter1.Fill(dsCategories1);
    [Visual Basic]
    sqlDataAdapter1.Fill(dsCategories1)
    3. Call the DataBind method of the Table control to bind it to the dataset:
    [C#]
    Table1.DataBind();
    [Visual Basic]
    Table1.DataBind()
    4. Save your project.
    Section 5.
    =========================================================
    Viewing the Component in the Portal
    Deploy the PAR to the current portal.
    In Solution Explorer, right-click the portal component and choose View in Portal.
    The table with the list of categories is displayed in the browser.
    regards
    navjot
    reward accordingly
    Message was edited by:
            navjot sharma

  • How to connect MS-sql server with SAP BW

    hi all,
    i want the connection procedure to how to connect MS-sql server with SAP BW.so that i can extract the data from ms sql server and can create cubes using that data.please help me in this issue.

    Hi Vamshi,
    Go through this DOC it explains u how to connect to other data bases like SQL...
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/58f4db47-0501-0010-a2bf-ff01b150fdff]
    this is a thread related to connect the SQL server..
    [DB Connect MS SQL Server;
    Regards,
    NR
    Assign points if helpful...

  • A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (p

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that
    the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)(Microsoft SQL Server, Error: 2)
    The system cannot find the file specified
    Cannot connect to COWBOYS.
    Here are the technical details===================================
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476
    Error Number: 2
    Severity: 20
    State: 0
    Program Location:
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer
    timeout)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance,
    SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
       at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
    ===================================
    The system cannot find the file specified
    I have tried from so many forms. This is so frustrating. Thank for everyone/anyone who wants to help. So this is what happened: I had to uninstall my previous sqlserver 2012(which worked great) for some reason, and I uninstalled everything from that download.
    Then I installed the trial edition of sql server 2012 (64 Bit) and It wouldn't connect to the database. (Error mentioned above.) My local DB is COWBOYS. (COWBOYS is also my computer name.) After this, I have tried downloading sqlexpress and sqlserver 64bit
    many times and cannot connect to my local DB. 
    How do I connect to my Local DB? 
    Also, I think this might help: (When I run sqlserve.exe, which I was able to find in C:\Program Files\Microsoft SQL Server\110\LocalDB\Binn, I get an error: Your SQL server installation is either corrupt or has been tampered with(Error getting
    instance ID from name). Please uninstall then re-run setup to correct this problem.
    I would happily re install it, if it wasn't my 20th time.
    I don't have any remote connections, I don't use username/password, only window authentication. I work mostly on visual studio, but without able to store /retrieve data, I don't know how to survive.
    May be the solution is very simple, but I am too frustrated. 
    Some of the things I have tried:
    From a command prompt, enter one of the following commands:
    net start "SQL Server Agent (MSSQLSERVER)" OR 
    net start "SQL Server Agent(instancename)"(for instance)
    on my sql configuration, I cannot start anything because there is nothing there to start. I can post more details, if that would help. Also, some more details about the error:
    Details
    Product:
    SQL Server
    ID:
    2
    Source:
    MSSQLServer
    Version:
    10.0
    Component:
    SQLEngine
    Message:
    An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error:
    40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    Explanation
    SQL Server did not respond to the client request because the server is probably not started.
    User Action
    Make sure that the server is started.
    Version:
    9.0
    Component:
    SQLEngine
    Message:
    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error:
    40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    Explanation
    SQL Server did not respond to the client request because the server is probably not started.
    User Action
    Make sure that the server is started.
    Any one that can help me, I will be greatful. Thank you so much. p.s. please ask me anything if you have any questions.

    It sounds like there are a couple things going on here.  First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
    Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance.  Once you find this, make sure the service is started. 
    If not started, try to start it and see if it throws an error.  If you get an error, post the error message your hitting.  If the service starts, you can then launch SSMS and try to connect.  If you have a default instance, you can use the machine
    name in the connection dialog.  Ex:  "COWBOYS" where Cowboys is the machine name.  However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format.  Ex:  COWBOYS\Romo (where Romo
    is the instance name you set during install).
    You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install.  Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
    recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
    Thanks,
    Sam Lester (MSFT)
    http://blogs.msdn.com/b/samlester
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Need Guide to create a table in SQL Server and Process data for JDBC

    Dear All,
    Scenario:JDBC to JDBC
    I need to practice JDBC to JDBC scenario and for that i need to create a table in SQL server for sender ,receiver and update  i have installed SQL Server and no idea about creation of table and Connection string for PI.
    I want you to explain each and every step for the Table Creation ,Driver and connection string.
    Thanks in Advance.

    Try searchin in the forum and then google. This forum is not for teaching the basics.
    VJ

  • After restoring SharePoint farm backup ( The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connection)

    Hi,
    I have taken farm back and restore it in new UAT environment, while access to the main site getting the below error: 
    Error  
    An unexpected error has occurred. 
    Troubleshoot issues with Microsoft SharePoint Foundation. 
    Correlation ID: 866476f3-23dd-4e1e-97af-bffc62cc2d57 
    Date and Time: 7/15/2014 11:26:35 AM 
    When i checked in log i got below error
    System.Data.SqlClient.SqlException: A network-related or instance-specific
    error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40
    - Could not open a connection to SQL Server)    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj)     at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecu... 
    Thanks in advance
    Said Al Balushi

    Hi Wendy,
    i have checked all below points, every thing is fine but still i am getting the same error.
    Check SQL services are runing
    Check remote conenctions are enabled
    Check SQL Browser service is runing
    Check TCP/IP protocal enabled at SQL server
    Check out windows firewall setting
    Thanks,
    Said
     

  • A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The
    server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26- Error:Locating Server\instance Specified)
    How Can i solve this?

    1. Make sure SQL Server Service is running
    2. If a named instance, make sure SQL Server browser service is running
    3. Make sure SQL Server is configured to allow remote connections
    4. Examine the SQL Server error log for messages confirming that SQL is listening on the expected network interfaces and ports
    5. Test server connectivity with PING from the client machine
    6. Test port connectivity using TELNET or PowerShell to the server and port (from step 4) from the client machine.  For example
    a. TELNET <server-name> 1433
    b. PowerShell: 1433 | % { echo ((new-object Net.Sockets.TcpClient).Connect("YourServerName",$_)) "server listening on TCP port $_" }
    7. Check firewall settings if step 5 or 6 connectivity test fails
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Entity Framework - Code First - Migration - How to access SQL Server and Oracle using the same context?

    Hello,
    I use Entity Framework code first approach.
    My project is working fine with SQL Server. But, I want to access Oracle too. I want to switch SQL Server and Oracle in run time.
    I am able to access Oracle using "Oracle.ManagedDataAccess.EntityFramework.dl" in a new project.
    But, Is this possible to access SQL Server and Oracle in the same project.
    Thanks,
    Murugan

    This should be possible with a Code-First workflow.  In Code-First the database mapping layer is generated at runtime.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How to connect to SQL Server (Non-SAP) in SAP R/3(Unix)?

    Hi, All..
    please, help me.
    I am ABAPer.
    I already read the text for connect DB.
    but, I am not clear.
    my system is,
    - Source : SAP R/3, Oracle DB, Unix(OS)
    - Target : Non-sap, SQL Server, Windows 2000
    I want to connect to SQL Server by EXEC SQL.
    Waht's BC(Basis) Jobs?
    Thanks, all.

    Hello,
    have a look at Note: 323151.
    Regards
    Gregor

  • Getting List of SQL server and on selection of server get List of Databases using SMO

    Hi,
    I need to have functionality where I need to populate List of available SQL servers from local network, and when i select SQL server from list, get the list of Databases from that Server.
    For this i referenced SQL SMO Dll's and placed two drop down, one lists Server names, and one lists Database names.
    Dlls refered are:
    Microsoft.SqlServer.ConnectionInfo.dll
    Microsoft.SqlServer.Management.Sdk.Sfc.dll
    Microsoft.SqlServer.Smo.dll
    Microsoft.SqlServer.SqlClrProvider.dll
    Microsoft.SqlServer.SqlEnum.dll
    Above DLL's i have copied from SQL server SQL server 2008 installed location
    C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies
    DLL version : 11.0.3000.0
    Code i have used is:
    private void MainForm_Load(object sender,
    EventArgs e)
       DataTable dataTable = SmoApplication.EnumAvailableSqlServers(false);
       cmbServers.ValueMember = "Name";
       cmbServers.DataSource = dataTable;
    //Now, load Databases on selection of Server combo box.
    private void cmbServers_SelectedIndexChanged(object sender,
    EventArgs e)
       cmbDatabases.Items.Clear();
       if (cmbServers.SelectedIndex != -1)
          string serverName = cmbServers.SelectedValue.ToString();
          Server server = new Server(serverName);
          try
             foreach (Database database in server.Databases)
                cmbDatabases.Items.Add(database.Name);
          catch (Exception ex)
             string exception = ex.Message;
    It works where SQL server is installed, but in systems where no SQL server is installed, it is not working, it is not returning list of SQL server and so database list.
    Query is> can you please help me in this regard, what i am missing here, do i need to install any client component to use this?, or anything else what i need to do to make this functionality work.
    Thanks,
    Hemal

    Thanks Michael for replying.
    I have gone through the reply, and the link on how to get the SMO library installed.
    "To install the Client Tooks SDK without installing SQL Server, install Shared Management Objects from the SQL Server feature pack.
    If you want to ensure that SQL Server Management Objects is installed on a computer that will run your application, you can use the Shared Management Objects .msi in the SQL Server feature pack."
    I have few questions on "Shared Management Objects .msi" 
    Where do i get "Shared Management Objects .msi".
    only installing this msi will install SMO?.
    Can i ship this msi with my application installer?
    do i need to install x86 on x86 system and x64 version of msi in x64 system, or x86 can work fine with both, my application
    is x86 only.
    Thanks,
    Hemal

  • Different output of same query in SQL Server and Oracle

    I have two tables table1 and table2
    --table1 has two columns c1 int and c2 varchar. there are not constraints added in it. it has data as given below
    c1     c2
    6     d
    5     j
    102     g
    4     g
    103     f
    3     h
    501     j
    1     g
    601     n
    2     m
    --table2 has only one column c1 int. there are not constraints added in it. it has data as given below
    c1
    6
    1
    4
    3
    2
    now when i run below given query in sql server and oracle it gives me different result
    select *
    from table1
         inner join (SELECT ROW_NUMBER() OVER (order by c1 ASC) AS c1 from table2) table2 on table2.c1=table1.c1
    sql server output
    c1     c2     c1
    1     g     1
    2     m     2
    3     h     3
    4     g     4
    5     j     5
    oracle output
    C1 C2 C1
    5 j 5
    4 g 4
    3 h 3
    1 g 1
    2 m 2
    If you notice the first column in both output. It is sorted in sql server and not in oracle.
    Why it is behaving differently in oracle? Is there any way I can solve this in oracle?
    Thanks,
    Jigs

    It is NOT behaving "differently" in Oracle; you just haven't specified an order that you expect your results to be in, so you're going to get output in whatever order the database fancies displaying it (ie. no guarenteed order). This is an artifact of how the database chooses to put together the data, and different databases (or even datasets within the same database) can and most likely will behave differently.
    Even SQL Server won't guarentee to always get your data in an ordered fashion if you exclude the order by clause, even if you think it has always output the data in an ordered fashion.
    Your solution is to add an order by clause, in BOTH databases, to force the order of the output data.

Maybe you are looking for