SQL to retrieve the specific backuppiece to restore the archivelog/datafile
Hi,
Does anybody have any scripts handy to figure out which specific backuppiece to restore if I need to restore a specific archivelog/datafile? i.e.
1. I am using a controlfile and no rman catalog.
2. There is a gap in the Standby site and I need to scp multiple backup pieces to DR site to restore the archivelogs and apply them.
3. I want to query the primary database and find which specific backuppieces I need to scp to restore these files.
Is there a function/Procedure/Package/Table/View/SQL Query available to figure this out?
Thanks a lot.
Thanks Fahd for the reply.
But my question is a bit different. I know the archilogs that are needed and they have already been backed up by RMAN and deleted in primary. I need to restore them in DR but need to scp only those pieces which are holding the gap logs. I dont want to scp all of the backuppieces, just the ones holding multiple logs that I need to apply.
Hope it helps. Thanks for your effort though... Appreciated :)
Similar Messages
-
SQL Plus: retrieve the commands
11g R2 (11.2.0.3) on Linux. At the SQL Plus prompt such as SQL>, I typed some commands, say, select from test;* Sometime I want to re-use the query, so I need to retype in select from test.* Is there a way to retrieve the earlier issued commands back?
Also, I can not use the BACK arrow key. Suppose I want to insert or delete a character in the middle of the commandline, how can I move the cursor over the character?
Thanks955300 wrote:
11g R2 (11.2.0.3) on Linux. At the SQL Plus prompt such as SQL>, I typed some commands, say, select from test;* Sometime I want to re-use the query, so I need to retype in select from test.* Is there a way to retrieve the earlier issued commands back?Yes. The utility is called rlwrap. You use it to run sqlplus. I alias it. So in my +.bash_profile+, I will have the following line:
alias sqlplus="rlwrap $ORACLE_HOME/sqlplus"It provides full command line recall (inside SQL*Plus) and command line editing.
There is no rlwrap rpm available for installation AFAIK. I'm downloading the source code and doing a manual build and install for all the server installations I do (I do not use Oracle Linux or RHEL as a desktop o/s - think for my Ubuntu desktop it installed via an <i>apt-get</i>). For a manual source code build, you need to install a couple of development rpm's as I recall, such as the readline lib. -
SQL to retrieve the records in subset
Dear Friends,
I have requirement to fetch 5 Million records from Oracle db and display using JAVA and JSP. Each record is 1 KB size.
The database table is online table used to store the transaction details, the rows will keep increasing. I am not allowed to use stored procedures also.
1) Fetching 5 Million record and displaying in 1 attempt is not feasible as JDBC has limitation and also the User has to wait too long to see the data.
I am thinking of processing the records in subset, for example.. Display first 10000 records then if the users wants next 10000 records fetch and display the next 10000 record.
Are there any other best practices to implement the above requirement.
I am not sure how to write the above SQL query? Can anyone please help me write the above SQL query?
I dont this I can use romnum as the rows are increasing.
Below is my Table structure and SQL query which returns 5 Million record
CREATE TABLE MESSAGE_LOG
SOURCE VARCHAR2(25 BYTE),
TARGET VARCHAR2(25 BYTE),
ENGINE VARCHAR2(100 BYTE),
PROCESS VARCHAR2(400 BYTE),
SERVICE VARCHAR2(100 BYTE),
LOGTIMESTAMP TIMESTAMP(6)
SELECT * FROM MESSAGE_LOG WHERE LOGTIMESTAMP BETWEEN TO_DATE('20-MAY-2010 01:00','DD-MON-YYYY HH24:MI') AND TO_DATE('20-MAY-2010 23:00','DD-MON-YYYY HH24:MI')
Thanks in advance,
Bobuser13109986 wrote:
I have requirement to fetch 5 Million records from Oracle db and display using JAVA and JSP. Why no one will look at five million results. And even if they wanted to it would take longer than the average human lifetime.
I am not allowed to use stored procedures also.Why, is there a business requirement that says the application should be as difficult to develop as possible, be unreliable and hard to maintain when things go wrong?
>
1) Fetching 5 Million record and displaying in 1 attempt is not feasible as JDBC has limitation and also the User has to wait too long to see the data.As the user will never read five million results, it doesn't matter
Try this link and come back when you have got to the 5,000,000 result of the 6,730,000 that are estimated to be there
http://www.google.com/#hl=en&q=oracle+procedure
Or you could list every thread in the forum and multiply the time it takes you to get to the last by 50.
I am thinking of processing the records in subset, for example.. Display first 10000 records then if the users wants next 10000 records fetch and display the next 10000 record.Try looking at 10,000 threads on this forum or 10,000 results from Google and see how long that takes.
Are there any other best practices to implement the above requirement.Yes, don't return more information than anyone could possibly find useful -
How to compare two rows in PL/SQL and retrieve the values?
Hello,
I have two tables which have identical schemas, one table (tbl_store) is used to hold the latest version, and the other table (tbl_store_audit) holds previous versions. When the latest record is updated, it is inserted into the tbl_store_audit table as a revision, and the updated details are used as the latest record.
For example: The latest version is held in tbl_store, however the tbl_store_audit may hold 5 records which are the past records used before changes were made - these are seen as revisions.
I want to be able to compare what has changed between each revision in the tbl_store_audit table. For example: Out of the 10 columns, the change between revision 1 and revision 2 was the size from XL to XXL. The change between revision 3 and revision 4 was the size XS to M and price 4.99 to 10.99, and so on.
Eventually i will create an APEX report that will show the user the revision number and what was changed from and to.
I seen in a previous post i need to note my oracle version: Oracle version 10.2.0.4.0Hi,
Like suggested already you should give some sample data and output.
Maybe you would like to have something like this:
-- Sample data
-- Note PK is the primairy key of the source table and rev are the revisions
with tbl_store_audit as
select 1 pk, 1 rev , 1 price , 'XXL' unit_size from dual union all
select 1 pk, 2 rev , 1 price, 'XL' unit_size from dual union all
select 1 pk, 3 rev , 1.4 price, 'XXL' unit_size from dual union all
select 2 pk, 1 rev , 1.4 price, 'XL' unit_size from dual union all
select 2 pk, 2 rev , 1.4 price, 'XL' unit_size from dual union all
select 2 pk, 3 rev , 1.4 price, 'XL' unit_size from dual union all
select 1 pk, 4 rev , 1 price , 'XL' unit_size from dual union all
select 1 pk, 5 rev , 1 price , 'XL' unit_size from dual union all
select 3 pk, 1 rev , 1.2 price, 'XL' unit_size from dual union all
select 3 pk, 2 rev , 1.2 price, 'XXL' unit_size from dual union all
select 4 pk, 1 rev , 1 price , 'XL' unit_size from dual
-- end of sample data
,tbl_store_audit_tmp as
select
pk
,rev
,'PRICE' field_name
,to_char(price) field_value
,to_char(lag(price,1) over (partition by pk order by rev) ) old_field_value
from
tbl_store_audit
union all
select
pk
,rev
,'UNIT_SIZE' field_name
,to_char(UNIT_SIZE) field_value
,to_char(lag(UNIT_SIZE,1) over (partition by pk order by rev) ) old_field_value
from
tbl_store_audit
-- include all other fields from the table here with it's own union all select ...
select
from
tbl_store_audit_tmp
where
field_value != old_field_value
PK REV FIELD_NAME FIELD_VALUE OLD_FIELD_VALUE
1 3 PRICE 1.4 1
1 4 PRICE 1 1.4
1 2 UNIT_SIZE XL XXL
1 3 UNIT_SIZE XXL XL
1 4 UNIT_SIZE XL XXL
3 2 UNIT_SIZE XXL XL
6 rows selected If you realy want to keep track of all the changes I think it would be better if you make a "after update trigger" on the base table that checks what changed and put that directly in the uadit table.
Regards,
Peter
Edited by: Peter vd Zwan on Aug 16, 2012 8:25 AM -
Using PL/SQL to retrieve column names and column values
If I have a table as follows
Table A(
meal varchar2(32),
beverage varchar2(32),
desert varchar2(32));
and the table contains a row
meal beverage desert
pork chops iced tea apple crisp
Is there a way in pl/sql to retrieve the column names along with the values. I have an object type
DATA_DEFINITION_T AS OBJECT (
"FIELD_NAME" VARCHAR2(32),
"FIELD_VALUE" VARCHAR2(32)
I need to store the column name in field_name and the column value in field_value.
So the result would be:
FIELD_NAME = meal
FIELD_VALUE = pork_chops
FIELD_NAME = beverage
FIELD_VALUE = iced tea
FIELD_NAME = desert
FIELD_VALUE = apple crisp
Thanks in advance.Hi,
try this procedure ....just create it and give the table name..the object M_DATA_TAB has the required data
procedure l_fill_data_dict(p_table_name varchar2) is
connection_id EXEC_SQL.CONNTYPE;
bIsConnected BOOLEAN;
cursorID EXEC_SQL.CURSTYPE;
nIgn PLS_INTEGER;
m_val VARCHAR2(40);
m_col_name varchar2(40);
m_col_val varchar2(240);
m_cnt number;
m_id number := 0;
m_incr number := 0;
p_sqlstr varchar2(4000);
p_sql_cnt varchar2(4000) ;
p_org_sql varchar2(4000);
TYPE DATA_DEFINITION_TABS IS RECORD (
FIELD_NAME VARCHAR2(32),
FIELD_VALUE VARCHAR2(240));
TYPE DATA_DEFINITION_TAB IS TABLE OF DATA_DEFINITION_TABS;
M_DATA_TAB DATA_DEFINITION_TAB := DATA_DEFINITION_TAB();
--m_file text_io.file_type;
Begin
-- m_file := text_io.fopen('c:\eg.txt','w');
--Set default connection
connection_id := EXEC_SQL.DEFAULT_CONNECTION;
bIsConnected := EXEC_SQL.IS_CONNECTED;
IF bIsConnected = FALSE THEN
message('Connection Failed');
RETURN;
END IF;
--Find the total no.of columns in the given table
p_sql_cnt := 'Select COUNT(column_name) from user_tab_columns where table_name='''||p_table_name||''' order by column_id';
cursorID := EXEC_SQL.OPEN_CURSOR;
EXEC_SQL.PARSE(cursorID, p_sql_cnt, exec_sql.V7);
EXEC_SQL.DEFINE_COLUMN(cursorID, 1, m_val,40);
nIgn := EXEC_SQL.EXECUTE(cursorID);
IF (EXEC_SQL.FETCH_ROWS(cursorID) > 0) THEN
EXEC_SQL.COLUMN_VALUE(cursorID, 1, m_val);
end if;
EXEC_SQL.CLOSE_CURSOR(cursorID);
--EXEC_SQL.CLOSE_CONNECTION;
m_cnt := m_val;---column count
---get the column names from the user_Tab_columns and fetch the values from the given table for that column...
For i in 1..m_cnt loop
m_id := m_id+1;
p_sqlstr := 'Select column_name from user_tab_columns where table_name='''||p_table_name||''' and column_id ='||m_id||' order by column_id';
cursorID := EXEC_SQL.OPEN_CURSOR;
EXEC_SQL.PARSE(cursorID, p_sqlstr, exec_sql.V7);
EXEC_SQL.DEFINE_COLUMN(cursorID, 1, m_col_name,40);
nIgn := EXEC_SQL.EXECUTE(cursorID);
IF (EXEC_SQL.FETCH_ROWS(cursorID) > 0) THEN
EXEC_SQL.COLUMN_VALUE(cursorID, 1, m_col_name);
end if;
EXEC_SQL.CLOSE_CURSOR(cursorID);
--fetch the column value from the given table
p_org_sql := 'select DISTINCT '||m_col_name||' from '||p_table_name;
cursorID := EXEC_SQL.OPEN_CURSOR;
EXEC_SQL.PARSE(cursorID, p_org_sql, exec_sql.V7);
EXEC_SQL.DEFINE_COLUMN(cursorID, 1, m_col_val,240);
nIgn := EXEC_SQL.EXECUTE(cursorID);
Loop
nIgn := EXEC_SQL.FETCH_ROWS(cursorID);
IF (nIgn > 0) THEN
EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 1, m_col_val);
M_DATA_TAB.extend();
M_DATA_TAB(M_DATA_TAB.last).field_name := m_col_name;
M_DATA_TAB(M_DATA_TAB.last).FIELD_VALUE := m_col_val;
m_incr := m_incr+1;
-- text_io.put_line(m_file,m_col_name||'##'||m_col_val);
else
exit;
End if;
End loop;--loop of records in the table for the given column
EXEC_SQL.CLOSE_CURSOR(cursorID);
End loop; ---loop of columns in the table
--text_io.fclose(m_file);
message('Total no. of items in the object='||m_incr);
EXEC_SQL.CLOSE_CONNECTION;
EXCEPTION
When EXEC_SQL.Invalid_Connection then
message('invalid connection');
when EXEC_SQL.Package_Error then
message('pkg err');
when EXEC_SQL.Invalid_Column_Number then
message('invalid col num defined');
when others then
MESSAGE(SQLERRM);
End;
Regards
Dora
Edited by: Dora on Sep 27, 2009 3:13 PM -
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that
the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)(Microsoft SQL Server, Error: 2)
The system cannot find the file specified
Cannot connect to COWBOYS.
Here are the technical details===================================
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476
Error Number: 2
Severity: 20
State: 0
Program Location:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer
timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance,
SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
===================================
The system cannot find the file specified
I have tried from so many forms. This is so frustrating. Thank for everyone/anyone who wants to help. So this is what happened: I had to uninstall my previous sqlserver 2012(which worked great) for some reason, and I uninstalled everything from that download.
Then I installed the trial edition of sql server 2012 (64 Bit) and It wouldn't connect to the database. (Error mentioned above.) My local DB is COWBOYS. (COWBOYS is also my computer name.) After this, I have tried downloading sqlexpress and sqlserver 64bit
many times and cannot connect to my local DB.
How do I connect to my Local DB?
Also, I think this might help: (When I run sqlserve.exe, which I was able to find in C:\Program Files\Microsoft SQL Server\110\LocalDB\Binn, I get an error: Your SQL server installation is either corrupt or has been tampered with(Error getting
instance ID from name). Please uninstall then re-run setup to correct this problem.
I would happily re install it, if it wasn't my 20th time.
I don't have any remote connections, I don't use username/password, only window authentication. I work mostly on visual studio, but without able to store /retrieve data, I don't know how to survive.
May be the solution is very simple, but I am too frustrated.
Some of the things I have tried:
From a command prompt, enter one of the following commands:
net start "SQL Server Agent (MSSQLSERVER)" OR
net start "SQL Server Agent(instancename)"(for instance)
on my sql configuration, I cannot start anything because there is nothing there to start. I can post more details, if that would help. Also, some more details about the error:
Details
Product:
SQL Server
ID:
2
Source:
MSSQLServer
Version:
10.0
Component:
SQLEngine
Message:
An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error:
40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
Explanation
SQL Server did not respond to the client request because the server is probably not started.
User Action
Make sure that the server is started.
Version:
9.0
Component:
SQLEngine
Message:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error:
40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
Explanation
SQL Server did not respond to the client request because the server is probably not started.
User Action
Make sure that the server is started.
Any one that can help me, I will be greatful. Thank you so much. p.s. please ask me anything if you have any questions.It sounds like there are a couple things going on here. First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance. Once you find this, make sure the service is started.
If not started, try to start it and see if it throws an error. If you get an error, post the error message your hitting. If the service starts, you can then launch SSMS and try to connect. If you have a default instance, you can use the machine
name in the connection dialog. Ex: "COWBOYS" where Cowboys is the machine name. However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format. Ex: COWBOYS\Romo (where Romo
is the instance name you set during install).
You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install. Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
Thanks,
Sam Lester (MSFT)
http://blogs.msdn.com/b/samlester
This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
"Mark as Answer" and
"Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread. -
Updated software to iOS 5.1.1 and lost all contacts, messages, and photos specific to this iPhone. Is there any way to retrieve the lost info?
if you don't have a backup on iclouds or itunes that you can restore to, then all is gone. http://support.apple.com/kb/HT1766
-
I wish to retrieve a specific back up that was done which is not the most previous, how can i specifically retrieve a back up from a specific date?
See How to Restore from a Backup Here...
http://support.apple.com/kb/ht1766 -
I know this is supposedly not possible, but I need to retrieve a specific voicemail from my iPhone which was also "cleared" from the Deleted Messages box. Any suggestions?
This is highly important. I know the number from which the voicemail arrived, but have not been able to figure out how to retrieve it. I accidentally had the voicemail in the Deleted Messages folder, and then Cleared this folder. If there is any possible way I might be able to retrieve this message, even if there is a cost associated with it, please help me.
Thank you.I think you maybe able to restore from backup if that voicemail was included in the backup. http://support.apple.com/kb/HT1766
-
Using a lookup for mapping program to retrieve the specific value
Hi All,
I have a scenario like I need to use a lookup for mapping program to retrieve the specific value based on the input parameters.
Here I have got some rough idea like
1. Creation of java program to connect the DB table and access the values, Import this java program as archive into XI.
2. Creation of user defined function to use the above java program
3. Include the user defined function in the interface mapping.
Here I feel it needs some more info to complete this scenario, so can anyone provide the step by step procedure for the above scenario.
Thanks in advance.
Vijay.Hi Vijay,
Basically you have embed Database lookup code in the UDF. For all kind of Lookups refer to below links..
Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0
Lookups in XI made simpler - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
How to check JDBC SQL Query Syntax and verify the query results inside a User Defined Function of the Lookup API -
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
/people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
Lookups - /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
Lookups - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
Lookups with XSLT - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
/people/sravya.talanki2/blog
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
How we have to create the lookups?
Check this weblogs with some screenshots on how to achieve this:
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
/people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
Ranjeet Singh. -
How to retrieve the values from PL/SQL table types.
Hi Every one,
I have the following procedure:
DECLARE
TYPE t1 IS TABLE OF emp%ROWTYPE
INDEX BY BINARY_INTEGER;
t t1;
BEGIN
SELECT *
BULK COLLECT INTO t
FROM emp;
END;
This procedure works perfectly fine to store the rows of employee in a table type. I am not able to retrieve the values from Pl/SQL table and display it using dbms_output.put_line command.
Can anybody help me please!!!!!
Thanks
Ahmed.You mean, you can't add this
for i in t.first..t.last loop
dbms_output.put_line(t(i).empno||' '||t(i).ename||' '||t(i).job);
end loop;or you can't add this
set serveroutput onor maybe, you are working in third party application where dbms_output is not applicable at all?
You see, not able like very similar it is not working - both are too vague...
Best regards
Maxim -
Server Error in '/' Application.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +4860189
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +90
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +31
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +112
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1297
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +72
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +44
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082On what website/link did you received this error message ??
-
hi ,
when generate the schema , i got the below error, please any one put your inputs:
Connecting to the LOB system has failed. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server
is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server).thaks shanky,
but facing another , after generate schema from WCF_SQL, im unable get elements in my schema.
this is schema generate from storeprocduer , but thru WCF-sql im unable get the elements like
id, name
<xsd:schema targetNamespace="urn:schemas-microsoft-com:sql:SqlRowSet2" xmlns:schema="urn:schemas-microsoft-com:sql:SqlRowSet2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sqltypes="http://schemas.microsoft.com/sqlserver/2004/sqltypes" elementFormDefault="qualified">
<xsd:import namespace="http://schemas.microsoft.com/sqlserver/2004/sqltypes" schemaLocation="http://schemas.microsoft.com/sqlserver/2004/sqltypes/sqltypes.xsd" />
<xsd:element name="Test.dbo.sample">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="id" type="sqltypes:int" minOccurs="0" />
<xsd:element name="name" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="sqltypes:nvarchar" sqltypes:localeId="1033" sqltypes:sqlCompareOptions="IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId="52">
<xsd:maxLength value="1000" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<Test.dbo.sample xmlns="urn:schemas-microsoft-com:sql:SqlRowSet2">
<id>18</id>
<name>BIRADAR</name>
</Test.dbo.sample>
<Test.dbo.sample xmlns="urn:schemas-microsoft-com:sql:SqlRowSet2">
<id>18</id>
<name>BIRADAR</name>
</Test.dbo.sample>
<Test.dbo.sample xmlns="urn:schemas-microsoft-com:sql:SqlRowSet2">
<id>19</id>
<name>sw</name>
</Test.dbo.sample>
<Test.dbo.sample xmlns="urn:schemas-microsoft-com:sql:SqlRowSet2">
<id>18</id>
<name>BIRADAR</name>
</Test.dbo.sample>
<Test.dbo.sample xmlns="urn:schemas-microsoft-com:sql:SqlRowSet2">
<id>14</id>
<name>swe</name>
</Test.dbo.sample>
<Test.dbo.sample xmlns="urn:schemas-microsoft-com:sql:SqlRowSet2">
<id>13</id>
<name>se</name>
</Test.dbo.sample> -
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The
server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26- Error:Locating Server\instance Specified)
How Can i solve this?1. Make sure SQL Server Service is running
2. If a named instance, make sure SQL Server browser service is running
3. Make sure SQL Server is configured to allow remote connections
4. Examine the SQL Server error log for messages confirming that SQL is listening on the expected network interfaces and ports
5. Test server connectivity with PING from the client machine
6. Test port connectivity using TELNET or PowerShell to the server and port (from step 4) from the client machine. For example
a. TELNET <server-name> 1433
b. PowerShell: 1433 | % { echo ((new-object Net.Sockets.TcpClient).Connect("YourServerName",$_)) "server listening on TCP port $_" }
7. Check firewall settings if step 5 or 6 connectivity test fails
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 -
I disabled and blocked my phone when it was stolen, i have retrieved the phone and restored service. Now when i turned it on it says iphone disabled connect to itunes.. I have and no change, what do i do?
You need to restore the phone in itunes in order to use it again, You will have to put the phone into recovery mode and restore to factory settings http://support.apple.com/kb/ht1808
Maybe you are looking for
-
Hi I'm running Addressbook and cannot clear previous entry easily when searching my data base of around 5,000 contacts. I prefer to view in All contacts on a double page spread with details on the right page. Searching doesn't seem to work correctl
-
How can you get the dashes to appear inbetween phone numbers
Is there anyway that I can get the dashes to appear so phone numbers do not look like a big block of numbers. so instead of 18001234567 is goes 1-800-123-4567. I looked in options and it does not look like it is possible
-
How to resize photos in iPhoto?
Hi I can seem to figure out how to resize my photos so I can send them via email or just make them smaller in general. Any suggestions?
-
HT201269 iPhone 3GS (6.0) --- iPhone 4 (6.0)
Is it possible to transfer content from a 3GS (6.0) to a iPhone 4? If yes, will everything be transferred? Also, should I use iCloud or iTunes to transfer the content?
-
Problem on setting pagelabel using acrobat sdk
hi all, On setting pagelabel into the pdf file using acrobat sdk 9, we have an issue while opening the pdf file in notepad we got the value of pagelabel as <</P(CoverNUL)>> for your reference i have attached the screenshot and my code is below ASInt3