Validation of database object names
Hello. I need a function that can check whether a given string is a valid database object name. For example:
IsValid('col1') -> Yes
IsValid('col 1') -> No
IsValid('1col') -> No
Is there any build in the Oracle or does anyone have such an UDF?
Thank is advance.
You can use the wildly inappropriately named comma_to_table procedure. It checks the name and generates an exception if it is not valid.
SQL> var s varchar2(30)
SQL> exec :s := 'col1'
PL/SQL procedure successfully completed.
SQL> declare
2 u dbms_utility.uncl_array;
3 n pls_integer;
4 begin
5 dbms_utility.comma_to_table(:s,n,u);
6 dbms_output.put_line ('Valid: ' || :s);
7 exception
8 when others then
9 dbms_output.put_line ('Invalid: ' || :s);
10 end;
11 /
Valid: col1
PL/SQL procedure successfully completed.
SQL> exec :s := '1col'
PL/SQL procedure successfully completed.
SQL> /
Invalid: 1col
PL/SQL procedure successfully completed.
SQL> exec :s := 'test'
PL/SQL procedure successfully completed.
SQL> /
Valid: test
PL/SQL procedure successfully completed.
SQL> exec :s := 'test@'
PL/SQL procedure successfully completed.
SQL> /
Invalid: test@
PL/SQL procedure successfully completed.
SQL>
Similar Messages
-
What is maximum length of oracle database objects name
Hi all,
Can anyone tell me what is maximum length of oracle database objects name .
I guess it is 30 ,correct me if i am wrong thank you.
regards,
P PrakashSome objects (like synonyms or java classes) can have longer names than 30 chars:
SQL> create or replace synonym empempempempempempempempempempempempemp for emp
Synonym created.though internally oracle will generate short names for such objects:
SQL> select synonym_name from user_synonyms where synonym_name like '%EMPEMPEM%'
SYNONYM_NAME
/969ea190_EMPEMPEMPEMPEMPEMPEM
1 row selected.and not always will the long name be actually usable:
SQL> select * from empempempempempempempempempempempempemp
Error at line 1
ORA-00972: identifier is too long -
Retrieve all source database object names from an application in APEX 4.0
Hello
I have completed an application developed in APEX 4.0 ( @Oracle 10g database ).
Now we need to migrate the scripts including all database objects that support the application from Schema A to Schema B.
Is there a report I can run to provide me the information like this :
Page number, Name of the database object used ( including table, view and sequence )
This would allow me to examine each database object used in Schema A and make sure the same object and data have been copied to Schema B without missing anything.
Thanks
SusannaHi,
On APEX 4.1 there is Database Object Dependencies Report
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldr_app_rpt.htm#CEGGAICH
I'm not sure is this feature in APEX 4.0
Regards,
Jari
http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0 -
Fully qualified database object names
Is there a method to determine the fully qualified name of a database object such as a table or procedure? At the moment I compute this from the catalog and schema identifiers but I am hoping there is a more direct way.
Thanks,
KPgive an example for what u r looking for.
which DB ?For example, a Sybase table named "table1" in a schema "dbo" in database "db1" has a fully qualified name of "db1.dbo.table1". I am trying to find a way to do this in a database-independent way. It's not as simple as concatenating the 3 elements together because you have to take into consideration the fact that the database may not use schemas or databases or both etc. I am hoping there is a method or a series of methods that return this information.
KP -
Help finding OS-level database object names
Hello all...
I need to perform an online reorganization of some tables on my QAS system.
However, some of the tables have more than 8 characters on SAP and I need to know what's the corresponding object name on the database library at OS level, so I can use the RGZPFM command.
Could you please let me know how to find out the object's name?
I can't find that information on SE14 or SE11...
Thanks
AntonioHi Antonio,
I always use the following SQL:
SELECT SYSTEM_TABLE_NAME, TABLE_NAME
FROM r3t01data/systables
WHERE
table_name like 'MAR%'
Regards
Volker Gueldenpfennig, consolut international ag
http://www.consolut.com http://www.4soi.de http://www.easymarketplace.de -
just curious, since we all know objects names longer then 30 characters are never needed and even more, it is risky and bad to allow it, when oracle will change mysql object names and cut it to 30 characters ?
IkrischerIkrischer wrote:
Actually, we don't all know it. There was quite a lively discussion here some time back, started by someone who tried to make the case for going the other way .. change oracle to allow even longer object names. that was me, I tried to be ironic in this post since oracle company now got a dbms with obejct names longer then the magic and holy border of 30 characters.
Then you need to get a life. Look at everything that is going on in the world and ask yourself where this non-problem rates on the scale. The first time you brought it up I chalked it up to an intellectual discussion, even if somewhat pointless and obtuse. To bring it up again tells more about you than it does about Oracle.
Not in our lifetime the real question is, if mysql is working well with names longer then 30 characters, why oracle has a problem with it ?
Ikrischer -
Oracle database object name 30 characters limit
Hi,
I'm working with Oracle since version 8 and I know about this restriction. I was hopping that this will be eliminated in the future, but I saw that in Oracle 11i the same restriction exists.
Does anyone know if it will be eliminated in a future release?
I would like to know if there is a reason why this limitation exists. We are currently developing an JPA application and we have tables that have name with more than 30 characters.
Thanks!because all table/index names must be stored in the data dictionary and that storage is only allocated for 30 characters
Also check
http://stackoverflow.com/questions/1378133/why-are-oracle-table-column-index-names-limited-to-30-characters -
Function that returns a valid object name
Hello,
I heard there was a new function that would return a unique unused valid
object(table) name that could then be used to create an object
by that name, but I can not seem to find it in the documentation references.
What I want to do is to create tables, then drop them at a later date
without having to check if that name has been used already
or creating a sequence.
Any ideas?You may be thinking of SYS_GUID which can be used to generate unique identifiers for objects, as in TYPEs. Not database objects like TABLEs. The SYS_GUID datatype is "the 32-character hexadecimal representation of the 16-byte RAW value of the global unique identifier". Consequently it is very likely to start with a digit and so is not valid as a table name.
You could generate a valid random name using something like this: 'A'||to_char(sysdate, 'YYMMDDHH24MISS'). If you want to create more than one per second you'll have to create a function that increments some global counter to ensure uniqueness. However, DDL like creating or dropping tables is a performance killer and not really something you want to do on the fly.
Cheers, APC -
Invalid DataStore object name /BIC/B0000173: Reason: No valid entry in tabl
Hi gurus,
I recently transported the 0FI_GL_10 datasource to preproduction. when i am trying to load the data in PrePod we are getting this error message.
<b>Invalid DataStore object name /BIC/B0000173: Reason: No valid entry in table RSTS</b>
Any help is appreciated with points.any more detailed messages,sm21 or st22??
did you try doing RSRV on the datastore object??
are you using the nw2004s data flow??
if using 3.x data flow ,skip PSA and try reloading it.
Hope it Helps
Chetan
@CP.. -
What is the Table/View name for getting the Database Object Dependencies
I am running the Database Object Dependencies report to get the reference of Database Object and their respective Application Component.
Applications xxxx -> Application Reports -> Shared Components -> Database Object Dependencies -> Compute Dependencies
I want to develop a report for the same purpose, Just want to know what is the APEX Tables / Views they are using to run this report, so that I can use the same Tables to create my own report.
Thanks,
DeepakHi Andy,
when I am using the following query...I am not getting any result...
select name, type, owner
from all_dependencies
where referenced_owner = 'APEX_030200'
and referenced_name = 'WWV_FLOW_PATCHES'
AND OWNER= 'XXXXXXX' --- (addeed this to the where clause)
I modified the query.....I am getting the result.....
select name, type, owner
from all_dependencies
AND OWNER= 'XXXXXXX'
- But I am not getting which database object(table/view) is using which Application Page/Component like we have in Database Object Dependencies.
- Also what is this REFERENCE OWNER & REFERENCE_NAME ----
referenced_owner = 'APEX_030200'
and referenced_name = 'WWV_FLOW_PATCHES'
I am little bit confused, Can you pl expalin me in details......
Thanks,
Deepak -
Object name stored in Database table
Hi all,
Lets say I have a Database table that contains the name of the window
objects that I want to create and display at run-time, how do I go about
creating that object from the table field wich is a string ?
Example :
MenuTable { ItemNo, IsFolder, ParentFolder, PromptMsgNo, ..., WindowName,
StartMethod }
Then I use this table to fill in a TreeView or OutlineView using a
Subclassed DisplayNode that contains
the WindowName and WindowMethod fields.
When the user selects a node I want to instantiate an object of the type
indicated in WindowName and
do a start task of the method indicated by WindowMethod for WindowName.
How could I code the following lines ? :
theWindow : "--> Content of CurrentNode.WindowName" = new;
start task theWindow."--> Content of CurrentNode.WindowMethod";
Goal :
Be able to customize the menu system without customizing code for each
client.
Any idea on alternative methodes to reach the the goal would also be
appreciated.
Thanks in advance.
Christian Boult ([email protected])
Systemes Influatec inc.Hi Christian,
When the user selects a node I want to instantiate an object of the type
indicated in WindowName and
do a start task of the method indicated by WindowMethod for WindowName.
How could I code the following lines ? :
theWindow : "--> Content of CurrentNode.WindowName" = new;
start task theWindow."--> Content of CurrentNode.WindowMethod";---<<<---
cl : integer = 0;
aLib : Library = task.part.findLibrary(projectName = 'MeineTestKlassen',
distributionID = 'test',
compatibilityLevel = cl,
libraryName = 'meinetes');
aType : ClassType;
myObject : Object;
// myObject : meinNeuesObjektClassTypeName;
aType = aLib.FindClass(className = meinNeuesObjektClassTypeName);
myObject = aType.InstanceAlloc();
myObject = (object)(meinNeuerStream.ReadSerialized());
--->>>---
This code is part of a method that stores objects persistent into a Database
and then restores and instantiates them.
You'll have to put the Name of the Class your Object should be of in the
"meinNeuesObjektClassTypeName" Attribute. Then, aType.InstanceAlloc()
instantitates an Object of the given Class.
Please note that, due to the diefferences between the declared and the
runtime class type (Object vs. whatever class your object is of) you'll have
to cast your Object to the correct class. (I used to create a virtual
Superclass for this, which contains the method(s) to be called and the
needed Attributes and then cast all created objects to that superclass).
(You might also use a Template for this and implement that in all classes
that need it -- but I didn't try it yet, so I don't know if it really
works).
Hope that helps...
ralf
/* Ralf Folkerts
Geschaeft: [email protected]
Privat: [email protected] */
-----Ursprüngliche Nachricht-----
Von: Christian Boult <[email protected]>
An: Forte Maling list <[email protected]>
Datum: Dienstag, 31. März 1998 04:59
Betreff: Object name stored in Database table -
Search for objects in database by name
Want to search packages, views, table, functions for an object name 'company_search' . What is the query from data dictionary?
Thanksuser568155 wrote:
Want to search packages, views, table, functions for an object name 'company_search' . What is the query from data dictionary?
ThanksThere are several data dictionary views you can reference, including
* DBA/ALL/USER_OBJECTS
* DBA/ALL/USER_VIEWS
* DBA/ALL/USER_SOURCE (may contain text internally in the TEXT column)
* DBA/ALL/USER_ARGUMENTS
You will have to search the _SOURCE view line by line for packaged procedures and functions. To search packages you will have to loop through the source lines one by one to search for the text you want
A query would look something like
select object_name
from dba_objects
where object_name like '%COMPANY_NAME%';Edited by: riedelme on Sep 20, 2012 9:02 AM -
When trying to create a new user profile service application on a new SharePoint install I get the following error:
"The specified database is not a valid synchronization database"
The installation then fails and does not create the third database.
I found some threads with similar problems but it involved upgrading an existing db. In this case we want to create a new one. Here is the relevant ULS log info:
Starting schema provisioning of SynchronizationDatabase 'SP15_TEST_ENT_SyncDB'
Provisioning the SP15_TEST_ENT_SyncDB database with the script at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Template\SQL\SPS\drop_procs.sql.
Provisioning the SP15_TEST_ENT_SyncDB database with a script stream.
Ensuring that the SP15_TEST_ENT_SyncDB database exists . . .
The SP15_TEST_ENT_SyncDB database does not exist.
It will now be created.
Setting the AutoClose option to False on the database SP15_TEST_ENT_SyncDB.
Setting the ArithAbort option to True on the database SP15_TEST_ENT_SyncDB.
Setting the TruncLogOnChkpt option to True on the database SP15_TEST_ENT_SyncDB.
Starting schema evaluation of existing SynchronizationDatabase 'SP15_TEST_ENT_SyncDB'
Validate Database: validating sync database
Validate Database: validation failed: Error code -2
Application error when access /_admin/NewProfileServiceApplicationSettings.aspx, Error=The specified database is not a valid synchronization database
at Microsoft.Office.Server.Administration.SynchronizationDatabase.Provision()
at Microsoft.Office.Server.Administration.UserProfileApplication.Provision()
at Microsoft.SharePoint.Portal.UserProfiles.AdminUI.NewProfileServiceSettingsPage.DoCreateApplication()
at Microsoft.SharePoint.Portal.UserProfiles.AdminUI.NewProfileServiceSettingsPage.OnOkButtonClick(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Microsoft.SharePoint.Administration.SPDatabaseException: The specified database is not a valid synchronization database
at Microsoft.Office.Server.Administration.SynchronizationDatabase.Provision()
at Microsoft.Office.Server.Administration.UserProfileApplication.Provision()
at Microsoft.SharePoint.Portal.UserProfiles.AdminUI.NewProfileServiceSettingsPage.DoCreateApplication()
at Microsoft.SharePoint.Portal.UserProfiles.AdminUI.NewProfileServiceSettingsPage.OnOkButtonClick(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.SharePoint.Administration.SPDatabaseException:
The specified database is not a valid synchronization database
at Microsoft.Office.Server.Administration.SynchronizationDatabase.Provision()
at Microsoft.Office.Server.Administration.UserProfileApplication.Provision()
at Microsoft.SharePoint.Portal.UserProfiles.AdminUI.NewProfileServiceSettingsPage.DoCreateApplication()
at Microsoft.SharePoint.Portal.UserProfiles.AdminUI.NewProfileServiceSettingsPage.OnOkButtonClick(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I Tried to create another one under a different name (databases also) and I get the same error.
The SharePoint instance has the march mandatory update installed. The sql instance we are using is an existing SQL cluster for other SharePoint poc's.
Has anybody seen this issue before?I had the same problem and could not figure out what was wrong for the longest time. I then had the idea to check in the model system database to see if there were any extra custom tables in that database. Any tables that are in the model database
are put into any new database when it is created. I had some custom tables in the model database so I deleted the custom tables in the model database and deleted the failed user profile service application and its databases and then tried to recreate
the user profile service application again and it worked with no errors -
SP 2013 Server + Dec 2013 CU. Upgrading from SharePoint 2010.
We have a web application that is distributed over 7-8 content databases from SharePoint 2010. All but one database are upgradable. However, one database gives:
Invalid object name 'Webs'.
while running Test-SPContentDatabase or Mount-SPContentDatabase.
EventViewer has the following reporting 5586 event Id:
Unknown SQL Exception 208 occurred. Additional error information from SQL Server is included below.Invalid object name 'Webs'.
After searching a bit, these links do not help:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/fd020a41-51e6-4a89-9d16-38bff9201241/invalid-object-name-webs?forum=sharepointadmin
we are trying PowerShell only.
http://blog.thefullcircle.com/2013/06/mount-spcontentdatabase-and-test-spcontentdatabase-fail-with-either-invalid-object-name-sites-or-webs/
In our case, these are content databases. This is validated from Central Admin.
http://sharepointjotter.blogspot.com/2012/08/sharepoint-2010-exception-invalid.html
Our's is SharePoint 2013
http://zimmergren.net/technical/findbestcontentdatabaseforsitecreation-problem-after-upgrading-to-sharepoint-2013-solution
Does not seem like the same exact problem.
Any additional input?
Thanks, Soumya | MCITP, SharePoint 2010Hi,
“All but one database are upgradable. However, one database gives:
Invalid object name 'Webs'.”
Did the sentence you mean only one database not upgrade to SharePoint 2013 and given the error?
One or more of the following might be the cause:
Insufficient SQL Server database permissions
SQL Server database is full
Incorrect MDAC version
SQL Server database not found
Incorrect version of SQL Server
SQL Server collation is not supported
Database is read-only
To resolve the issue, you can refer to the following article which contains the causes and resolutions.
http://technet.microsoft.com/en-us/library/ee513056(v=office.14).aspx
Thanks,
Jason
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Jason Guo
TechNet Community Support -
Invalid DataStore object name /BIC/B0005712
Hi Frnds,
I was trying to execute a PSA deletion step on one Datasource. In that process I got the below error.
Error msg: Invalid DataStore object name /BIC/B0005712: Reason: No valid entry in table RSTS.
Do, I need to maintain anything related to this Datasource in the table RSTS. if so....what it could be ?
Or Do we have any other solution ?
Thank you.
NGR.Hi,
In my case,
Inspite of going through several valid NOTES & program, my issue didnt resolve.
I have resolved the issue by adjusting the PSA table for the same.
Procedure:
Take the psa name --> go to table rstsods --> find the ODSNAME_TECH name for the relevant psa --> se38 t.code --> enter ODSNAME_TECH and click on 'adjust & activate database table' (make sure you have selected 'save data' radio button.
Just in case anyone who come across this problem, can do the above steps.
Regards,
Dubbu.
Maybe you are looking for
-
Hide column based on parameter value
Hi All, I have requirement where i need to hide one column based on my input parameter value.per example if my parameter say DISPLAY is Yes then i need to hide the column AMOUNT.. how to achieve this... Please help. Thanks Bharat
-
Alternate Reconciliation A/c uses
Dear All, Any one please explain in detail , why we use Alternate reconciliation a/c fro Vendor or Customer , explain with example . Point to be awarded . Thanks in advance Milind
-
VPDN - L2TP Tunneling with IP pool on ACS 4.2
Hi all, We have below scenario : Scenario 1 : I have implemented L2TP tunneling with authentication using radius and ip address assignment using local pool on AAA client devices. "2 client initiates L2tp tunneling using the same username , and both
-
I get the following error message everytime I turn my computer on & sign in: C:\Users\MyName\AppData\Local\Temp\octDF9D.temp.exe (The 4 characters following oct change each time) Windows cannot access the specified device, path, or file. You ma
-
So my original footage is 1920x1080 AVCHD 25fps and when I create a DVD (after transcoding) I always lose a little bit of my image size and when played on a DVD player my image seems to have been cropped. Not by much just the edge. I have tried expor