Basic SQL query scripts for SAP B1
hi guys,
do you have any documents, guides or reference links regarding basic SQL query scripts for SAP B1?
thanks and have a nice day!
blake p.
Hi
You can also check SBONotes.com.
For sql understanding , you can search in websearch - tsql and it will pop up with informations you need.
You can also refer to forum once you understand the basic techniques
Hope this helps
Bishal
Similar Messages
-
Error in installing SQL SErver 2000 for SAp
When i try to install Ms SQL server 2000 for SAP it is giving me a message , "unable to validate product key"
Pls let me know how to solve itDear,
When u install original sql server, might be it should not ask for product key. In sql source there is one vbs script, just click on that vbs script and ur installation of sql server is going to start. This is upto my knowledge.
Thanking You.
Charanjit -
To generate the scripts for SAP mappings:
- From the Warehouse Module Editor menu, choose Module then Generate.
- The Generation Mode dialog
hi i don't find the "generation mode dialog". where i find it?
robson
thanks.hi,
the reboot of a system can be of broadly two types.
1) done by the user
2) abrupt shutdown say due to power failure.
if you closely look at the file inittab under /etc/ you will find different files are executed for different run levels. For powerfailure also there is a script called powerfail under /etc/init.d/. with different options.
under init.d directory you can find all the scripts for different run levlels starting from rc0-rc6, halt named script , and reboot named script.
. So to solve your problem you can write a script and execute it under this files. Changing all these files are not at all recommended as any mistake can lead to a system halt state. But still we can make the changes if we know what are we doing and definitely you can try if are having a test system with you.
the logic will go something like this:-->
1) for shutdown
respawn a new shell
login as <sid>adm
execute the command i.e stopsap
exit from that user
same goes for startup also.
now only you have to run this script in the appropriate files at appropriate places(most important).
but the main problem comes when system goes down as sap system takes time to stop so you have to make your OS wait uptill that which may be a tedious task.
. the above discussion was keeping SUSE linux enterprise server in mind.
Please do not make any changes in the above mentioned file if you are running a crucial
system on that OS. try only on a test system.
revert back in case of any query..
cheers,
yatindra
null -
Creating SQL-Loader script for more than one table at a time
Hi,
I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
It looks like I can create SQL-Loader scripts for all the tables
or for one table at a time. If I want to create SQL-Loader
scripts for 5-6 tables, I have to either create script for all
the tables and then delete the unwanted tables or create the
scripts for one table at a time and then merge them.
Is there a simple way to create migration scripts for more than
one but not all tables at a time?
Thanks,
Prashant RaneNo there is no multi-select for creating SQL-Loader scripts.
You can either create them separately or create them all and
then discard the one you do not need. -
HACMP Clustering Script for SAP ECC 6.0 (SR1) - Automatic Failover-Oracle10
Hello,
I have installed the SAP ECC 6.0 (SR1) under AIX 5.3 / Oracle 10g with HACMP Clustering environment. Manual Failover is working fine. ASCS and Database instances are loaded in share drive with Virtual IP and Virtual name. Central Instance and Dialog Instance are loaded locally in Node A and Node B. I want to get HACMP Clustering script(automatic failover script) for Automation. Please help me if you have.
Thanks
Gautam PoddarHere are HA stop & start scripts that you should be able adapt for your particular circumstances. Based on earlier versions of SAP / Oracle but assume should be a reasonable guide
Script to start SAP is start_sap_prd
#!/bin/ksh
Script: /usr/local/bin/cluster/start_sap_prd
Comments: HACMP Application START script for PRD
Show me obvious information in hacmp.out
banner "Starting"
banner "PRD SAP"
Set the oracle and sap owner.
ORASID="PRD"
SAPADM="prdadm"
ORAUSR="oraprd"
VIRTUALHOST="vhost"
DEVHOST="vhostdev"
Get the volume groups for this resource group
RG=$( /usr/es/sbin/cluster/utilities/cllsgrp | grep -i $ )
VG_LIST=$( /usr/es/sbin/cluster/utilities/cllsres -g $ | \
grep "VOLUME_GROUP=" | \
awk -F\" '{ print $2 }' )
Check the transport directory is mounted.
if mount | grep -w "/usr/sap/trans"
then
print "Transport directory is already mounted."
else
cd /tmp
print "Attempting a background mount of the transport directory."
nohup mount -o intr,bg,soft :/usr/sap/trans1 /usr/sap/trans &
fi
#Start SAP and Oracle
#Start listener
su - $ -c /rprd/oracle/PRD/920_64/bin/lsnrctl start
rc=$?
if [ $? != 0 ]
then
echo "ERROR: Listener failed to start\n"
fi
#Start Database
su - $ -c "/rprd/oracle/PRD/bin/start_database_PRD.sh"
sleep 20
Standard sapstart script
su - $ -c startsap $
Script: /usr/local/bin/cluster/stop_sap_prd
Dated: 01/11/06
Application: Oracle/SAP
Comments: HACMP Application STOP script for SAP / Oracle PRD
Show me obvious information in hacmp.out
Set the oracle and sap owner.
rc=$?
if [ $? != 0 ]
then
echo "ERROR: Failed to start SAP\n"
fi
exit 0
Script to stop SAP is stop_sap_prd
#!/bin/ksh
set -x
banner "stopping"
banner "PRD SAP"
ORASID="PRD"
SAPADM="prdadm"
ORAUSR="oraprd"
VIRTUALHOST="vhost"
#Stop SAP/Oracle
su - $ -c stopsap $
rc=$?
if [ $? != 0 ]
then
echo "ERROR: Failed to stop SAP and Oracle\n"
break
fi
Stop SAP collector and Oracle listener.
su - $ -c /usr/sap/PRD/SYS/exe/run/saposcol -k
rc=$?
if [ $? != 0 ]
then
echo "ERROR: Failed to stop SAPOSCOL \n"
fi
su - $ -c /rprd/oracle/PRD/920_64/bin/lsnrctl stop
rc=$?
if [ $? != 0 ]
then
echo "ERROR: Listener failed to stop\n"
fi
if mount | grep -w "/usr/sap/trans"
then
print "Transport directory is mounted."
/usr/es/sbin/cluster/events/utils/cl_nfskill -k -u /usr/sap/trans
sleep 1
/usr/es/sbin/cluster/events/utils/cl_nfskill -k -u /usr/sap/trans
sleep 1
umount -f /usr/sap/trans &
else
print "Transport directory is not mounted."
fi
exit 0 -
Disaster Recovery server for SAP and HACMP Cluster script for SAP ECC 6.0
Hi,
I need document for Disaster Recovery server for SAP? I have to configure the DR Server If you have, please share this document if possible.
Have you any cluster script ( HACMP Cluster script for SAP ECC 6.0 ) ?
Thanks & Regards,Hello, I'm doing a "Plant ECC6 to do a test disatre / Recovery.
During the installation, I would use the same <sidadm> existing as it is in the PRD.
If I tell you to install it during the same <sidadm> it will overwrite what already exists, or do I just enter the password of existing <sidadm>? -
Is there any Sql Query Editor in SAP
Is There any Option to write the sql query .
like sql plus or toad in oracle.What is the transaction code for that.
with out writing ABAP code i need to browse the table is it possible in SAP? -
Hello,
Where can I find the SQL server 2005 Specs for SAP Business one 2007 ?
Kind Regards,Try this link:
https://websmp110.sap-ag.de/~sapidb/011000358700000310652008E.pdf
It needs S user id and password.
Thanks,
Gordon -
HACMP Clustering Script for SAP ECC 6.0 (SR1) - Automatic Failover
Hello,
I have installed the SAP ECC 6.0 (SR1) under AIX 5.3 / DB2 V8 FP12 with HACMP Clustering environment. Manual Failover is working fine. Central System has been installed in share drive with Virtual IP and Virtual name inNode A. Dialog Instance is loaded locally in Node B. I want to get HACMP Clustering script(automatic failover script) for Automation. Please help me if you have. It is single package clustering. If Node A fails, Node B will take care ( Central System and Dialog instance will run in Node B)
Thanks
Gautam Poddarthis post is duplicated at Upgrade to ERP 2005/ECC 6.0 from R/3 4.72/Basis 640 on Z/OS 1.4 DB2 8.1
-
Sql Server Script for the List of all Country State and City
I am searching for the Sql Server Script of all country State and City with the Following type
For the Country only 2 Columns are there i.e. CountryId and CountryName(CountryId is primary Key)
For the State 3 Columns are there i.e. CountryId, StateId and StateName(StateId is Primary Key and CountryId is Foreign Key)
For the City 3 Columns are there i.e. StateId ,CityId and CityName(CityId is PrimaryKey and StateId is foreign Key).
I need this type of Script with Column name. plzzz help me out i m stuck i didnt get the list as i want.
Thanx and Regrads,Hi Vishnu,
According to your description, you want to list all countries, states and cities, right?
I have tested it on my local environment, here is a sample script for you reference.
select
[dbo].[Country].[CountryId]
, [dbo].[Country].[CountryName]
, [dbo].[State].[StateId]
, [dbo].[State].[StateName]
, [dbo].[City].[CityId]
, [dbo].[City].[CityName]
from
[dbo].[Country]
left join [dbo].[State] on [dbo].[Country].[CountryId]=[dbo].[State].[CountryId]
left join [dbo].[City] on [dbo].[State].[StateId]=[dbo].[City].[StateId]
Regards,
Charlie Liao
TechNet Community Support -
SQL Query constructing for searching values in Tables single Column
I have Table USER_SERVICES with 2 Columns USER_NAME, Services. Please find below sample data on USER_SERVICES Table.
A user can be assigned with multiple services(service1, service2 etc.,). So we store data as below :
USER_NAME Services
user1 service1
user1 service2
user1 service3
user2 service1
user2 service2
user3 service3
user4 service4
I need to frame a SQL Query to 'select users assigned with Service A and Service B and Service n'.
Note: 'And' condition is used when Searching for multiple services.
Example: The SQL Query has to dynamically handle condition if i give Single Service, multiple Services(service1 and service2 e.t.c,)
If i say select users assigned with service1 and service2, from the above Table, result should be user1 and user2
If i say select users assigned with service1 and service2 and service3, from the above Table, result should be user1
If i say select users assigned with service4 from the above table, result should be user4
If i say select users assigned with service1 from the above table, result should be user2,user1
If i say select users assigned with service1 and service2 from the above table, result should be user2,user1
How do i construct the SQL Query. Any help will be appreciated.
Thanks,
Sathish
Alternate email: [email protected]How it will be stored? In a string or a table or a collection type?
If you have it in a table you can do like this.
with t
as
select 'user1' user_name, 'service1' services from dual union all
select 'user1', 'service2' from dual union all
select 'user1', 'service3' from dual union all
select 'user2', 'service1' from dual union all
select 'user2', 'service2' from dual union all
select 'user3', 'service3' from dual union all
select 'user4', 'service4' from dual
t1 as
select 'service1' services from dual union all
select 'service2' from dual
select distinct user_name
from (
select t.user_name, t.services, t1.services, count(t1.services) over(partition by t.user_name) cnt, t1.cnt cnt_1
from t
left join (select t1.*, count(*) over() cnt from t1) t1 on t1.services = t.services
where cnt = cnt_1 -
Creating a Perl script for SAP sytem profile parameter
Hi,
I need to create a perl script for all th eprofile parameter to check as a security directive ,so that whenever the system is started it checks for this profile parameter.
As per my company sap directive ,these are the profile parameter i need to set.
Can anyone let me know how to write the scripts.
login/min_password_lng Minimum password length for user password 320 Min.
8
login/password_expiration_t
ime
Number of days between forced password change. 0 Max.
35
login/fails_to_session_end Number of invalid logon attempts allowed before the
SAP GUI is disconnected.
3 Max.
3
login/fails_to_user_lock Number of invalid logon attempts before the user id is
automatically locked by the system.
12 Max.
6
rdisp/gui_auto_logout Time, in seconds, that SAPGUI is automatically disconnected
because of in-activity.
0 60-
7200
21
auth/test_mode Jump into report RSUSR400 at every authority check N N22
auth/system_access_check_
off
Switch off automatic authority check for special ABAP
commands
0 0
auth/no_check_in_some_ca
ses
Special authorization checks turned off by customer.
Enabling of Profile Generator
N/Y23 Y
login/ext_security Security access controlled by external software. N N24
auth/rfc_authority_check Permission for remote function calls from within ABAP
programs
0 1
login/failed_user_auto_unlo
ck
Enable system function for automatic unlock of users
at midnight. (0 = locks remain)
0 0
login/
no_automatic_user_sapstar
(as of 3.1h)
login/no_automatic_user_sa
p* (prior to 3.1h)
Disable ability to logon as SAP* with PASS as password
when SAP* deleted.
0 125,26
auth/tcodes_not_checked TCode checking for SU53 & SU56 analysis disabled (empty
"SU5
3
Regards,
Chetan.Here's a simple perl script that should help you get what it is you're looking for - you can add all the parameters you want to search for, I just took a few of them:
#!/usr/bin/perl -w
use strict;
use sapnwrfc;
SAPNW::Rfc->load_config;
my $rfc = SAPNW::Rfc->rfc_connect;
my @parms = ( "login/min_password_lng",
"login/password_expiration_time",
"login/fails_to_session_end",
"login/fails_to_user_lock" );
for my $x (0 .. $#parms) {
my $rcc = $rfc->function_lookup("SXPG_PROFILE_PARAMETER_GET");
my $slr = $rcc->create_function_call;
$slr->PARAMETER_NAME($parms[$x]);
$slr->invoke;
print "Value for $parms[$x] is: ".$slr->PARAMETER_VALUE."\n";
$rfc->disconnect();
And running it, you'll get:
[dhull@397 scripts]$ ./read-profile.pl
Value for login/min_password_lng is: 7
Value for login/password_expiration_time is: 90
Value for login/fails_to_session_end is: 3
Value for login/fails_to_user_lock is: 6
[dhull@397 scripts]$
If you need to get your perl environment read to make RFC calls to your SAP system, check my series of blogs on how to do so here:
https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/u/251752730
Cheers,
David. -
Need a SCCM SQL Query Report for Installed Software with Packages and Applications.
I need a report that will show the number of installs of all of the workstations applications and packages over a given period of time.
This will let us know how effective our deployments are and how well the on-demand software is being adopted.
Any help?Your Install Source might be an option as most SCCM deployments will install from C:\Windows\ccmcache\xx [where xx is a random folder name]. Most software vendors will put an install source in the registry, but not all do, so it won't be completely accurate.
When software is installed manually, the install source path won't be C:\Windows\ccmcache\xx.
Here is a SQL query I have for Install Source:
SELECT v_GS_COMPUTER_SYSTEM.Name0 as 'Computer Name', v_GS_INSTALLED_SOFTWARE.ProductName0 as 'Software Title', v_GS_INSTALLED_SOFTWARE.InstallSource0 as 'Install Source', v_GS_INSTALLED_SOFTWARE.ProductVersion0 as 'Version', v_GS_INSTALLED_SOFTWARE.InstalledLocation0
as 'Installed Location', v_GS_INSTALLED_SOFTWARE.InstallDate0 as 'Install Date'
FROM v_GS_COMPUTER_SYSTEM INNER JOIN v_GS_INSTALLED_SOFTWARE ON v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_INSTALLED_SOFTWARE.ResourceID
WHERE v_GS_INSTALLED_SOFTWARE.ProductName0 like '%Office 365 Pro%'
ORDER BY v_GS_COMPUTER_SYSTEM.Name0 -
How to test basic sql queries online(for Sql Server 2012 and up versions) ?
Hi,
I need to test basic sql queries using sql server without installing Sql Server on to the system.
Do we have such readymade online help, which can solve such difficulties ?
Please sugest some of url's.
Thanks.Thanks for reply.
I am looking specific Sql Server.
Hi Maggy,
I strongly recommend you install SQL Server 2012 express edit and test your T-SQL queries. We can download it from the following site:
Microsoft® SQL Server® 2012 Express:
http://www.microsoft.com/en-hk/download/details.aspx?id=29062
Regards,
Elvis Long
TechNet Community Support -
SQL query statement for stored procedure / function listing ...
Hi everyone,
Is there a SQL query to list all the stored procedures and functions of an user in an Oracle 8 database?
I have this idea:
select * from USER_SOURCE where TYPE = 'PROCEDURE' or TYPE = 'FUNCTION'
but I am not too sure whether this is correct.
Thanks in advance,
EricYeah
I agree with you Garcia , my above posting was a correction to the query mentioned in the question only.
you are correct
If you only want the name of the object,
SELECT Object_Name from User_Objects where object_type in ( 'PROCEDURE' ,'FUNCTION');
is much faster than Selecting (distinct) from User_Source.
Maybe you are looking for
-
Search request issue in GRC AC10.0
Hello Experts, When we want to check the status of the request logged by others by using the below option we are not getting any results GRC 10.0 with SP14. My Home ->My Profile -> Request Status then click on the Change Query. In the Change query sc
-
HT4783 AirDrop between two MacBook Airs
We have two MacBook Airs, and older one running 10.7.5 and a newer one running 10.9.1. When running AirDrop on both, the older one can see the newer one and can transfer files successfully. But the newer one cannot see the older one. Any ideas?
-
Dropdown - issue with passing values to context
Hi, After facing issue in: Webdynpro + alv + dynamic dropdown Now I've encountered another problem. Dropdown is created in alv, however once user select value from the list it shows selected value in the cell, however value in context remains unchang
-
ORA-01422: Exact fetch returns more than requested no of rows
Hi experts. There is on requeter and one Supervisor to approve the request. But if see the errors in Workflow Administration Web Applications,see the above error message. How come this error message, if i have one approver in the notication process.T
-
I have a problem, I am sure that we all have or face. I have a iMac as well as my MacBook Pro, plus iPhones Apple Tvs and iPads. I use lightroom 5 for photo organization (yes I love the new lighroom) but the common problem I face is that I can never