Professional Documents
Culture Documents
Sybase Remedy
Sybase Remedy
Sybase Remedy
Print Close
Problem Details
Some commonly used SQL statements in support - Sybase ID: KM-000000011549
Product Type: Problem Solution
Environment
Solution
Starting Sybase: Most installations here are as root. You can check the owner of the files in the
$SYBASE directory to confirm the owner of the install. ***First, you'll need to set your environment
variables. Sybase provides .sh and .csh files for your convenience. You need to source these files as
you would either a .profile or .cshrc file (depending on your shell). Run either of these commands from
the Sybase home directory:
./RUN_cruiser &
(if you want to use the Sybase recommended way, use the startserver script (with the -f option)
located in the same directory as the RUN_servername script). Make sure you provide the full path to
the RUN_servername script. For example:
startserver
Example 2
Starts an Adaptive Server named MYSERVER and a Backup Server named SYB_BACKUP:
Example 3
Starts only the Backup Server SYB_BACKUP:
startserver -f RUN_SYB_BACKUP
1 of 6 9/30/2010 7:24 PM
Document Viewer http://rkm.bmc.com/rkm/viewdoc.jsp?remedy=1&doc=KM-0000000115...
To log in to Sybase (make sure that you source the Sybase profile first. See *** above regarding
setting environment variables. isql should be in your path if you sourced the SYBASE profile file):
For example:
or
IMPORTANT: FOR ARS INSTALLS YOU NEED TO SET THE DSQUERY ENVIRONMENT VARIABLE TO THE
SYBASE SERVER NAME. THIS VALUE IS NOT SET IN THE SYBASE.sh or the SYBASE.csh file.
***NOTE**** to execute sql statements from Sybase you need to hit enter and then type go. For
example:
(1 row affected)
1>
*****NOTE**** Also, Sybase is case sensitive. For ARS data dictionary columns, you HAVE to use
proper case. ARS data dictionary standard is to capitalize the first letter in the second word like:
tfServer, filterId, schemaId and dbVersion
select @@version
sp_helpdevice
sp_helpdevice device_name
This is how you create a device in Sybase (create one device for the DB, and one for the log):
2 of 6 9/30/2010 7:24 PM
Document Viewer http://rkm.bmc.com/rkm/viewdoc.jsp?remedy=1&doc=KM-0000000115...
IMPORTANT:
(use sp_helpdevice to confirm unique name and datafile location)
name - whatever name you want to give to the device - this is what you will provide to the install
script.
physname - the fully qualified path the file to contain the information, make sure this is unique
size - in 2k blocks (512 times the number of megabytes that you want to use to create the device - in
the above example, the device will be 100Mb.)
vdevno - virtual device number - legal numbers are unused numbers between 1 and 255). If you want
to use a number higher than 10 you may need to use sp_configure to modify the default value for
"number of devices" to increase this.
sp_helpdb
sp_helpdb [database_name]
To change databases:
use [database_name]
sp_help [tablename]
3 of 6 9/30/2010 7:24 PM
Document Viewer http://rkm.bmc.com/rkm/viewdoc.jsp?remedy=1&doc=KM-0000000115...
sp_configure
sp_dboption
To rename a table:
sp_changedbowner ownername
sp_helptext procedure_name
To create a database on two already existing devices (this example would create a 150Mb db- 100 for
data, 50 for logs on devices device1 and device2 respectively):
To drop a login:
sp_droplogin loginName
To back up a database (make sure the backup server is running: ps -aef | grep back)
For example:
For example:
4 of 6 9/30/2010 7:24 PM
Document Viewer http://rkm.bmc.com/rkm/viewdoc.jsp?remedy=1&doc=KM-0000000115...
2. Enter the following command to shut down the specified Backup Server:
After you shut down a Backup Server, you must wait at least 30 seconds before restarting it.
-----------
16384
(1 row affected)
Use this option only when you know exactly what you want to type. Extraneous characters, such as
backspace, will not be stored.
1.
Invoke isql with the -o option:
Although you do not see your isql entries, or the server's response, the isql session is stored in
the file file_name.
5 of 6 9/30/2010 7:24 PM
Document Viewer http://rkm.bmc.com/rkm/viewdoc.jsp?remedy=1&doc=KM-0000000115...
Categories
Administration/Database
Visibility Groups
Attachments
Filename Size
No records
Show Global Attachments
Feedback
How effective was this at resolving your problem?
1 2 3 4 5
Not Effective Very Effective
6 of 6 9/30/2010 7:24 PM