I have created an Enterprise Geodatabase in Oracle 11g DB. When I try to register this DB with Arc GIS Server either from arc gis desktop or arc gis manager it says "The file path does not exist or is too long (> 512 chars) or has invalid characters .]
Can anyone let me know what could be the reason for this.
Can you please verify that the version of your Oracle client matches that of your database? You say that you have an Oracle 11g database, but you need to first make sure that your client is of the same of later version. If your database is 11g R2 (as an example, 188.8.131.52) but your client is 11g R1 (as an example, 184.108.40.206) or 10g (as an example, 10.2.0.1) then you could run into issues. Also, have you installed the full version (administrator) of the client or a different version?
If the above doesn't help, then refer to the following...
Which versions of ArcGIS Server and ArcSDE are you using?
Is SDEHOME correctly defined in the environment variables? (From command prompt, type echo %SDEHOME%)
For the SDE connection file you're using to register your enterprise GDB as a data store, does it use an ArcSDE application service or does it use EZCONNECT? (If EZCONNECT, is your Oracle instance configured for EZCONNECT?)
If ArcGIS for Desktop 10.2 and ArcGIS for Server 10.2 are installed on the same server, you will need to make sure that both the 32-bit and 64-bit Oracle clients are also installed on the server. Is that the case? The PATH environment variable must have the 64-bit client listed first before the 32-bit client. Please verify this.
So for the "Service" parameter in the Geodatabase Connections properties of your SDE connection file, what is the value you're putting in? Is it only the TNSNAME or is it sde : oracle11g:TNSNAME or could it be sde : oracle11g:TNSNAME;port_number ? If your service value has a colon or semi-colon then try to remove it and just use TNSNAME to see if it connects without an error.