Grant the access to tables
I need do 'select' from a table of another schema..well, the query works well in toad but when I put this query in a procedure and then it will give me an error message saying 'table or view does not exist'. I have to explicitly grand this user the access in that schema and then the procedure could work.
why I dont need grand explicitly but I can run the query to access the tables in another schema, and I must grand explicitly then the procedure can access that table?
Cheers
Grants can be given to roles. A user may have been assigned to run using the privs of a role and will therefore get the grants to the role.
create role special;
grant select on abc to special;
grant special to thisuser;
Grants can also be made to the special user 'public' which is sorta-kinda a role.
grant select on abc to public;
In either case 'thisuser' will be able to see the table 'abc'.
Similar Messages
-
Grant the access rights to manager run the work flow history report without edit /delete rights
I found that only Team Member / Workspace creator / Administrator can run
the work flow history report. However, we have a Purchase Order request
which need ask the supervisor for 1st approval and manager for 2nd approval.
But those managers want to see who prepare the P.O. and supervisor done the
first approval before their 2nd approval. How can I can grant the access
right to the manager to run the work flow history report for this purpose? I
tried grant the role "team member" to those manager, however, it will also
allow them to modify or delete the entry as they are the team member, but we
only want allow those managers can approve the entry and view the work flow
history without other acces such as add/delete/edit to prevent the human
mistake.
Pls advise how can I do this? Thanks!
RegardsCreate a new role in teaming can fulfill this requirement. Thanks!
"Joey" wrote in message news:_Cvqo.66903$[email protected]. .
I found that only Team Member / Workspace creator / Administrator can run
the work flow history report. However, we have a Purchase Order request
which need ask the supervisor for 1st approval and manager for 2nd approval.
But those managers want to see who prepare the P.O. and supervisor done the
first approval before their 2nd approval. How can I can grant the access
right to the manager to run the work flow history report for this purpose? I
tried grant the role "team member" to those manager, however, it will also
allow them to modify or delete the entry as they are the team member, but we
only want allow those managers can approve the entry and view the work flow
history without other acces such as add/delete/edit to prevent the human
mistake.
Pls advise how can I do this? Thanks!
Regards -
Grant developer access to tables
I have created a db for one of my developers and i want to give him access to develop to one table in the dB. I created the table and have setup a sql server user for him. When i grant him select, update and insert on the server he can connect to
the sql server and see the DB but not the table i created for him. If i go to the server and login via Sql server mgmet studio I can't even see the DB. Waht rights have i missed here? thanks.Don't mix up logins which have SQL Server wide permissions, with users which have permissions inside a database.
You should (and maybe you did) create a login for the developer, and then create a user for the developer that gives access to the appropriate database. Then you should grant the select, insert, update, and delete permission for the table to the user.
You can't see the database? Are you a member of the sysadmin fixed server role? If not, do you have permission to the database?
Or perhaps you created the table in another database?
Or perhaps you created the table with your default schema and he is looking for the table with his default schema which would be a different table?
Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty -
How to grant the access t-code : BP by company code or by country
Dear Sir,
Please kindly advise how to add the authorized to grant to access the data in T-code : BP by company code or account group??
Thank you and best regards,
VimolHi Vimol,
Please check the transaction code: SU22.
Give transaction code as "BP".
and execute.
It will list all the authorizations objects of transaction code: "BP"..
Depending on ur requirement, u can choose the object.
I hope it helps u.
Regards,
Sri. -
hi, friends, there are three tables which need some modifications, however thess tables are so important to the system that no access to them is intolerable.
how can i make them read only for others and at the same time which can be modified by and only by my session ?
thanks in advanceIf it is indeed "so important" (to quote you) then use Oracle's very handy, very reliable syntax of security suggested to you already. THEN connect to the database as a user who starts any/every session with the privileges you desire.
-
PL/SQL stored proc won't compile when accessing a table in another schema
I am attempting to compile a stored procedured that does something like this:
create or replace PROCEDURE CreateNewBackupTbls
AS
tblExists NUMBER;
v_CatalogName VARCHAR(50);
Cursor ctlg_cursor
IS
Select vchCatalogName
FROM OtherSchema.tblCatalogs;
BEGIN
-- Create AdminMstr backup table if it doesn't already exist
select count(*) into tblExists
from dual
where exists ( select NULL from TABS where Table_Name = 'AdminMstr' );
IF tblExists = 0
THEN
spc_createNewAuditBackupTbl('AdminMstr');
DBMS_OUTPUT.PUT_LINE('Created AdminMstr audit backup table');
END IF;
OPEN ctlg_cursor;
LOOP
FETCH ctlg_cursor INTO v_CatalogName;
EXIT WHEN ctlg_cursor%NOTFOUND;
-- Create Catalog backup table if it doesn't already exist
select count(*) into tblExists
from dual
where exists ( select NULL from TABS where Table_Name = v_CatalogName );
IF tblExists = 0
THEN
spc_createNewAuditBackupTbl(v_CatalogName);
DBMS_OUTPUT.PUT_LINE('Created ' || v_CatalogName || ' audit backup table');
END IF;
END LOOP;
CLOSE ctlg_cursor;
END;
The schema/user this stored procedure belongs to has access to the OtherSchema.tblCatalogs table. I can see it in Sql Developer and I can also type
Select vchCatalogName
FROM OtherSchema.tblCatalogs;
from an SQL plus prompt and it works. So why won't the stored procedure compile?
Thanks,
ChrisWOW! That seems like a very bad design.
Is it just the compiler that has the problem or is the PL/SQL code inside the stored procedure also affected? For example, if I'm doing an
EXECUTE IMMEDIATE 'insert ... INTO OtherSchema.tblTest';
Is this going to be a problem?
The problem with granting the access explicitly is the Archive Schema, which has the stored procedure that is failing, might not exist at the time when the other schemas are created. Therefore, there is no user to grant permissions to. I solved this by granting permissions to the role and when the archive user is created it is assigned that role.
This seems like the proper way to solve this problem. -
Issue with the Access Sequence related to Pricing
Hi Gurus,
I have one issue related to Pricing. I have an access sequence ZPCD which has Table "A558" assigned to it.
Table A558 has fields
5 Sales Org
10 Distribution channel
20 Division
25 Customer.
But the issue is here.....in the access sequence ZPCD the field "20 Division" got deleted some how.
but i checked the table A558, it has "Division" in it.
So, summary is Table A558 has field Division, but the access sequence ZPCD is missing field Division in Access table A558.
Table 518 contains 585 condition record entries entries in Production system.
So question is how will i add Division back to the Access sequence Table A558.
Waiting for your expert advise and comments
Thank youDear Anitha
If I am correct, in access sequence, at field level, there is no deletion option available and hence, I am surprised how this could be possible.
Anyway, you can try in development server as follows:-
Go to V/07, select ZPCD, block the table 558 and delete. Save the data. Now try to reassign the same table and see how it works.
thanks
G. Lakshmipathi -
Hi All,
We have several number of plants and we want to restrict the access to Tables plant wise.
Finance tables in plant A should not be visible to somebody in Plant B and vice versa.
the access has to be given by the data owner of the plant.
Please let me know can we restrict the access like this.
Pravin.Hi,
Just click on the "Display object documentation"
Organizational criterion: Link to the table key fields to which the row authorization refers. (i.e. palnt werks field value with the table name)
Possible values: All organizational criteria defined in customizing. Use the F4 help.
Organizational criterion attributes 1-8: Each attribute refers to a particular table key field. There can only be values for as many attributes as are defined in the organizational criterion (at least one).
Possible values: Table key field values (individual values and/or intervals). -
Can ABAP program and a Java apps access the same DB table?
If an ABAP program and a Java apps access the same DB table, how does the Enqueue services from ABAP and Java communicate with each other to ensure locking consistency (if they even communicate with each otehr at all)?
Or there wont be such situation because there are separate schema for ABAP stack and Java stack?
Your help is greatly appreciated.Hello!
A while ago I was a subject to criticism too for not granting points to helpfull answers. I appeared to be ungratefull, but I'm actually not (I guess the same goes for Vincent). I absolutely agree that good people who provide helpfull answers deserve (at least) points, but I didn't quite get the whole idea with points untill I was explicitly warned. I took some time to correct this and I granted points for all my past questions, generously, with "interest rates" for waiting.
My point is:
The pointing system is good, but unintuitive and not documented. I suggested this at that time, and I see that nothing has changed since. I see also that I'm not the only one who has experienced missunderstandings.
I repeat the message to SDN people: Please provide some info on pointing system! A few sentences behind a "What's this?" link would do. It's not such a hard work.
Thanks!
Kind regards,
Igor Barbaric -
Unable to access the data and table fields from handheld
Hi,
I've created a Testing.sdf file on the local pc using SQL Server Management Studio, creating table, fields and insert some data. in local pc i can access the the data as normal. the problem is after i moved the file to handheld device i
cannot access the data within the table, it shown error 'Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)' . I tried to google it, but still got no solution.
Thanks,'Name Space
Imports System.Data.SqlServerCe
'String Connection
'Data Source = D:\SKUDWN3 .sdf'
Public Sub CreateDB(ByVal StrConn As String)
'Declaration
Dim cn As SqlCeConnection = Nothing
Dim cm As SqlCeCommand = Nothing
Dim SQLEngine As SqlCeEngine = Nothing
Dim rs As SqlCeResultSet = Nothing
Dim rec As SqlServerCe.SqlCeUpdatableRecord = Nothing
'Tables -
Const TB_SKUDWN3 As String = "SKUDWN3"
'Fields TB_SKUDWN3
Const FL_SKUDWN3_UPC As String = "UPC"
Const FL_SKUDWN3_SKU As String = "SKU"
Const FL_SKUDWN3_LD As String = "LD"
Const FL_SKUDWN3_SD As String = "SD"
Const FL_SKUDWN3_AN As String = "AN"
Const FL_SKUDWN3_Price As String = "Price"
Const FL_SKUDWN3_GST_FLAG As String = "GSTFLAG"
'Create Database
SQLEngine = New SqlCeEngine(StrConn)
SQLEngine.CreateDatabase()
SQLEngine.Dispose()
'Open Connection
If IsNothing(cn) Then cn = New SqlCeConnection(StrConn)
If cn.State = Data.ConnectionState.Closed Then cn.Open()
cm = cn.CreateCommand
'Create Table, Fields
cm.CommandText = "CREATE TABLE " & TB_SKUDWN3 & " (" & FL_SKUDWN3_UPC & " NVARCHAR (13)," & _
" " & FL_SKUDWN3_SKU & " NVARCHAR (9), " & FL_SKUDWN3_LD & " NVARCHAR(30)," & _
" " & FL_SKUDWN3_SD & " NVARCHAR (18), " & FL_SKUDWN3_AN & " NVARCHAR(15), " & _
" " & FL_SKUDWN3_Price & " NVARCHAR (10), " & FL_SKUDWN3_GST_FLAG & " BIT)"
cm.ExecuteNonQuery()
'Close Connection
cm = Nothing
If Not IsNothing(cn) Then
If cn.State = ConnectionState.Open Then cn.Close()
cn.Close()
cn.Dispose()
End If
End Sub
'The DB was successfully created, but after moving to Handheld the fields of table can't be accessed -
Access 2013 crashed when I export a table from the access
Hi!
Access 2013 always crashed when I export a table from the access to the Database Symfoware.
1、The conditions of the Access 2013 crashed are the follows.
1)Create a table in the Access 2013.
2)Using the ODBC driver of the Database Symfoware to export the table from the access to the Database Symfoware.
2、The Environments are the follows.
1)Access 2013 X64(Version:15.0.4420.1017)
2)Win2008R2 X64
3)Symfoware V11.1 X64
3、The Application log from the Win2008R2 are follows.
ログの名前: Application
ソース: Application Error
日付: 2014/04/18 16:21:06
イベント ID: 1000
タスクのカテゴリ: (100)
レベル: エラー
キーワード: クラシック
ユーザー: N/A
コンピューター: WIN-29UTU2AIK6J
説明:
障害が発生しているアプリケーション名: MSACCESS.EXE、バージョン: 15.0.4420.1017、タイム スタンプ: 0x50674523
障害が発生しているモジュール名: ACECORE.DLL、バージョン: 15.0.4420.1017、タイム スタンプ: 0x506742b7
例外コード: 0xc0000005
障害オフセット: 0x0000000000171f36
障害が発生しているプロセス ID: 0xb6c
障害が発生しているアプリケーションの開始時刻: 0x01cf5ad638668c5b
障害が発生しているアプリケーション パス: C:\Program Files\Microsoft Office\Office15\MSACCESS.EXE
障害が発生しているモジュール パス: C:\Program Files\Common Files\Microsoft Shared\OFFICE15\ACECORE.DLL
レポート ID: 00e87957-c6ca-11e3-ad2c-0050568d2ced
イベント XML:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-04-18T07:21:06.000000000Z" />
<EventRecordID>3442</EventRecordID>
<Channel>Application</Channel>
<Computer>WIN-29UTU2AIK6J</Computer>
<Security />
</System>
<EventData>
<Data>MSACCESS.EXE</Data>
<Data>15.0.4420.1017</Data>
<Data>50674523</Data>
<Data>ACECORE.DLL</Data>
<Data>15.0.4420.1017</Data>
<Data>506742b7</Data>
<Data>c0000005</Data>
<Data>0000000000171f36</Data>
<Data>b6c</Data>
<Data>01cf5ad638668c5b</Data>
<Data>C:\Program Files\Microsoft Office\Office15\MSACCESS.EXE</Data>
<Data>C:\Program Files\Common Files\Microsoft Shared\OFFICE15\ACECORE.DLL</Data>
<Data>00e87957-c6ca-11e3-ad2c-0050568d2ced</Data>
</EventData>
</Event>
4、When the access crashed,I got the dump file .Then I use the Windbg got some information from the dump files.
The detailes are follows.
FAULTING_IP:
+58872faf03d6dd84
00000000`00000000 ?? ???
EXCEPTION_RECORD: 00000000001723c0 -- (.exr 0x1723c0)
ExceptionAddress: 000007fee3951f36 (ACECORE+0x0000000000171f36)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 0000000000000000
Attempt to read from address 0000000000000000
FAULTING_THREAD: 00000000000010b8
DEFAULT_BUCKET_ID: WRONG_SYMBOLS
PROCESS_NAME: MSACCESS.EXE
ADDITIONAL_DEBUG_TEXT:
Use '!findthebuild' command to search for the target build information.
If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols.
MODULE_NAME: ACECORE
FAULTING_MODULE: 0000000076eb0000 ntdll
DEBUG_FLR_IMAGE_TIMESTAMP: 506742b7
ERROR_CODE: (NTSTATUS) 0x80000003 - {
EXCEPTION_CODE: (NTSTATUS) 0x80000003 (2147483651) - {
MOD_LIST: <ANALYSIS/>
CONTEXT: 0000000000171ed0 -- (.cxr 0x171ed0)
rax=0000000001be3598 rbx=0000000000000000 rcx=01cf5d1b0f402a5c
rdx=0000000009cfad30 rsi=0000000006688ef0 rdi=0000000001be35d0
rip=000007fee3951f36 rsp=0000000000172490 rbp=00000000001727a0
r8=0000000009b409d0 r9=0000000006688ef0 r10=0000000000000000
r11=0000000000000246 r12=0000000000000000 r13=0000000001be19f0
r14=0000000009cfad30 r15=0000000000000000
iopl=0 nv up ei pl nz na po nc
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206
ACECORE+0x171f36:
000007fe`e3951f36 4d3927 cmp qword ptr [r15],r12 ds:00000000`00000000=????????????????
Resetting default scope
PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS
BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS
LAST_CONTROL_TRANSFER: from 000007fee395c095 to 000007fee3951f36
STACK_TEXT:
00000000`00172490 000007fe`e395c095 : ffffffff`ffffffff 00000000`00000000 00000000`01bddaa2 ffffffff`ffffffff : ACECORE+0x171f36
00000000`001727b0 000007fe`e388f8eb : 000007fe`e399dc10 000007fe`e399dc30 000007fe`e399dc50 00000000`000000f9 : ACECORE+0x17c095
00000000`00172b50 000007fe`e388f590 : 00000000`06688ef0 00000000`00000004 00000000`000000f9 00000000`00000000 : ACECORE+0xaf8eb
00000000`00172ba0 000007fe`e388f406 : 00000000`00000004 00000000`000000f9 00000000`11cb1130 00000000`000000f9 : ACECORE+0xaf590
00000000`00172c30 000007fe`e391aee7 : 00000000`00000000 00000000`00173198 00000000`06688ef0 00000000`11cb0998 : ACECORE+0xaf406
00000000`00172c70 000007fe`e3933a72 : 00000000`00400100 00000000`00000002 00000000`00000001 00000000`06688ef0 : ACECORE+0x13aee7
00000000`00172e50 000007fe`e384e5b1 : 00000000`00000000 00000000`11cb0020 00000000`06688ef0 00000000`00000001 : ACECORE+0x153a72
00000000`00172e90 000007fe`e38358d1 : 00000000`000007ff 00000000`06688ef0 00000000`01bd99f0 00000000`00000000 : ACECORE+0x6e5b1
00000000`00173280 000007fe`e38718eb : 00000000`000007ff 00000000`06688ef0 00000000`11cb0000 00000000`00000000 : ACECORE+0x558d1
00000000`00173340 00000001`3f3b0cd2 : 00000000`0a0945c0 00000000`000000fe 00000000`000007ff 00000000`00000000 : ACECORE+0x918eb
00000000`00173430 00000001`3f3b0b9b : 00000000`00173730 00000000`001741e0 00000000`065e5b00 00000000`00000100 : MSACCESS!CreateIExprSrvObj+0x16af32
00000000`00173630 00000001`3f3afcea : 00000000`00173730 00000000`00000000 00000000`00000000 00000000`065e5b00 : MSACCESS!CreateIExprSrvObj+0x16adfb
00000000`001736a0 00000001`3f983140 : 00000000`00174401 00000000`0a3235e0 00000000`0a319aa0 00000000`00179fc8 : MSACCESS!CreateIExprSrvObj+0x169f4a
00000000`00174290 00000001`3f3aabeb : 00000000`00000000 00000000`00000000 00000000`00179f38 00000000`00000000 : MSACCESS!FUniqueIndexTableFieldEx+0x26ab4
00000000`00174530 00000001`3f3a9670 : 00000000`001778e0 00000000`00179f38 00000000`00000031 00000000`00000000 : MSACCESS!CreateIExprSrvObj+0x164e4b
00000000`00177870 00000001`3f3a8c1b : 00000000`00000010 00000000`108c5990 003d0044`00570050 00000000`74ac3f69 : MSACCESS!CreateIExprSrvObj+0x1638d0
00000000`001779d0 00000001`3f5450df : 00000000`0a0945c0 00000000`0000009c 00000000`0a0945c0 00000000`00000000 : MSACCESS!CreateIExprSrvObj+0x162e7b
00000000`00179e30 00000001`3f64e915 : 00000000`43ed8000 00000000`00000000 00000000`3f800000 00000000`00000000 : MSACCESS!FillADT+0x5830b
00000000`0017c450 00000001`3f33b172 : 00000000`00000000 00000000`0006075e 00000000`0017e370 00000000`00000000 : MSACCESS!IdsComboFillOfActidIarg+0xaddf1
00000000`0017d730 00000001`3f33a9ef : 00000000`0017e0a0 00000000`00000b86 00000000`00000000 00000000`0fea0000 : MSACCESS!CreateIExprSrvObj+0xf53d2
00000000`0017d790 00000001`3f33a20c : 00000000`06620400 00000000`00000000 00000000`00000001 00000000`0017e420 : MSACCESS!CreateIExprSrvObj+0xf4c4f
00000000`0017e400 00000001`3f6019cd : 0071023b`007a000a 00000000`00374a30 00000000`00000005 00000000`0000000c : MSACCESS!CreateIExprSrvObj+0xf446c
00000000`0017e850 00000000`06706fd5 : e2504700`aa00ee81 00005d1b`0f2363ea 00000000`0017e9e0 00000001`3f200000 : MSACCESS!IdsComboFillOfActidIarg+0x60ea9
00000000`0017e8f0 00000000`0a30c378 : 00000000`00000000 00000000`00000008 00000000`067069ac 00000000`00000000 : 0x6706fd5
00000000`0017e960 00000000`00000000 : 00000000`00000008 00000000`067069ac 00000000`00000000 00000000`00000008 : 0xa30c378
FOLLOWUP_IP:
ACECORE+171f36
000007fe`e3951f36 4d3927 cmp qword ptr [r15],r12
SYMBOL_STACK_INDEX: 0
SYMBOL_NAME: ACECORE+171f36
FOLLOWUP_NAME: MachineOwner
IMAGE_NAME: ACECORE.DLL
STACK_COMMAND: .cxr 0x171ed0 ; kb
BUCKET_ID: WRONG_SYMBOLS
FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_ACECORE.DLL!Unknown
WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/MSACCESS_EXE/15_0_4420_1017/50674523/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1
Followup: MachineOwner
5、Where the access crashed I used the ODBC trace to get the trace log of the ODBC API.
The ODBC API called by Access before it crashed are the follows.
I also ansysised the log,and I did not find any Abnormal.
Test 1174-10f0
EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 0x0000000009F7C490
UWORD
6
SWORD
-8 <SQL_C_WCHAR>
PTR 0x00000000002C1F20 [
12] "LENGTH"
SQLLEN 62
SQLLEN * 0x00000000002C1E38 (12)
Test 1174-10f0
ENTER SQLGetData
HSTMT 0x0000000009F7C490
UWORD
10
SWORD
99 <SQL_C_DEFAULT>
PTR <unknown type>
SQLLEN 4
SQLLEN * 0x00000000002C1E38
Test 1174-10f0
EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 0x0000000009F7C490
UWORD
10
SWORD
99 <SQL_C_DEFAULT>
PTR <unknown type>
SQLLEN 4
SQLLEN * 0x00000000002C1E38 (-1)
Test 1174-10f0
ENTER SQLFetch
HSTMT 0x0000000009F7C490
Test 1174-10f0
EXIT SQLFetch with return code 100 (SQL_NO_DATA_FOUND)
HSTMT 0x0000000009F7C490
Test 1174-10f0
ENTER SQLFreeStmt
HSTMT 0x0000000009F7C490
UWORD
0 <SQL_CLOSE>
Test 1174-10f0
EXIT SQLFreeStmt with return code 0 (SQL_SUCCESS)
HSTMT 0x0000000009F7C490
UWORD
0 <SQL_CLOSE>
6、I also did the test with the Access 2010,and with the Sql Srever/Oracle.
The results are the follows.
1) With the Access 2010(X86 or X64) and Access 2013 X86,it successes when I export the table to the DB Symfoware.But only with the Access 2013 X64,the Access crashed.
2)With the Access 2010(X86 or X64) and Access 2013(X86 or X64),using the Sql Srever/Oracle,it always successes .
According to all the descrived above, I wonder if it a bug of the Access2013 .
Could anyone can help me ?
Thanks for any help.George Zhao
Thank you for your help.
I have already install
the latest patches of the Office 2013.But it doesn't work.It is down also too. And ODBC
drive of Database Symfoware is the newest driver of the Database Symfoware. Now I wonder that
if it si a bug of the ODBC
drive of Database Symfoware,I should fix the bug,but I have analysised the odbc trace log and I do not find any wrongs ,so I think maybe it is a bug of the Access .
I have see many situations about the Access down on the internet . -
Table does not exist (servlet accessing the postgres sql table)
Hello every body,
I am running servlet to access the postgres sql table. But there exist error.
ERROR: relation "employee" does not exist
I have checked the table name in database and table name into the servlet. Both are same. Please give me suggestion to solve this error.
Thankscan you connect to the database without the servlet?
put your stuff into this and try it. If it works, add something to check the table names. - %
package test;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
* Connect to a database using JDBC
public class ConnectionTest
private static final String DEFAULT_DRIVER = "your driver here";
private static final String DEFAULT_URL = "your url here";
private static final String DEFAULT_USERNAME = "your username here";
private static final String DEFAULT_PASSWORD = "your password here";
public static void main(String[] args)
Connection connection = null;
ResultSet rs = null;
try
String driver = ((args.length > 0) ? args[0] : DEFAULT_DRIVER);
Class.forName(driver);
String url = ((args.length > 1) ? args[1] : DEFAULT_URL);
String username = ((args.length > 2) ? args[2] : DEFAULT_USERNAME);
String password = ((args.length > 3) ? args[3] : DEFAULT_PASSWORD);
connection = DriverManager.getConnection(url, username, password);
DatabaseMetaData databaseMetaData = connection.getMetaData();
System.out.println("product: " + databaseMetaData.getDatabaseProductName());
System.out.println("major : " + databaseMetaData.getDatabaseMajorVersion());
System.out.println("minor : " + databaseMetaData.getDatabaseMinorVersion());
System.out.println("schemas");
rs = databaseMetaData.getSchemas();
while (rs.next())
System.out.println(rs.getString(1));
catch (Exception e)
e.printStackTrace();
finally
close(rs);
close(connection);
public static void close(ResultSet resultSet)
try
if (resultSet != null)
resultSet.close();
catch (Exception e)
e.printStackTrace();
public static void close(Statement statement)
try
if (statement != null)
statement.close();
catch (Exception e)
e.printStackTrace();
public static void close(Connection connection)
try
if (connection != null)
connection.close();
catch (Exception e)
e.printStackTrace();
} -
When i am retreiving the values from the access table i am getting null val
hi all,
I comeacross the following problem,I connected my applet to the Access database with jdbc:odbc driver.
I am trying to retreive the values from the table.I am getting the result correctly when the same code with using applet it was giving the correct result.
when I am using an applet program it was giving the null value istead of the actual records.
can anybody tell me the reason why
thanks in advance
and also how to connect the databse in the webserver when i installed my applet in the client side
please give me some suggestions to do that
thankyou
lakshmanHi Krishna,
Can you please copy the code generated by ODI for creating your C$ table ?
i mean :- create table C$_0Entity ( from the operator log
Regards,
Rathish A M -
SQL error in the database when accessing a table.
Hi,
I got below error at production server. Please suggest how to reslove this error.
<br>
<br>
<br>
Runtime Errors DBIF_RSQL_SQL_ERROR
<br>
Exception CX_SY_OPEN_SQL_DB
<br>
Date and Time 02.01.2011 15:55:06
<br>
<br>
<br>
<br>
<br>
Short text
<br>
SQL error in the database when accessing a table.
<br>
<br>
<br>
How to correct the error
<br>
Database error text........: "[10054] TCP Provider: An existing connection was
<br>
forcibly closed by the remote host.
<br>
[10054] Communication link failure"
<br>
Internal call code.........: "[RSQL/INSR/SWFCNTBUF ]"
<br>
Please check the entries in the system log (Transaction SM21).
<br>
<br>
If the error occures in a non-modified SAP program, you may be able to
<br>
find an interim solution in an SAP Note.
<br>
If you have access to SAP Notes, carry out a search with the following
<br>
keywords:
<br>
<br>
"DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
<br>
"CL_SWF_CNT_FACTORY_SHMEM======CP" or "CL_SWF_CNT_FACTORY_SHMEM======CM001"
<br>
| "ADD_INSTANCE"
<br>
<br>
<br>
Information on where terminated
<br>
Termination occurred in the ABAP program "CL_SWF_CNT_FACTORY_SHMEM======CP" -
<br>
in "ADD_INSTANCE".
<br>
The main program was "SAPMSSY1 ".
<br>
<br>
In the source code you have the termination point in line 16
<br>
of the (Include) program "CL_SWF_CNT_FACTORY_SHMEM======CM001".
<br>
The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
<br>
procedure "ADD_INSTANCE" "(METHOD)", but it was neither handled locally nor
<br>
declared
<br>
in the RAISING clause of its signature.
<br>
<br>
The procedure is in program "CL_SWF_CNT_FACTORY_SHMEM======CP "; its source
<br>
code begins in line
<br>
1 of the (Include program "CL_SWF_CNT_FACTORY_SHMEM======CM001 ".
<br>
<br>
<br>
<br>
Source Code Extract
<br>
<br>
Line
SourceCde
<br>
<br>
1
METHOD add_instance .
<br>
2
<br>
3
data: ls_id type swfcntbuf.
<br>
4
<br>
5
check buffer method - store in local buffer if necessary
<br>
6
retcode = cl_swf_cnt_factory=>add_instance( ibf_por = ibf_por instance = instance ).
<br>
7
<br>
8
CHECK m_buffer_method EQ mc_buffer_shared.
<br>
9
<br>
10
append key to list of tasks to add stored in database table SWFCNTBUF
<br>
11
will be evaluated by build process for shared memory area (UPDATE_BUFFER method)
<br>
12
<br>
13
ls_id-mandt = sy-mandt.
<br>
14
ls_id-id = ibf_por.
<br>
15
<br>
>>>>>
INSERT swfcntbuf CONNECTION r/3*wfcontainer
<br>
17
FROM ls_id.
<br>
18
<br>
19
IF sy-subrc EQ 0.
<br>
20
Commit seems to be necessary always, even if INSERT has failed, to get rid of
<br>
21
database locks
<br>
22
COMMIT CONNECTION r/3*wfcontainer.
<br>
23
ENDIF.
<br>
24
<br>
25
ENDMETHOD.
<br>duplicate here SQL error in the database when accessing a table.
Do not post the same question in more than on forum. -
dear all,
i have done a system copy from production server into quality server. quality was scrapped and freshly installed with SAP then used the DB flush method to carry out the system copy. i had to change the DBS_ORA_SCHEMA in environment variables to SAP<SOURCE SID> from SAPSR3. the sap version is ECC6.0,DB is ORACLE10.2 on WIN NT.
after MMC opened, i get "SQL error in the database when accessing a table" error is coming. in SM21, I am getting "Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000 )
Database error 8103 at SEL access to table TBTCO
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
Database error 8103 at FET access to table TBTCP
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
> Short dump "081018 130339 sibqty_Q TY_00 " generated
Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000
> Short dump "081018 130339 sibqty_Q TY_00 " generated
Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000
Delete session 001 after error 023
Database error 8103 at DEL access to table TMSALOGAR
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
> Short dump "081018 130432 sibqty_Q TY_00 " generated
Database error 8103 at FET access to table SNAP
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
> Short dump "081018 130432 sibqty_Q TY_00 " generated
Transaction Canceled SY 002 ( SQL error in the database when accessing a table. )
Database error 8103 at FET access to table TSP02"
please find the st22 DUMP:
ow to correct the error |
Database error text........: "ORA-08103: object no longer exists"
Internal call code.........: "[RSQL/READ/TBTCO ]"
Please check the entries in the system log (Transaction SM21).
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
"SAPMSSY2" or "SAPMSSY2"
"INITIATE_JOB_START"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
The exception must either be prevented, caught within proedure
"INITIATE_JOB_START" "(FORM)", or its possible occurrence must be declared in
the
RAISING clause of the procedure.
|
please do me this favor if you know to avoid this problem..
thanks a lot..Hello Anuj,
This is because the COUNT(*) is returning a value which is longer than the INT4 data type it is expecting. If you restrict the selection by introducing a WHERE clause, then you won't get the dump:
DATA: dyn_from TYPE string,
dyn_where TYPE string,
gx_sql_err TYPE REF TO cx_sy_open_sql_error,
gv_text TYPE string.
dyn_from = `DD01L INNER JOIN DD02L ON DD02L~AS4LOCAL = DD01L~AS4LOCAL AND DD02L~AS4VERS = DD01L~AS4VERS`.
dyn_where = `DOMNAME LIKE 'Z%'`.
TRY .
SELECT COUNT(*) FROM (dyn_from) WHERE (dyn_where).
WRITE: / sy-dbcnt NO-GROUPING.
CATCH: cx_sy_open_sql_db INTO gx_sql_err,
cx_sy_dynamic_osql_semantics INTO gx_sql_err,
cx_sy_dynamic_osql_syntax INTO gx_sql_err.
ENDTRY.
IF gx_sql_err IS BOUND.
gv_text = gx_sql_err->get_text( ).
WRITE: / gv_text.
ENDIF.
BR,
Suhas
Maybe you are looking for
-
How can I use iCloud, but keep Outlook contacts separate from Yahoo/iPhone contacts?
I'm using a new laptop that uses Outlook and I want to share those contacts on my iPhone without merging them with personal and Yahoo contacts. Our tech guy told me to use my Apple ID, but that is what I use for iTunes, etc and when I used that ID i
-
Canon MX920 refuses to print any color images
What could be going on??? It WILL print a black and white image I send it. However I bought a color printer. Yet am denied ability to print in color. The color ink levels seem fine. It has printed color before. However now FULL stop. No longer allow
-
How do I get my Belkin USB switch (F1U201) to work with OSX Lion? It worked with Snow Leopard, but not Lion.
-
Hi, how to find the directory total path where my java programm is running programatically? thanks in advance....
-
HELLO EXPERTS, NOW I M PURCHASING MATERIAL FROM MY VENDOR. HERE IN PARTNER FUCTION I M GIVING TRANSPORTER'S NAME. I HAVR TO PAY MY VENDOR AND TRANSPORTER SEPARATELY. HOW IT CAN POSSIBLE ?? SO THAT I THROUGH T.CODE MIRO I M ABLE TO PAY TO DIFFERENT VE