How to catch filenotfoundexception when user enters a bogus page

How to catch when user enters a bogus jsp page. I have login.jsp. If someon enter log.jsp i get javax.servlet.ServletException: java.io.FileNotFoundException and then the whole path is shown. This onlyhappens with 9ias. When i was using http server that came with 9i database, i was able to catch this with send_error=true in zone.properties. It doesnt work with 9ias. How is everyone catching these errors? I cant seem to find out how to do it.
Thanks

Hi Adam,
I am also facing the same problem of the java.io.FIleNotFOundException in the browser display when i am giving a wrong file path in the Url. you have mentioned that you have solved it when you were using Orcale 8i Http Server, can you please guide me for that( as we are also using Oracle 8i) I checked with putting send_error=true in zone.properties file but that is not working. What exctly you have done to get rid of that error message. I am using Windows Nt platform.
Thanks and Regards.
Arnab

Similar Messages

  • How to catch java.io.FileNotFoundException when user enters a.jsp which is not a vali

    How to catch java.io.FileNotFoundException when a user enters a bogus jsp page. For example. I have a page called login.jsp. If a user enters log.jsp, the entire path is show and i get java.io.FileNotFoundException. This should not happen. This only happened since I upgraded to 9iAS. I tried send_error=true in zone.properties like i did when i was just using oracle http that came with database and it doesnt work. How are all you guys catching this?? I cant find any documentation. They say send_error=true will work, but IT DOESNT.
    Thanks for your time

    Hi Adam,
    I am also facing the same problem of the java.io.FIleNotFOundException in the browser display when i am giving a wrong file path in the Url. you have mentioned that you have solved it when you were using Orcale 8i Http Server, can you please guide me for that( as we are also using Oracle 8i) I checked with putting send_error=true in zone.properties file but that is not working. What exctly you have done to get rid of that error message. I am using Windows Nt platform.
    Thanks and Regards.
    Arnab

  • How to prevent java.io.exception when someone enters a bogus page in theURL

    Say i have a page called Test.jsp. The user goes to it and everything is fine. If the user happens to play with the url and changes it to Tes.jsp, i get java.io.exception. Is there anyway to catch this?
    This is my error:
    JSP Error:
    Request URI:/page/Tes.jsp
    Exception:
    java.io.FileNotFoundException: page/Tes.jsp
         at java.io.FileInputStream.(FileInputStream.java)
         at oracle.jsp.provider.JspFilesystemResource.fromStream(JspFilesystemResource.java)
         at oracle.jsp.provider.JspFilesystemResource.fromReader(JspFilesystemResource.java)
         at oracle.jsp.app.JspAppLoader.reloadPage(JspAppLoader.java)
         at oracle.jsp.app.JspAppLoader.loadPage(JspAppLoader.java)
         at oracle.jsp.app.JspAppLoader.getPage(JspAppLoader.java)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java)
         at oracle.jsp.JspServlet.internalService(JspServlet.java)
         at oracle.jsp.JspServlet.service(JspServlet.java)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
         at org.apache.jserv.JServConnection.run(JServConnection.java:188)
         at java.lang.Thread.run(Thread.java)
    Thanks in advance
    Adam

    Most JSP servers have a configuration option to serve
    up an error page in situations like this. Yours
    probably does too.Once you find that, make it your error page with a page directive of isErrorPage="true". Then you have access to the implicit exception variable name to determine if it is really a 404 exception.

  • How to populate date & time when user enter data for custom table in sm30

    Can anyone tell me How to populate system date & time when user enter data for custom table in sm30..
      Req is
      i have custom table and using sm30 user can enter data.
    after saving date i want to update date & time in table
    Pls let me know where to write the code?
    Thanks in Advance

    You have to write the code in EVENT 01 in SE54 transaction. Go to SE54, enter your Ztable name and in the menu 'Environment-->Events'. Press 'ENTER' to go past the popup message. In the next screen, click on 'New Entries'. In the first column, enter 01 and in the next column give some name for your routine(say UPDATE_USER_DATE_TIME). Then click on the souce code icon that appears in blue at the end of the row. In the code, you need logic like below.
    FORM update_user_date_time.
      DATA: f_index LIKE sy-tabix.
      DATA: BEGIN OF l_total.
              INCLUDE STRUCTURE zztable.
      INCLUDE  STRUCTURE vimtbflags.
      DATA  END OF l_total.
      DATA: s_record TYPE zztable.
      LOOP AT total INTO l_total.
        IF l_total-vim_action = aendern OR
           l_total-vim_action = neuer_eintrag.
          MOVE-CORRESPONDING l_total TO s_record.
          s_record-zz_user = sy-uname.
          s_record-zz_date = sy-datum.
          s_record-zz_time = sy-uzeit.
          READ TABLE extract WITH KEY l_total.
          IF sy-subrc EQ 0.
            f_index = sy-tabix.
          ELSE.
            CLEAR f_index.
          ENDIF.
          MOVE-CORRESPONDING s_record TO l_total.
          MODIFY total FROM l_total.
          CHECK f_index GT 0.
          MODIFY extract INDEX f_index FROM l_total.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " UPDATE_USER_DATE_TIME
    Here ZZTABLE is the Z table and ZZ_USER, ZZ_DATE, and ZZ_TIME are the fields that are updated.

  • Problems when user enter the field

    I have problem when user enter the field, but it cannot retrieve from the table. Below is my program, help me to check is it correct or not, THANKS
    <input type="text" name="po_num<%=i%>" style="width:100%;text-align:left;" onChnage="chkPOexist(<%=i%>)">
    Function chkPOexist(i){
    if documen.all.po_num.value == null {
    alert ("PO cannot be null");
    else {
    po_num = new String;
    po_num = eval(document.po_num[i].value)
    alert(po_num);
    <% System.out.println("PP " +po_num);
    sql_query = "SELECT po_num"+
    " FROM pomast"+
    " WHERE po_num '"+po_num+"' ";
                        try{
                        rset = db.execSQL(sql_query);
                        catch(SQLException e) {
                        System.err.println("Error in query");
                        while(rset.next()== true){
    po_num = rset.getString("po_num");
    %>
    </select value="<%=po_num%>"><%=po_num%></select>
                        <%}%>

    You seem to have some confusion between java and javascript, and when they run.
    Java code runs only on the server, and produces an HTML page.
    Javascript code runs on the client.
    The two can not communicate. Specific to your example you seem to think that the java code will be executed by your onChange event.
    This is not the case.
    In order to run java code again you have make a request by submitting the form, or clicking on a link.
    Cheers,
    evnafets

  • Add days to the dates when user enter +

    hello ,
    i have requirement that when user enter + 30 in date field he got + 30 dayas of current date is thr any why to do this it is modulpool and i have taken date field on screen.

    here is sample code to show next and previous month on button click and show current month
    and year default.
    REPORT  ztn_datechk_button.
    TABLES sscrfields.
    TYPE-POOLS icon.
    DATA month TYPE i.
    PARAMETERS: date TYPE spmon .
    INITIALIZATION.
      date = sy-datum+0(6) .
      "date = sy-datum+0(2) - 1.
      IF date+4(2) < 1 ."or date+4(2) > 12.
        date+4(2) = 12.
        date+0(4) = date+0(4) - 1.
      ELSEIF date+4(2) > 12 ."or date+4(2) > 12.
        date+4(2) = 1.
        date+0(4) = date+0(4) + 1.
      ENDIF.
      SELECTION-SCREEN  PUSHBUTTON 50(15)  but1 USER-COMMAND prev VISIBLE LENGTH 3.
      SELECTION-SCREEN   PUSHBUTTON 53(15) but2 USER-COMMAND next VISIBLE LENGTH 3.
      CALL FUNCTION 'ICON_CREATE'
        EXPORTING
          name   = icon_previous_value
          info   = 'PREVIOUS'      "text = 'Button 2'
        IMPORTING
          RESULT = but1
        EXCEPTIONS
          OTHERS = 0.
      CALL FUNCTION 'ICON_CREATE'
        EXPORTING
          name       = icon_next_value
          info       = ''      "text = 'Button 2'
          add_stdinf = ''
        IMPORTING
          RESULT     = but2
        EXCEPTIONS
          OTHERS     = 0.
    AT SELECTION-SCREEN.
      CASE sy-ucomm.
        WHEN 'PREV'.
          date = date+0(6) - 1.
          IF date+4(2) < 1 ."or date+4(2) > 12.
            date+4(2) = 12.
            date+0(4) = date+0(4) - 1.
          ENDIF.
        WHEN 'NEXT'.
          date = date+0(6) + 1.
          IF date+4(2) > 12 ."or date+4(2) > 12.
            date+4(2) = 1.
            date+0(4) = date+0(4) + 1.
          ENDIF.
      ENDCASE.
      IF date+4(2) < 1 OR date+4(2) > 12.
        MESSAGE 'Invalid Month' TYPE 'E'.
      ENDIF.

  • HT203167 my mac had been formated from HD. ...? HOW TO CATCH BACK MUSICS, MOVIES FROM ( PING'S PAGE ) " THERE ARE CATALOGED ALL MY PURCHASED " ???

    my mac had been formated from HD. ...? HOW TO CATCH BACK MUSICS, MOVIES FROM ( PING'S PAGE ) " THERE ARE CATALOGED ALL MY PURCHASED " ???

    Unless you backup your data, follow these instructions.
    http://support.apple.com/kb/HT2519
    Formatting means erasing, and you normally can't recover from an erase short of redownloading, or copying back from a backup.  For more on backing up and data recovery, read this link:
    https://discussions.apple.com/docs/DOC-1992

  • How to Make a field User Entered - Required by javaScript

    Dear all,
    How can I make a field User Entered - Required on some conditions e.g. it is required in the following conditions.
    1)I have a group of radio buttons of Yes and No.I want if the user select yes then a particular text field should Required otherwise it should optional.
    2)In a particular row of a table if user fill the first column then other columns of that row should required otherwise it should optional.
    How can I do it?If any body can please help me.
    Thanks a bunch in advance
    Regards
    Rakesh

    I have the same problem. I need to change all fields to be not required. Adobe doesn't seem to recognize the change.
    var fieldCount = event.target.numFields;
    for ( var i = 0; i < fieldCount; i++)
    var fieldName = event.target.getNthFieldName(i);
    app.alert(fieldName);
    var field = event.target.getField(fieldName);
    if(field.type != "button")
    app.alert(field.required);
    field.required.rawValue = false;

  • How do I store and retrieve variables end user enters in Dynamic Pages ?

    I have 4 dynamic pages, a user enters in variables on first page. At the next 3 dynamic pages I send the user to I have to display the items they entered on the first page in text items.
    How do I pass these variables ????
    thanks!

    ok, so on my page 1 I have the parameter "name", if I use <ORACLE> tags on this first dynamic page they are executed upon entering the form. The user has to enter the data and if the <ORACLE> tags have already executed where do I store the value ?
    So where do I issue the wwsto_api_session.load_session (in the second dynamic page or the first one) ?
    I can see that I'll use the wwsto_api_session.get_attribute_as_varchar2 ('name') in the second dynamic page with the htp.p - is that right ?
    You wouln't have an example you could share with us all do you ? Sure seems like this is confusing to a lot of people. Are there any useful examples of this in the PDK that show how to do this with the HTML included ?
    thanks again

  • How to raise popup when we enter the data on Partcular field

    Hi All,
    I have an issue in Sales Order in WEBUI, In the Sales Order when we enter the Customer Request Delivery Date field the popup sholu come,If any body have please do the need full for me.
    Component: BT115H_SLSO
    Regards,
    Shanmukesh P

    [http://www.orafaq.com/forum/t/78289/2/|http://www.orafaq.com/forum/t/78289/2/]

  • Add WHERE criterias in addition to what the user enters on search page

    Hi,
    This may be a simple problem, but I have not been able to solve it.....Is there a way for me to code another search criteria in addition to what the user enters?
    I'm trying to create a simple search page. Basically, user logs on, i get his acoount number and save it in a variable. Then whatever the user's search criterias are , I want to add "AND ACCOUNT = ???."
    I've tried:
    In the processRequest, retrieve his account number using a VO, stored account number in variavle x and then call a initQuery(x) for the VO to get only the rows that he should be able to see. Problem A: I get 'SQLStmtException' when I test the page by trying to do a Simple Search. So to fix that, in the VOImpl, I added these two calls -- setWhereClauseParams(null); setWhereClause(null); -- after the executeQuery(). After I did this, ran into Problem B: the user could search any record that wasn't associated with his account.
    I also tried to dynamically create the vo using createViewObjectFromQueryStmt("Select * from table where account = " + x) but was not successful. The page didn't render and I received a ClassCastException similar to this thread -- Re: How to Create OAViewObject programatically
    I'm new to OAF and would appreciate any pointers on how to implement this.
    Thanks,
    LL

    Hi,
    I assume that you haven't tried the following steps..if you have and still get an error, give us the SQL statement error that is coming up. If I misunderstood your requirement, could you elaborate.
    I assume that when the user logs in you get the account number automatically.
    You could define the VO to have the following where condition 'WHERE ACCOUNT=:1'.
    Then you set the account id from the user using setWhereClauseParams(0,accountid) and call executeQuery. This would limit the result to that user.
    This will work in addition to any other search fields that might have been used in the query.
    For e.g with just the account id the sql that will be fired is
    Select attribute1, attribute2....from Tablexxx where account = :1
    Any other user search criteria given in the page will result in a ssql query like the following
    select * from (Select attribute1, attribute2 ...from Tablexx where accoount = :1) where newattribute like `%xx`
    Hope this helps. Let us know if you still have issues.
    Thank you,
    Arun

  • How to get the Current User on the UI page?

    All,
    Could you please let me know how to get the Current user on the UI input page , i need to display the current user ID when some one clicks the submit button, i want o get the current user to display in the javascript alert box.
    Edited by: 951930 on Oct 24, 2012 12:21 PM

    lucky,
    my schema has already defined for
    <user mapField="USER_ID" default="%CurrentUser"/>
    and in my UI page
    <td oraLabel="user"></td><td oraField="user" id="userId" ></td>
    and my javascript
    function showUserId () {                        
    var curUser = document.getElementById('userId').value;
    alert(curUser);
    and i have called this function on my submit button, but i am not able to get Current Logged User ID value to show in the alert nor able to show the current logged user on the UI page.
    my requirement is on custom UI page i need to show Current Logged User in one corner of the page and also need to show the same user in alert when he submits the button.
    Appreciate for the help.
    Edited by: 951930 on Oct 25, 2012 8:42 AM
    Edited by: 951930 on Oct 25, 2012 9:06 AM

  • How do you redirect the user to a custom page after the "Save" button is clicked?

    In SharePoint 2010, I could add the following code to a save button to redirect the user to a custom page.
    <input type="button" value="Submit" class="btnStyle" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={/SitePages/Thankyou.aspx}')}" />
    However, how do you do this for a save button in SharePoint Online? The code of a save button in SharePoint Online looks like
    <input type="button" value="Save" name="ctl00$ctl33$g_175de2e0_43c1_4005_bac5_0ab02439686f$ctl00$toolBarTbl$RightRptControls$ctl00$ctl00$diidIOSaveItem" onclick="if (!PreSaveItem()) return false;if (SPClientForms.ClientFormManager.SubmitClientForm('WPQ1')) return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ctl33$g_175de2e0_43c1_4005_bac5_0ab02439686f$ctl00$toolBarTbl$RightRptControls$ctl00$ctl00$diidIOSaveItem&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, true;javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={/SitePages/Thankyou.aspx}')}))" id="ctl00_ctl33_g_175de2e0_43c1_4005_bac5_0ab02439686f_ctl00_toolBarTbl_RightRptControls_ctl00_ctl00_diidIOSaveItem" accesskey="O" class="ms-ButtonHeightWidth" target="_self">

    Not exactly what you are asking for, but if you are creating the link then you could add "?Source=" to the URL.
    http://yourServer/sites/yourSite/Lists/TestList/NewForm.aspx?Source=/SitePages/Thankyou.aspx
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

  • How to catch exception when have max connection pool

    hi,
    i have define in oracle user that i could have max 10 sessions at the same time.
    I have jdbc datasource & connection pool defined at glassfish server(JSF application).
    now, if in application is too many queries to the database then i have error: nullpointer exception - becouse when i try to do:
    con = Database.createConnection(); - it generates nullpointer exception becouse there isn't free connection pool
    i try to catch exception like this:
    public List getrep_dws_wnioski_wstrzymane_graph() {     int i = 0;     try {     con = Database.createConnection();     ps =    (Statement) con.createStatement();     rs = ps.executeQuery("select data, klasa, ile_dni_wstrzymana, ile_wnioskow from stg1230.dwsww_wstrzymane_dws8 order by data, klasa, ile_dni_wstrzymana, ile_wnioskow");     while(rs.next()){       rep_dws_wnioski_wstrzymane_graph.add(i,new get_rep_dws_wnioski_wstrzymane_graph(rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4)));       i++;     }     } catch (NamingException e) {         e.printStackTrace();     } catch (SQLException e) {         e.printStackTrace();     } catch (NullPointerException e) {         e.printStackTrace();         throw new NoConnectionException();  // catch null 1     } finally {     try {         con.close();     } catch (SQLException e) {         e.printStackTrace();     } catch (NullPointerException e) {         e.printStackTrace();         throw new NoConnectionException();  // catch null 2     }     } return rep_dws_wnioski_wstrzymane_graph; }
    but at line:
    con.close();
    i have nullpointerexception
    and
    at line
    throw new NoConnectionException(); // catch null 2
    i have: caused by exception.NoConnectionException
    what's wrong with my exception class? how to resolve it?
    public class NoConnectionException extends RuntimeException{     public NoConnectionException(String msg, Throwable cause){       super(msg, cause);     }     public NoConnectionException(){       super();     } }
    at web.xml i have defined:
    <error-page>         <exception-type>exception.NoConnectionException</exception-type>         <location>/NoConnectionExceptionPage.jsp</location>     </error-page>

    thanks,
    i did it and i have error:
    java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit
    at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115)
    at logic.Database.createConnection(Database.java:37): conn = ds.getConnection();
    public class Database {
         public static Connection createConnection() throws NamingException,
                    SQLException {
                Connection conn = null;
                try{
                    Context ctx = new InitialContext();
              if (ctx == null) {
                   throw new NamingException("No initial context");
              DataSource ds = (DataSource) ctx.lookup("jdbc/OracleReports");
              if (ds == null) {
                   throw new NamingException("No data source");
              conn = ds.getConnection();  // here's exception when max connections to database
              if (conn == null) {
                   throw new SQLException("No database connection");
                } catch (NamingException e) {
                    e.printStackTrace();
                    throw new NoConnectionException(); 
             } catch (SQLException e) {
                 e.printStackTrace();
                    throw new NoConnectionException(); 
                catch (NullPointerException e) {
                 e.printStackTrace();
                    throw new NoConnectionException();  // obsluga bledy na wypadek jesli braknie wolnych polaczen do bazy
            return conn;
    }and at my ealier code i have error:
    at logic.GetDataOracle.getrep_dws_wnioski_wstrzymane_graph(GetDataOracle.java:192)
    at line: con = Database.createConnection();
    in code:
    public List getrep_dws_wnioski_wstrzymane_graph() {
        int i = 0;
        try {
        con = Database.createConnection();
        ps =    (Statement) con.createStatement();
        rs = ps.executeQuery("select data, klasa, ile_dni_wstrzymana, ile_wnioskow from stg1230.dwsww_wstrzymane_dws8 order by data, klasa, ile_dni_wstrzymana, ile_wnioskow");
        while(rs.next()){
          rep_dws_wnioski_wstrzymane_graph.add(i,new get_rep_dws_wnioski_wstrzymane_graph(rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4)));
          i++;
        } catch (NamingException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        } catch (NullPointerException e) {
            e.printStackTrace();
            throw new NoConnectionException();
        } finally {
        try {
            if(con != null)
            con.close();
        } catch (SQLException e) {
            e.printStackTrace();
        } catch (NullPointerException e) {
            e.printStackTrace();
            throw new NoConnectionException(); 
    return rep_dws_wnioski_wstrzymane_graph;
    }so what's wrong?
    i have limit max sessions 10 at oracle so i set at my connection pool 5 connections as max. But when i get max 5 sesssins and try to execute next query then i can't catch exception..

  • How to Script Logons When User is dbo

    We have a SQL Server 2012 server with an AlwaysOn Availability Group.  It contains SharePoint and ProjectServer databases.  I have written the below code to recreate the logons if the principle should flip and the logons need to be created.  However,
    I have an issue when the user is dbo.  Which it has been explained to me that is how SharePoint and ProjectServer set up their logons.
    Thus the code below would create something like this:
    USE [DatabaseNameHere]; CREATE LOGIN [DomainNameHere\LogonNameHere] FROM WINDOWS; CREATE USER [DomainNameHere\LogonNameHere] FOR LOGIN [DomainNameHere\LogonNameHere] WITH DEFAULT_SCHEMA=[dbo];
    EXEC [sp_addrolemember] @rolename = 'db_datareader', @membername = 'DomainNameHere\LogonNameHere';
    EXEC [sp_addrolemember] @rolename = 'db_datawriter', @membername = 'DomainNameHere\LogonNameHere';
    EXEC [sp_addrolemember] @rolename = 'db_executor', @membername = 'DomainNameHere\LogonNameHere';
    However when I try to create the code when the user is dbo I get issues.  You cannot do 
    CREATE USER [dbo] FOR LOGIN [DomainNameHere\LogonNameHere] WITH DEFAULT_SCHEMA=[dbo];
    Can someone tell me how to rewrite "CREATE USER [dbo] FOR LOGIN [DomainNameHere\LogonNameHere] WITH DEFAULT_SCHEMA=[dbo];"?
    ===========================================================================
    --Code for when the DefaultSchema IS NOT NULL and UserAtDBLevel IS NOT dbo
    DECLARE c1 CURSOR FOR SELECT DISTINCT LogInAtServerLevel, UserAtDBLevel, [Database], DefaultSchema
                          FROM CMSRepository.dbo.UserMappings
                          WHERE ExtractDate='2014-11-21 00:00:00' AND ServerName='ServerNameHere' AND [Database] NOT IN ('master','model','msdb','tempdb','DBAAdmin') AND DefaultSchema != '' AND UserAtDBLevel
    != 'dbo'
                          ORDER BY LogInAtServerLevel, UserAtDBLevel, [Database], DefaultSchema
    OPEN c1
    DECLARE @LogInAtServerLevel sysname, @UserAtDBLevel sysname, @Database sysname, @DefaultSchema sysname 
    FETCH c1 INTO @LogInAtServerLevel, @UserAtDBLevel, @Database, @DefaultSchema 
    WHILE (@@FETCH_STATUS = 0)
      BEGIN 
    PRINT 'USE [' + @Database + ']; CREATE LOGIN [' + @LogInAtServerLevel + '] FROM WINDOWS; CREATE USER ['  + @UserAtDBLevel + '] FOR LOGIN [' + @LogInAtServerLevel + '] WITH DEFAULT_SCHEMA=['
    + @DefaultSchema + '];' 
    --Begin on Cursor 2
    DECLARE c2 CURSOR FOR SELECT DISTINCT DatabaseRoleMembership
                               FROM CMSRepository.dbo.UserMappings
                               WHERE     ExtractDate='2014-11-21 00:00:00' AND ServerName='ServerNameHere' AND [Database] NOT IN ('master','model','msdb','tempdb','DBAAdmin') AND DefaultSchema
    != ''
    AND @LogInAtServerLevel     = LogInAtServerLevel
    AND @UserAtDBLevel          = UserAtDBLevel
    AND @Database               = [Database]
    AND @DefaultSchema          = DefaultSchema
    OPEN c2 
    DECLARE @c2_DatabaseRoleMembership sysname
    FETCH c2 INTO @c2_DatabaseRoleMembership
         WHILE (@@FETCH_STATUS = 0)
      BEGIN
        PRINT 'EXEC [sp_addrolemember] @rolename = '''  + @c2_DatabaseRoleMembership + ''', @membername = ''' + @LogInAtServerLevel + ''';'
             FETCH c2 INTO @c2_DatabaseRoleMembership
           END
         CLOSE c2
    DEALLOCATE C2
    --End of Cursor 2
         FETCH c1 INTO @LogInAtServerLevel, @UserAtDBLevel, @Database, @DefaultSchema  
      END
    CLOSE c1
    DEALLOCATE c1
    ===========================================================================
    lcerni

    Hi, 
    If I am correct you are checking "SA" user in server level? If yes, you need to create SA user back again on the other server again or probably user is there but is showing up as "SQL User withour login". Please clarify is the screen
    shot is for SA. 
    You can alter your SA login with use of "ALTER LOGIN" but cannot assign it to ACTIVE DIRECTORY user.
    from BOL:
    NAME = login_name
    The new name of the login that is being renamed. If this is a Windows login, the SID of the Windows principal corresponding to the new name must match the SID associated with the login in SQL Server. The new name of a SQL Server login cannot contain a
    backslash character (\).
    Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

Maybe you are looking for

  • Can I use more than one bluetooth device at a time with my iphone4

    Can I use more than one bluetooth device at a time with my iphone4

  • Export/Import error - MDL1207

    Hi, OWB Client: 10.2.0.2.8 (Windows XP) OWB Repository: 10.2.0.2.0 (HP Unix) We have two repositories (DEV/TEST and PROD). Development is done in the DEV/TEST repository then each object is exported to an MDL file for versioning and then imported to

  • File association error

    I have just installed (and repaired twice with a reinstall to be certain) PC Suite on XP SP2. When I click "File Manager", "Contacts" or "Messages" I get the following error. "This file does not have a program associated with it for performing this a

  • Where can i download Mozilla Firefox 3.6.17?

    Hello Firefox fans :D I am a Firefox fanatic like all of you and i am looking to download Mozilla Firefox 3.6.17? Thank you :)

  • How to hide/disable the Real URL on Browser

    Hi We are using Sun one Application server 7 on solaris.We are using JSP and Servlet. Directory listing pattern is ocurring as www.myapp.com/rite/pre/information.jsp in address bar of browser.And Want to dispaly only www.myapp.com in address bar inst