Monday, December 31, 2012

SQL-Server Database Users & Roles

How to find SQL-Server Database Users & Roles:-


DECLARE
    @db_name SYSNAME,
    @sql VARCHAR(1000),
    @databaseNM varchar(50)
    set @databaseNM='JDE_CRP'

DECLARE db_cursor CURSOR FOR SELECT Name FROM sys.databases where Name=@databaseNM
OPEN db_cursor

FETCH NEXT FROM db_cursor INTO @db_name

WHILE (@@FETCH_STATUS = 0)
BEGIN
    SET @sql =
        'SELECT
            ''' + @db_name + ''' AS [Database],
            USER_NAME(role_principal_id) AS [Role],
            USER_NAME(member_principal_id) AS [User]
        FROM
            ' + @db_name + '.sys.database_role_members'

    EXEC(@sql)

    FETCH NEXT FROM db_cursor INTO @db_name
END

CLOSE db_cursor
DEALLOCATE db_cursor

Saturday, November 10, 2012

This data dictionary defines fields used in P6.


http://www.integrationfaces.com/calling-oracle-primavera-p6-eppm-r8-2-web-services-from-oracle-bpel/

Tuesday, October 30, 2012

Setting Up Benefits Administration JD Edwards E1

Setting Up Benefits Administration



This chapter contains the following topics:

Converting Payroll History JD Edwards E1

Converting Payroll History

When you implement the JD Edwards EnterpriseOne Payroll system in the middle of a calendar year, you typically need to enter the payroll history records from the legacy payroll system into the JD Edwards EnterpriseOne Payroll system. The system uses these payroll history records to calculate the information that appears on employees year-end forms.


The system provides a conversion process that you can use to import payroll history records from a legacy system and convert them into the format that is used by the JD Edwards EnterpriseOne Payroll system.



Each time that you process a payroll cycle, the system creates historical records of employees earnings, deductions, and taxes. You use these historical records to print historical and governmental reports, answer employees questions, and process year-end forms for employees. In some cases, you might need to import payroll history records from another payroll system and convert them to the format that is used by the JD Edwards EnterpriseOne Payroll system. These situations are examples of when you might need to convert payroll history:

    http://docs.oracle.com/cd/E16582_01/doc.91/e15133/cvrt_payroll_histry.htm  

Saturday, October 27, 2012

Building and Using WebServices with JDeveloper

Web Services provide client neutral access to data and other services. JDeveloper allows you to create different types of Web Services quickly and easily....

In this tutorial, you will create 4 different Web Services: a POJO Annotation-Driven service, a Declaratively-Driven POJO service, a service for existing WSDL, and an EJB service. The focus of these scenarios is to demonstrate and test Java EE 5 web services. In particular this means JAX-WS (Java API for XML Web Services) and annotation handling. JAX-WS enables you to enter annotations directly into the Java source without the need for a separate XML deployment descriptor 

At the end of the tutorial you create an ADF Client application that consumes the web service you created. 



http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_52/jdtut_11r2_52_1.html

Monday, October 22, 2012

Jdeveloper To connect to Microsoft SQL Server

To connect to Microsoft SQL Server:

  1. From www.microsoft.com, download and install the appropriate Microsoft SQL Server driver:

    • For Microsoft SQL Server 2005, choose Microsoft SQL Server 2005 Driver.

    • For Microsoft SQL Server 2008, choose Microsoft SQL Server 2008 Driver.

  2. Set up the user library to contain install-directory\sqljdbc.jar.

  3. Create a database connection to Microsoft SQL Server. Use the following values:

    • Connection Type: SQLServer

    • Username and Password: enter the appropriate values for the connection.

    • Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver

    • Library: the library you created for the driver.

    • JDBC URLs: jdbc:sqlserver://machine-name:port;DatabaseName=database-name, where the section DatabaseName=database-name is optional

What you May Need to Know

If you are using Windows Authentication credentials to connect to Microsoft SQL Server, you need to add do the following:

  • Add the connection property integratedSecurity=TRUE and the username and password values to the JDBC URL, for example

    jdbc:sqlserver://machine-name:port;DatabaseName=database-name;username=USERNAME;password=PASSWORD;integratedSecurity=TRUE  
  • Add the location of sqljdbc_auth.dll to your PATH variable:

    • For 32bit JVM, this is installation-directory\sqljdbc_version\language\auth\x86

    • For 64bit JVM, this is installation-directory\sqljdbc_version\language\auth\x64

For more information, see Building the Connection URL, which is available as part of Connecting to SQL Server with the JDBC Driver at the Microsoft MSDN website.

http://docs.oracle.com/cd/E16162_01/user.1112/e17455/connect_work_databases.htm





Saturday, October 20, 2012

Using BPEL to Build Composite Services and Business Processes

BPEL is a rich XML based language for describing the assembly of a set of existing 
web services into either a composite service or a business process. Once deployed, 
a BPEL process itself is actually invoked as a web service.
Thus anything that can call a web service, can also call a BPEL process, including 
of course other BPEL processes. This allows you to take a nested approach to 
writing BPEL processes, giving you a lot of flexibility.
In this chapter we first introduce the basic structure of a BPEL process, its key 
constructs, and the difference between a synchronous and asynchronous service. 
We then demonstrate through the building and refinement of two example BPEL 
processes, one synchronous the other asynchronous, how to use BPEL to invoke 
external web services (including other BPEL processes) to build composite services. 
During this procedure we also take the opportunity to introduce the reader to many 
of the key BPEL activities in more detail.


http://media.techtarget.com/searchSOA/downloads/OracleSOADevelopersGuide_05_Final.pdf

--


Friday, October 19, 2012

Saturday, October 6, 2012

Business view JD Ewards distinct Data

First create the index you want to use, then right click on the table name in the "Table Joins" window and click "Change Index". You will get error message.

Pick your single field index and you will be able to accomplish selecting the distinct values for a single field without selecting the entire primary key.

Source:JDELIST

Friday, October 5, 2012

Convert Numeric to A String with decimals - JD Edwards

Tested solution

Convert Math Numeric To A String with Decimals

B0400410


Input Gpay
Output AA15

 

Tuesday, September 11, 2012

Configuring sql-server with SOA jdeveloper


Configuring MSSQL with SOA Suite 11g 

This examples uses SQL Server Express 2000 and Oracle SOA Suite 11.1.1.1. SOA Suite is also deployed on Linux so in some situations you will need to look for the windows versions of the file referenced in this document.

https://blogs.oracle.com/middleware/entry/configuring_mssql_with_soa_suite

Monday, September 10, 2012

Thursday, August 9, 2012

Alter failed for Login sa. Cannot set a credential for principal 'sa'. - Error encountered in SQL Server

Alter failed for Login sa. Cannot set a credential for principal 'sa'. - Error encountered in SQL Server

Recently when i worked with SQL Server security, i encountered with one error while trying to modify 'SA' account properties. The exception details looks following,

http://paresh-sqldba.blogspot.com/2012/01/alter-failed-for-login-sa-cannot-set.html


Sunday, July 29, 2012

Scrape / download / get a webservice in a textbox or in variable c#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;

public partial class Default7 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //Your webservice...
        string url = "http://localhost:64907/WebSite2/rss.ashx";
        string strResult = "";

        WebResponse objResponse;
        WebRequest objRequest = System.Net.HttpWebRequest.Create(url);

        objResponse = objRequest.GetResponse();

        using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
        {
            strResult = sr.ReadToEnd();
            // Close and clean up the StreamReader
            sr.Close();
        }

        // Display results to a webpage
        //Response.Write(strResult);
        //webservice in textbox
        TextBox1.Text = strResult.ToString();
    }
}

Saturday, June 30, 2012

Friday, June 8, 2012

Using the ADF URL Data Control to Read RSS Feeds

http://www.oracle.com/technetwork/developer-tools/jdev/urldatacontrol-099677.html

Sunday, June 3, 2012

Oracle JDeveloper 11g Release 2 Tutorials - Consuming a Web Service from a Web Page

http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_14/jdtut_11r2_14.html

Friday, May 18, 2012

SOA documentation/downloads and samples

 Here is the link from which you can download, look at the official documentation as well as really good sample code and demos. This is a good starting point.



Thursday, May 17, 2012

Adding Maps Using the Maps Helper

Web Pages 2 includes additions to the ASP.NET Web Helpers Library, which is a package of add-ins for a Web Pages site. One of these is a mapping component provided by the Microsoft.Web.Helpers.Maps class. You can use the Maps class to generate maps based either on an address or on a set of longitude and latitude coordinates. The Maps class lets you call directly into popular map engines including Bing, Google, MapQuest, and Yahoo.

To use the new Maps class in your website, you must first install the version 2 of the Web Helpers Library. To do this, go to the instructions for installing the currently released version of the ASP.NET Web Helpers Library and install version 2.



http://www.asp.net/web-pages/overview/what's-new/top-features-in-web-pages-2#maphelper

Tuesday, May 15, 2012

LDAP Authentication in ASP.Net c#

in config file ..
  <authentication mode="Forms">
              <forms loginUrl="~/Account/LogOn" timeout="10"/>
        </authentication>                  



in code behind

 public  ValidateUser(string user, string pass)
        {
            bool validation;
            try
            {
                LdapConnection ldc = new LdapConnection(new LdapDirectoryIdentifier((string)null, false, false));
                NetworkCredential ncon = new NetworkCredential(user, pass, "DOMAINNAME");
                ldc.Credential = ncon;
                ldc.AuthType = AuthType.Negotiate;
                ldc.Bind(ncon); 
                validation = true;
            }
            catch (LdapException)
            {
                validation = false;
            }
            return validation;
        }

Friday, May 11, 2012

JD Edwards Defining a Hot Key in Your Application

To define a hot key, insert an ampersand before the letter that you want to set as the hot key in the Title property for the button that will have the hot key. You can set the definition from either the properties dialog or from the properties panel. The letter you define is then underlined in your application. Hot keys are governed by these rules:

  • You can define only one hot key for a button.

  • You cannot use the same hot key on more than one button in the same form or subform.

  • You cannot use a reserved hot key (any that is not in the list of application-defined hot keys).

  • You cannot insert more than one ampersand in the same button title.

  • You must check the Hot Key property for an exit definition only. Hot keys are enabled by default for push buttons.

    http://docs.oracle.com/cd/E17984_01/doc.898/e14706/hot_keys.htm#EOTFD00256

jd edwards Grid Control Events

To add columns to a grid control:
  1. Perform one of these tasks:
    • To add a data item to the grid from the BV associated with the form, double-click a data item in the Business View Columns Browser.
    • To add a data item to the grid that is not in the BV associated with the form, search for a data item in the Data Dictionary Browser, and then double-click it.
      Each time you double-click an item, Form Design Aid (FDA) adds it as a column to the grid control.
  2. Repeat step one until you have added all of the columns you need.
  3. Double-click the grid control.
  4. On Grid Properties, click the Columns tab and arrange the column order by selecting a column and then using the Up and Down buttons to shift its position in the list.
  5. Click the Sort Order tab and set the order in which the system will sort returned records by performing these steps:
    1. Select a data item in the Unsorted Columns list and click the right arrow. Repeat for each data item on which you want to sort.
      The data item moves to the Sorted Columns list.
    2. To toggle between displaying by ascending and descending order, click the data item in the Sorted Columns list.
      The letter A next to the data item indicates that the system will display records in ascending order. The letter D next to the data item indicates that the system will display records in descending order.
    3. Arrange the column sort order by choosing a column in the Sorted Columns list and then using the Up and Down buttons to shift its position in the list.
      http://docs.oracle.com/cd/E17984_01/doc.898/e14706/grid_controls.htm#g8d6ab57f7cedeaac_ef90c_10a77c8e3f7__7257

Monday, May 7, 2012

SQL Azure

SQL Azure provides a relational database management system for the Windows Azure platform, and is based on SQL Server technology. With a SQL Azure database, you can easily provision and deploy relational database solutions to the cloud, and take advantage of a distributed data center that provides enterprise-class availability, scalability, and security with the benefits of built-in data protection and self-healing.
 
 

Sunday, May 6, 2012

Create your own theam Windows 7 - your own photos

To use your own pictures

Find the pictures that you want to include in your slide show. All of the pictures must be located in the same folder.

Open Desktop Background by clicking the Start button  and clicking Control Panel. In the search box, type desktop background, and then click Change desktop background.

If the pictures that you want to use aren't in the list of desktop background pictures, click the Picture location list to view other categories, or click Browse to search your computer for the folder where the pictures are located.


Look for pictures in other locations on your computer.
Select the check box for each picture that you want to include in your slide show.

By default, all of the pictures in a folder are selected and will be part of the slide show. If you don't want all of the pictures in the folder to be included, do one of the following:

Clear the check box for each picture that you want to remove from the slide show.


Clear the check box to remove a picture from the slide show.
Press the Ctrl key, and then click each picture that you want to remove. Only the selected pictures will appear in the slide show.

To create a slide show of pictures on the desktop, you must select more than one picture. If only one picture is selected, the slide show ends and the selected picture becomes the desktop background.



Error: Date is in this Yr but Prior Mth The date being edited is in the current year but in a prior month.

How to fix following:-

Subject       : Error: Date is in this Yr but Prior Mth
CAUSE . . . .  The date being edited is in the current year but in a prior
               month.
RESOLUTION. .  This is an error if in the General Accounting Constants you
               do not allow PBCO (posted before cutoff) entries.  Change the
               date or change the General Accounting Constants to allow PBCO
               entries.
 
 
 
open the period and try to post again, but this method will change you prior period balance.

 

Friday, May 4, 2012

Toshiba satellite reinstall windows 7 Problem

one day my Toshiba satellite stopped working, I tried all the option to fix the boot problem , including advance, restore last known configuration , but failed. Toshiba has not provided any reinstall / recovery CD with system, So I asked my friend about recovery CD, he gave me Dell CD. I tried to re-install windows from that and got success. one interesting thing, when i reinstall it created backup of old files itself(great feature).so no loss of file.  
 

after that I got message my windows is not genuine , I found product key below my laptop and activated again.

thank God my 1 year old pc started working again. I reinstall all the old software.

 

Thursday, April 12, 2012

Excel to SQL-Server Insert in vba apostrophe in sql

Excel to SQL-Server Insert in vba.ado.net, connectionstring & handling apostrophe 

Private Sub CommandButton1_Click()
Dim adoCN As ADODB.Connection
Dim sConnString As String
Dim sSQL As String
Dim lRow As Long, lCol As Long
 
sConnString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=visliDB;Data Source=USER-PC\SQLEXPRESS;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=USER-PC;Use Encryption for Data=False;Tag with column collation when possible=False"
Set adoCN = CreateObject("ADODB.Connection")
adoCN.Open sConnString
For lRow = 2 To 11
   'replace
   Dim MyString As String
   MyString = Replace(Sheet1.Cells(lRow, 3), "'", "''")
   MyString = Replace(MyString, """", """")
   FixMyString = MyString
   
    sSQL = "INSERT INTO YRTAB (FIELD1, FIELD2, FIELD3) " & _
            " VALUES (" & _
            "'" & Sheet1.Cells(lRow, 1) & "', " & _
            "'" & Sheet1.Cells(lRow, 2) & "', " & _
            "'" & FixMyString & "')"
    adoCN.Execute sSQL
Next lRow
adoCN.Close
Set adoCN = Nothing
End Sub

Tuesday, April 10, 2012

Execute SSIS package -dtexec

in sql-server

EXEC xp_cmdshell 'dtexec /FILE "C:\\Package.dtsx" /SET \Package.Variables[User::FileName].Properties[Value];"C:\\linkservertest.xlsx"'

in batch command

dtexec /FILE "C:\\Package.dtsx" /SET \Package.Variables[User::FileName].Properties[Value];"C:\\linkservertest.xlsx"

Monday, April 9, 2012

Dynamically creating Excel File, ExcelSheets and Exporting Data from SQL Server using SSIS 2005 - CodeProject®

Dynamically creating Excel File, ExcelSheets and Exporting Data from SQL Server using SSIS 2005 - CodeProject®

Setting up an SSIS package with a dymanic Excel Source

Setting up an SSIS package with a dymanic Excel Source

Excel sql SSIS with variable file name

-- exec dbo.import_data 'C:\Documents and Settings\varunj\My Documents'
ALTER       procedure dbo.import_data
@FilePath varchar(2000)
--@filename  varchar(2000)
as
declare 
 @sql nvarchar(50),
        @Bank_code numeric(35),
        @Bank_transaction numeric(35),
 @Money_trn   numeric(35),
 @Check_num varchar(25),
  
 @FilePath varchar(2000),

 @dtsname varchar(1000),

 @cmd varchar(2000)


set @dtsname = 'Package.dtsx'

select @cmd = 'DTExec /F "' + @FilePath + @dtsname + '"'

print @cmd

set @sql = ''

--insert new records
insert into dbo.import_data2 (Bank_code,Bank_transaction, Money_trn, Check_num )
select a.Bank_code,a.Bank_transaction, a.Money_trn, a.Check_num
from dbo.import_data1 a left join 
dbo.import_data2 b 
on a.bank_code=b.bank_code
where b.bank_code is null

-- update existing records
update dbo.import_data2
set money_trn = x.Money_trn, Bank_code = x.Bank_code, Bank_transaction = x.Bank_transaction, Check_num = x.Check_num
from 
(select a.Bank_code,a.Bank_transaction, a.Money_trn, a.Check_num
from dbo.import_data1 a join 
dbo.import_data2 b 
on a.bank_code=b.bank_code) x
where import_data2.bank_code = x.bank_code

--clean up import_data1 (temp table)
truncate table dbo.import_data1

exec master..xp_cmdshell @cmd

GO


http://www.bidn.com/forums/microsoft-business-intelligence/integration-services/310/passing-a-filepath-in-ssis

Excel SpreadSheet variable Filename to SSIS

Without being able to see the package you've created, I can't be certain what the problem may be. Have you confirmed that the Excel file you're using is not corrupt (trying opening it in Excel)?

I created a simple package (using BIDs on a 32-bit machine) that contains an Excel Source & OLE DB Destination, Excel Connection Manager, and an SSIS variable that stores the full path to the Excel file. The package runs successfully. Here are the steps I followed. I hope this is helpful in resolving the error you're getting:

1. Added Excel Source.
2. Added Excel Connection Manager, clicked Edit, and entered the full file path in the Excel file path box (C:\Work\Excel Folder\TestBook97.xls). Saved changes.
3. Configured the Excel Source to point to the connection manager.
4. Added a string variable to the package, confirmed that the variable scope was Package, and filled in the variable value (C:\Work\Excel Folder\TestBook97.xls).
5. Added an expression to the Excel Connection Manager, to set value of the ExcelFilePath property using the string variable.
6. Connected the Source to the Destination.

Thursday, April 5, 2012

Connect between Excel SQL-Server update delete

Opendatasource provides the means to create adhoc connections. It uses a linked server object. You can access server locally or remotely. You can add the same kind of parameters as a linked server object including username and password. If you need to access a remote server using an ole db provider such as the "Microsoft.ACE.OLEDB.12.0" you need to set the registry option "DisallowAdhocAcces " to 0 and of course the Ad hoc Distributed

Sunday, February 5, 2012

Gridview remove column

GridView1.Columns.RemoveAt(2);

Friday, January 13, 2012

Getting result

select

WWMLNM,* from crpdta.F0111 a

left

outer join crpdta.f0101 on wwan8=aban8

where

WWIDLN=0 and ABTAXC in('N' , 'P','1' )

and

wwan8 in(select a6an8 from crpdta.f0401)

and

WWMLNM like '%,%' and upper(WWMLNM) =WWMLNM COLLATE Latin1_General_BIN

Wednesday, January 4, 2012

Convert datetime with 00 time - sql-server

select cast(convert(char(11), getdate(), 113) as datetime)