DBA role cannot update a table
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> show user
USER is "JIMMYB"
SQL> select granted_role from dba_role_privs where grantee ='JIMMYB';
GRANTED_ROLE
CTXAPP
DBA
SQL> select user_seq, person_id from cmis.users
2 where last_name = 'ZIGGY';
USER_SEQ PERSON_ID
12788 1246277
SQL> update cmis.users
2 set
3 person_id = 10991
4 where user_seq = 12788;
update cmis.users
ERROR at line 1:
ORA-00942: table or view does not existHow can the DBA role not be allowed to update this table?
I'm not sure what I am missing here. I've never encountered this before.
SQL> desc cmis.users
Name Null? Type
USER_SEQ NOT NULL NUMBER
PERSON_ID NUMBER ENCRYPT
USERNAME VARCHAR2(50) ENCRYPT
PREFIX VARCHAR2(10)
FIRST_NAME VARCHAR2(100) ENCRYPT
MIDDLE_NAME VARCHAR2(100) ENCRYPT
LAST_NAME VARCHAR2(100) ENCRYPT
SUFFIX VARCHAR2(12)
EMAIL_ADDRESSS VARCHAR2(1000) ENCRYPT
USER_STATUS_SEQ NUMBERI can't imagine it has anything to do with transparent data encryption.
Similar Messages
-
I have some problems understanding DBA role. I have DBA privs on a database (I'm a developer, not a DBA). Because of a privacy problem, I have not to select data in only one table of the database. A solution could be to encrypt rows of this table... This will be the last choice, because in this case I will have to rewrite some applications. So, I'm trying to create a new role in which I have all privileges except SELECT ANY TABLE. Then I will have to lose my DBA privs. During ordinary operations necessary to mantain my applications (like backup, import and export and so on...), I will have DBA privs granted again from the privacy manager only for the period necessary to mantain the site. After this period I have to sign a paper in which I declare I have not seen the records of that table. As you can imagine, this solution is very bad (during that period I can create 1000 users with dba privs...), but seems to be fine to the privacy manager.
Now my problem is: after creating the role DBA_WSAT that is the DBA role without select any table, I can connect as sysdba again... Why? Which is the privilege that enable a user to connect as sysdba? Any suggestions will be appreciated to solve this bad situation...
Thank you very much.
Ste.You probably have an entry in the password file that needs to be removed if you are no longer a DBA.
Have you considered auditing access to this sensitive table, either in addition to the current proposal or instead of it? That would be far more secure than signing the piece of paper periodically.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
REVOKE insert on tables from use with DBA role
Hi
I have two users with DBA role granted. I want to remove insert/update capabilities of a certain tables from one of the users but keep the DBA role. Is this possible ?
ThanksNo.
Do not even think about messing with the DBA role!!
You cannot grant global privileges through a role, then ungrant select privileges from an individual.
What you need to do is to crate your own local DBA-like role (or roles). Grant the global privileges all DBAs need to your own DBA-like role and grant that to the DBAs. Then grant privileges on the tables to various roles and grant them to the individual DBAs. That way you can exclude the privileges you do not want to grant.
But, ultimately, you need to be able to trust your DBA to follow procedures, rules, and instructions. If you cannot, perhaps he should not be a DBA. -
Updating a table of different database user using db links
Consider two databases
db10gA and db10gB which is having a db link from A to B
There is a user A in db10gA
and another user B in db10gB
the user require to insert,update,delete records of user B tables
so how is the DML privileges are granted to user A to perform these tasks at db10gB database
whether it is the type of db link decides to do these tasks
whether any synonym created at db10gA side might help to do the jobuser7993571 wrote:
Consider two databases
db10gA and db10gB which is having a db link from A to B
There is a user A in db10gA
and another user B in db10gB
the user require to insert,update,delete records of user B tables
so how is the DML privileges are granted to user A to perform these tasks at db10gB database
whether it is the type of db link decides to do these tasks
whether any synonym created at db10gA side might help to do the jobUser A will act on behalf of the user who has created the DBLINK; for example if you have created the DBLINK with a user having a DBA role; and grant the DBLINK access to A, A can act on behalf of the DBA who has created the DBLINK. -
Updating a table from two nodes simultaneously using sqlloader- Issues..
Hi,
I have a two node RAC. I have a table called PARTS1, has an PK+Index on PART column, Again this has a sequence. Now I am loading data on PARTS1 table using sqlloader from both nodes at the same time. What issues will come?
Since one column of this table has a PK+Sequence+Index, there will be a contention issue with the block while updating records.. am I right? What other isues might appear here?
Thanks in advance,
Lily.user7993571 wrote:
Consider two databases
db10gA and db10gB which is having a db link from A to B
There is a user A in db10gA
and another user B in db10gB
the user require to insert,update,delete records of user B tables
so how is the DML privileges are granted to user A to perform these tasks at db10gB database
whether it is the type of db link decides to do these tasks
whether any synonym created at db10gA side might help to do the jobUser A will act on behalf of the user who has created the DBLINK; for example if you have created the DBLINK with a user having a DBA role; and grant the DBLINK access to A, A can act on behalf of the DBA who has created the DBLINK. -
PDB_DBA has DBA role, but no quota on tablespace
Hi all,
I have weird situation and I can't find in doco why is that:
I have created PDB with role DBA for admin user, I can see that PDB_DBA role has DBA role. I can create table in admin user schema, but can't insert rows there, as there are no quota on tablespace. If I grant DBA to admin user directly- I can insert rows - so, I got "quota unlimited" as part of DBA role:
SQL> conn / as sysdba
Connected.
SQL> create pluggable database P1 admin user a identified by a roles=(dba);
Pluggable database created.
SQL> alter session set container=P1;
Session altered.
SQL> alter pluggable database P1 open;
Pluggable database altered.
SQL> create table a.t(id integer);
Table created.
SQL> insert into a.t values(1);
insert into a.t values(1)
ERROR at line 1:
ORA-01950: no privileges on tablespace 'SYSTEM'
SQL> select * from dba_role_privs where grantee = 'A';
GRANTEE
GRANTED_ROLE ADM DEL DEF COM
A
PDB_DBA YES NO YES NO
SQL> select granted_role from dba_role_privs where grantee = 'PDB_DBA';
GRANTED_ROLE
DBA
SQL>
SQL> grant dba to a;
Grant succeeded.
SQL> insert into a.t values(1);
1 row created.
SQL> revoke dba from a;
Revoke succeeded.
SQL> insert into a.t values(1);
1 row created.
SQL>What is the full version of Oracle 12c that you are using?
That does seem odd. Especially since revoking the direct grant leaves the privilege intact which could only come from the role.
What happens if you bounce the DB after the initial INSERT failure? Does it continue to fail if the direct grant isn't made?
Also - did you specify FILE_NAME_CONVERT as an init parameter?
If you have a MOS account I suggest you search to see if there are any bugs related to PDB privileges.
There have been some known issues with the whole PDB metadata link thing. System tables only exist in the root and the PDBs only have metadata links to the actual system entries. It's possible that the metadata link didn't get created or propagated properly after the PDB was created.
That is why I ask if you can try bouncing the database to see if the problem still persists.
The other, related, test to try is to first create the PDB (no other action at all such as grants, users, or anything). Then open the PDB and then shut it all down.
When you restart the entire DB and open the PDB then perform your test and see if you get the same results. The intent of that test is to see if the metadata entries are properly created and propogated AFTER the PDB actually exists.
Unfortunately (for you at least for now) there are so many nuances to the whole multitenant thing in the way privileges (among other things) work it will be a while until they all get sorted out.
Many of those are the management of privileges (roles, grants, etc) for PDBs given that some PDBs aren't open at the time the privilege change is made. If a PDB isn't open and you modify a common privilege there won't be any replication to that PDB and you will later have to update that PDBs privileges manually. -
Hi, i have experienced many time that when you give dba role to any schema it should get the privilege of Create any on all object. but it is not the case after giving dba privilege to schema i have to give create any privilege to that schema though DBA role have that Facility, why is it so.
Regards
Vikas ChopkarAre you talking about the default role named DBA? If so, that role should rarely be granted to anyone. Either way, on my database it has the privileges you say it doesn't.
SQL> SELECT * FROM DBA_SYS_PRIVS WHERE GRANTEE='DBA' ORDER BY PRIVILEGE;
GRANTEE PRIVILEGE ADM
DBA ADMINISTER ANY SQL TUNING SET YES
DBA ADMINISTER DATABASE TRIGGER YES
DBA ADMINISTER RESOURCE MANAGER YES
DBA ADMINISTER SQL TUNING SET YES
DBA ADVISOR YES
DBA ALTER ANY CLUSTER YES
DBA ALTER ANY DIMENSION YES
DBA ALTER ANY EVALUATION CONTEXT YES
DBA ALTER ANY INDEX YES
DBA ALTER ANY INDEXTYPE YES
DBA ALTER ANY LIBRARY YES
DBA ALTER ANY MATERIALIZED VIEW YES
DBA ALTER ANY OUTLINE YES
DBA ALTER ANY PROCEDURE YES
DBA ALTER ANY ROLE YES
DBA ALTER ANY RULE YES
DBA ALTER ANY RULE SET YES
DBA ALTER ANY SEQUENCE YES
DBA ALTER ANY SQL PROFILE YES
DBA ALTER ANY TABLE YES
DBA ALTER ANY TRIGGER YES
DBA ALTER ANY TYPE YES
DBA ALTER DATABASE YES
DBA ALTER PROFILE YES
DBA ALTER RESOURCE COST YES
DBA ALTER ROLLBACK SEGMENT YES
DBA ALTER SESSION YES
DBA ALTER SYSTEM YES
DBA ALTER TABLESPACE YES
DBA ALTER USER YES
DBA ANALYZE ANY YES
DBA ANALYZE ANY DICTIONARY YES
DBA AUDIT ANY YES
DBA AUDIT SYSTEM YES
DBA BACKUP ANY TABLE YES
DBA BECOME USER YES
DBA CHANGE NOTIFICATION YES
DBA COMMENT ANY TABLE YES
DBA CREATE ANY CLUSTER YES
DBA CREATE ANY CONTEXT YES
DBA CREATE ANY DIMENSION YES
DBA CREATE ANY DIRECTORY YES
DBA CREATE ANY EVALUATION CONTEXT YES
DBA CREATE ANY INDEX YES
DBA CREATE ANY INDEXTYPE YES
DBA CREATE ANY JOB YES
DBA CREATE ANY LIBRARY YES
DBA CREATE ANY MATERIALIZED VIEW YES
DBA CREATE ANY OPERATOR YES
DBA CREATE ANY OUTLINE YES
DBA CREATE ANY PROCEDURE YES
DBA CREATE ANY RULE YES
DBA CREATE ANY RULE SET YES
DBA CREATE ANY SEQUENCE YES
DBA CREATE ANY SQL PROFILE YES
DBA CREATE ANY SYNONYM YES
DBA CREATE ANY TABLE YES
DBA CREATE ANY TRIGGER YES
DBA CREATE ANY TYPE YES
DBA CREATE ANY VIEW YES
DBA CREATE CLUSTER YES
DBA CREATE DATABASE LINK YES
DBA CREATE DIMENSION YES
DBA CREATE EVALUATION CONTEXT YES
DBA CREATE EXTERNAL JOB YES
DBA CREATE INDEXTYPE YES
DBA CREATE JOB YES
DBA CREATE LIBRARY YES
DBA CREATE MATERIALIZED VIEW YES
DBA CREATE OPERATOR YES
DBA CREATE PROCEDURE YES
DBA CREATE PROFILE YES
DBA CREATE PUBLIC DATABASE LINK YES
DBA CREATE PUBLIC SYNONYM YES
DBA CREATE ROLE YES
DBA CREATE ROLLBACK SEGMENT YES
DBA CREATE RULE YES
DBA CREATE RULE SET YES
DBA CREATE SEQUENCE YES
DBA CREATE SESSION YES
DBA CREATE SYNONYM YES
DBA CREATE TABLE YES
DBA CREATE TABLESPACE YES
DBA CREATE TRIGGER YES
DBA CREATE TYPE YES
DBA CREATE USER YES
DBA CREATE VIEW YES
DBA DEBUG ANY PROCEDURE YES
DBA DEBUG CONNECT SESSION YES
DBA DELETE ANY TABLE YES
DBA DEQUEUE ANY QUEUE YES
DBA DROP ANY CLUSTER YES
DBA DROP ANY CONTEXT YES
DBA DROP ANY DIMENSION YES
DBA DROP ANY DIRECTORY YES
DBA DROP ANY EVALUATION CONTEXT YES
DBA DROP ANY INDEX YES
DBA DROP ANY INDEXTYPE YES
DBA DROP ANY LIBRARY YES
DBA DROP ANY MATERIALIZED VIEW YES
DBA DROP ANY OPERATOR YES
DBA DROP ANY OUTLINE YES
DBA DROP ANY PROCEDURE YES
DBA DROP ANY ROLE YES
DBA DROP ANY RULE YES
DBA DROP ANY RULE SET YES
DBA DROP ANY SEQUENCE YES
DBA DROP ANY SQL PROFILE YES
DBA DROP ANY SYNONYM YES
DBA DROP ANY TABLE YES
DBA DROP ANY TRIGGER YES
DBA DROP ANY TYPE YES
DBA DROP ANY VIEW YES
DBA DROP PROFILE YES
DBA DROP PUBLIC DATABASE LINK YES
DBA DROP PUBLIC SYNONYM YES
DBA DROP ROLLBACK SEGMENT YES
DBA DROP TABLESPACE YES
DBA DROP USER YES
DBA ENQUEUE ANY QUEUE YES
DBA EXECUTE ANY CLASS YES
DBA EXECUTE ANY EVALUATION CONTEXT YES
DBA EXECUTE ANY INDEXTYPE YES
DBA EXECUTE ANY LIBRARY YES
DBA EXECUTE ANY OPERATOR YES
DBA EXECUTE ANY PROCEDURE YES
DBA EXECUTE ANY PROGRAM YES
DBA EXECUTE ANY RULE YES
DBA EXECUTE ANY RULE SET YES
DBA EXECUTE ANY TYPE YES
DBA EXPORT FULL DATABASE YES
DBA FLASHBACK ANY TABLE YES
DBA FORCE ANY TRANSACTION YES
DBA FORCE TRANSACTION YES
DBA GLOBAL QUERY REWRITE YES
DBA GRANT ANY OBJECT PRIVILEGE YES
DBA GRANT ANY PRIVILEGE YES
DBA GRANT ANY ROLE YES
DBA IMPORT FULL DATABASE YES
DBA INSERT ANY TABLE YES
DBA LOCK ANY TABLE YES
DBA MANAGE ANY FILE GROUP YES
DBA MANAGE ANY QUEUE YES
DBA MANAGE FILE GROUP YES
DBA MANAGE SCHEDULER YES
DBA MANAGE TABLESPACE YES
DBA MERGE ANY VIEW YES
DBA ON COMMIT REFRESH YES
DBA QUERY REWRITE YES
DBA READ ANY FILE GROUP YES
DBA RESTRICTED SESSION YES
DBA RESUMABLE YES
DBA SELECT ANY DICTIONARY YES
DBA SELECT ANY SEQUENCE YES
DBA SELECT ANY TABLE YES
DBA SELECT ANY TRANSACTION YES
DBA UNDER ANY TABLE YES
DBA UNDER ANY TYPE YES
DBA UNDER ANY VIEW YES
DBA UPDATE ANY TABLE YES -
Error in updating condition table 372
Hello,
While saving Excise Invoice I am facing error 'Error in updating condition table 372'.Could you please solve this probelm?
Thanks in AdvanceDear All,
I done this--by doing some configuration changes.
Normally while doing Exports we are tempted to use the same sales area and accordingly we may give the combination of excise grp+series grp+export type in IMG>>>Logistics General>>>India>>>Business transactions>>>Outgoing excise invoices>>>Maintain default excise groups and series groups.
Once after removing the export type to your sales area combination--system will show this error--and we cannot even post the Excise invoices.(J1IIN)
I tried in my IDES--that with export type(Ex.Export under Bond)--with this assignment--i am able to post my excise invoices.
Once after removing this assignment of export type--again i am getting this error.
Actually i am not even aware why it is happening--almost after two months of struggle--i find this.
(i feel it is in the same way that we cannot even open/See a sales order by deleting sales group which was created&used previously)
i am sharing this because somebody may get a little help with my thread.
Mark this if helpful--there by others can easily find this thread.
Phanikumar -
Cannot use duplicate table name error in AMDP
Hi Experts,
I'm developing an application which has the following architecture
SAP UI5->Gateway->ABAP Managed DB procedures(AMDP)->HANA SP(Stored Procedure)
We are having a very peculiar problem where the gateway service works inconsistently for the same input data.
i.e If I execute the same service n number of times, I get the results successfully for say n-3 times but the other 3 times I get a "RFC Error :Error while executing Database procedure"
There is no change in the input data or DB table data during all the executions.
Running the stored procedure stand alone in HANA studio works all the time.
We tried executing the AMDP from SE24 and the same behavior occurred.
When trouble shooting we found that the exception occurs inside the AMDP when the call db procedure statement is executed.
Could you please advise what could be the possible reason for this any tuning parameter/unavailability of db connections?
Or could you please suggest some other troubleshooting mechanism by which we can zero in on the cause?
When I go in the debug mode I can see the exact error as
cannot use duplicate table name: [288] SAPXXX.ZCL_PLAN_MAINTENANCE=>GET_COMP_TYPE#stub#20140905055908: line 15 col 3 (at pos 492): cannot use duplicate table name exception:
where ZCL_PLAN_MAINTENANCE=>GET_COMP_TYPE is the AMDP class and method. SAPXXXis the schema.I reported this to Adobe customer support on 11/29, and here is their response:
Wednesday, December 5, 2007 12:51:27 PM PST
Hello John,
Thank you for contacting Adobe® Web Support for assistance with Adobe
Photoshop Elements® 6.0.
I understand that images are deleted if you accidentally try to move
them to a folder that already includes a file of the same name.
Thank you for bringing this to our attention. I was able to replicate
this behavior as well. The best method to report errors of this nature
is using the following form on our website:
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
I will report this to the product team through my channels. You may want to submit this issue through the web form as it goes directly to the product development team.
I hope this information helps to resolve your issue. If you require
further assistance with this issue, please update your web case with
complete details, including what steps you have applied and any error
messages you are receiving.
You may also call Technical Support at (800) 642-3623. We are available from 6:00 am to 5:00 pm Monday - Friday, Pacific Time.
Kind regards,
Alan C.
Adobe Web Support -
BAPI for Purchase Order Confirmation and update EKES table
Hi all,
I have a requirement to update the PO confirmation soon after successful creation of PO in an IDOC.
I have used BAPI_PO_CHANGE function module which didnt serve the purpose as it cannot update confirmations.
I tried using ME_CONFIRMATION_UPDATE where I was able to add a confirmation entry in EKES table but that is not being reflected in ME23N transaction when I display the PO.
Please help me out on this.
Thanks & Regards
PavanNB: Never use a standard update FM (check attributes of ME_CONFIRMATION_UPDATE) its often only a SQL statement collector without any check, logging of changes or database consistency, if you perform a where-used you should find it is never called alone but with a bunch of other update FM after checks and other update preparation.
Get back to the BAPI and table parameter POCONFIRMATION, also use BAPI_PO_GETDETAIL1 to get current data for the call of BAPI_PO_CHANGE.
Regards,
Raymond
PS: If it is not in 197958 - BAPIs for purchase orders: Missing functions, you should be able to do it -
API to update ap_invoices_all table
Hello all,
is there any API to update ap_invoices_all table? Please let me know.
thanks,Oracle uses AP_INVOICES_PKG API (Update_Row procedure) internally, but I believe you cannot use this API directly -- http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=AP_INVOICES_PKG&c_owner=APPS&c_type=PACKAGE
Please log a SR to confirm this with Oracle Support.
Thanks,
Hussein -
Updating database table based on BAPI response in case of error
Dear Experts,
My scenario includes pulling records from database stagging table, and push one record at a time to BAPI_ALM_NOTIF_CREATE.
I am using sender JDBC adapter(with select query and update query to mark records as processed).
My question is : Once XI selects records, immediately status is updated in stagging table for the selected records as processed. what if BAPI could not create document? In this case I need to update status of that record as "Not processed".
What should I use?
If BPM, then please tell me the steps.
Is this possible without BPM?
What are the chances of failure between XI and BAPI?
Please provide your inputs.
Thank you.
Div>
S.R.Suraj wrote:
> Hi Divyesh,
>
> Your steps are correct..
>
> 1. JBDC will read record with code = 0 and make it 1...
> 2. Once the bapi process is completed all these read records shoudl be made as 2 (if completed successful) else 0 if bapi went into some error.. so that again the jdbc adapter can poll these records and give back to bapi for processing...
>
> Now your questions
> >>So after selection and updation only proxy call will be done right? So for every polling of jdbc adapter ,proxy call will happen?
> YEs every poll of jdbc will result in a proxy call and every time it will contain next set of records (as the earlier one have already marked as 1)
>
> >>How to achieve this?
> Since this is a synchronous scenario JBDC->XI->Proxy and reverse, I have suggested to use responseonewaybean as a module in sender jdbc adapter (because sender jdbc cannot act synchronously thats why you need to use this module)..
>
> >>Do i need to use BPM? please suggest steps.
> and if this is not working then go for BPM..the steps as i mentioned in my first thread..
>
> Regards
> Suraj
Hi Suraj,
Thanks a lot for your support.
It would be good if you can provide your inputs.
Stagging table records status:
Flag = 0 (XI will poll records)
Flag = 1(XI has polled records and XI will se tthis flag by JDBC adapter)
Flag =2 (should be done based on response from Proxy Tables parameter) Proxy will set tables parameter which will include info on error message and type.
(Now based on new requiremets: for error records status should not be reset to 0 so that XI can poll records again, now stagging table should contain error records(for which proxy can not create notification in SAP) with error message and status flag 2)
Now scenario would be JDBC to Proxy.
Polling interval for JDBC adapter should be 1 minute.
So I think status 0 to 1 will be done by XI after immediately selecting records.
But how about Status 2 that has to be set only for error records only and with error information.
I have to update stagging table records with status 2 and error info based on proxy table response. How this can be done?
This updation will be done in case of error only.
I was thinking this aproach:
We can have two interfaces.
First interface will be jdbc to proxy:
JDBC adapter select and update records with flag =1 and then send to proxy call and create document in SAP. At SAP side if document can not be created then they will store that error info in some table.
Second Interfgace:
Client SAP Proxy will periodically run and send these error records info to XI and XI will update stagging table records accordingly.
Suraj, What is your sugestion in this solution? Do I need to use Responseonewaybean?
Thanks Suraj
Div -
Roles not updating in SelectManyShuttle
Hi,
We have three tables EMP, EMP_ROLES, ROLES. EMP_ROLES table is the bridge table and contains only the EMP_ID and its linked ROLE_ID's. On our page we have created two tabs through Show detail item, on one tab we can create new users and update existing ones. On the second tab we can search and select users through an ADF output text table and then come back to the first tab and edit them. On the first tab we have a form layout which displays the users details and a SelectManyShuttle to display the selected roles. Now, the application works fine when we open it initially, after searching for a user on the second tab we come back to the first tab and the users details and roles are updated.
However, once we have saved or deleted some roles for any user i.e. in the EMP_ROLES table, the role shuttle does not update when we navigate from the search tab to the modify tab. If we navigate through the users on the first tab the shuttle works fine, but only when we come back from the search page the shuttle does not get updated and keeps showing the roles of the previous user.
I am using JDev version 11.1.2.3.0.
Can anyone please provide me with any ideas on how to get this resolved?
Please let me know if any more information is required.
Thanks in advance!
NamanHi KT,
Thanks for the response and apologies for the delayed reply.
I am new to ADF development, as a matter of fact this is the first time I'm working on it. Could you please explain a bit further how I can set the iterator refresh property or execute it programmatically?
Yes the shuttle component does show updated roles and works as required when opened in a new browser.
Regards,
Naman -
Flex 3: Update SQLite Table Structure?
I don't have any issues with creating my table when it doesn't exist but I have a quesion about updating the table structure. For instance I want to add two new fields if they don't exist.
Does anyone have an example of updating table structure? Process flow would have to first check for table, if it doesn't exits then create it. If it does exist then check it has all the correct fields. If it doesn't then update table structure.
Is there a built in way to do this with SQLite?
Here is my current code...
private function getRecords():void
var sqlQuery:String = "CREATE TABLE IF NOT EXISTS Roster (" +
"selected TEXT DEFAULT 'false' NOT NULL,"+
"name TEXT NOT NULL," +
"time TEXT NOT NULL," +
"gender TEXT NOT NULL" +
dbStatement = new SQLStatement();
dbStatement.itemClass = Roster;
dbStatement.sqlConnection = exampleDB;
dbStatement.text = sqlQuery;
dbStatement.addEventListener(SQLEvent.RESULT, onDBStatementSelectResult);
dbStatement.execute();
sqlQuery= "select * from Roster";
dbStatement.text = sqlQuery;
dbStatement.addEventListener(SQLEvent.RESULT, onDBStatementSelectResult);
dbStatement.execute();
I want to add in two new fields is possible without asking user to delete the table first.
"wins TEXT DEFAULT '0' NOT NULL," +
"loses TEXT DEFAULT '0' NOT NULL" +
Thanks in advance.Looks like you need a single column to identify the type of user (M,C or A) Much better this scenario described here
http://vyaskn.tripod.com/row_level_security_in_sql_server_databases.htm
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 -
All, I'm trying fix an issue with transactional replication where replication monitor is showing the push to the subscriber is failing because of the error, "Cannot update identity column." I've tried to use sp_browsereplcmds to pull up the
command that's failing based on the xact_seqno but when I try that I get the error:
Number: 102, State: 1, Procedure: , LineNumber: 0, Server: , Source: .Net SqlClient Data Provider
Message: Incorrect syntax near '┻'.
I'd like to fix the issue without having to rebuild replication during a maintenance window. I know you cannot publish tables with primary keys, but I'm wondering if dropping the identity column on this table might fix the issue. I'm considering
that but I would prefer to be able to pull the command that's trying to update the identity column, throw in SET IDENTITY_INSERT ON and remove the commands from the distribution database, but if that doesn't work I'm open to ideas of just dropping the primary
key on the replicated table. I think that should be fine.
Does anyone have any recommendations on how to view the command that's failing?
Or if dropping the primary key on the subscriber table would create issues with the publisher (since it is also the primary key)?
Or, know of any other ways in which to address this issue? Thanks.Unfortunately, no. The error was a bit of a red herring. In the end the subscriber was missing all of the stored procedures needed to update data in the published tables (i.e., the procedures for performing inserts/updates/deletes were missing
for every table in the subscriber database). Additionally, I could not recreate these stored procedures using sp_scriptpublicationcustomprocs
because another procedure which was required for that proc to work was also missing. In short, there were hundreds of missing stored procedures in the subscriber database on which transactional replication is dependent in order to replicate DML changes and
function normally and this includes system sprocs which would've been used to recreate the missing DML procs. In short, the subscriber was badly damaged and deemed to be unrecoverable within a reasonable time frame.
The solution was to tear down and start over, which we did successfully later in the evening.
Maybe you are looking for
-
Compare the input filename in the selection screen
In the selection screen input field there is an option of selecting the directory and file name and not the extension . This is used to download the datas Extension can be selected by using the option button rtf csv. the user has to give only the fi
-
Share two email accounts on icloud
I now have two iphone's on my account and two separate two email accounts on Itunes. I am having trouble sharing or syncing icloud with the two email accounts. Is there specific settings in the setup to solve this problem or what is the best pro
-
ROLE in BI NetWeaver to EXECUTE queries
Hello. I don't need any analisys authorizations. All I need to create one USER for all available queries execution. I guess there must be some ROLE in content or smthng. for query execution in BI for NetWeaver 2004s. Could anybody tell me the name of
-
Printing Reports on Dot Matrix Printer
Reports are printing very slowly on Dot Matrix Printer. If any solution Please tell me. [email protected]
-
Color fractals using Kuler themes
I've just released version 3.2 of Mandelbrot Explorer. This is free software that allows someone to enlarge the Mandelbrot Set (and Julia Sets) to produce detailed fractal images, and to color the resulting image with a color scheme that the user dev