473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

database name

I have the following simple question:

Once connected to a database (possibly with an alias), how can I get
the actual database name?

Nov 12 '05 #1
3 1162
Special Register current server
eg. db2 values current server

HTH
Joachim

Nov 12 '05 #2
In addition to Joachim is idea, You can also do the following
db2 connect
or
db2 get connection state

Nov 12 '05 #3
Joachim's idea works great...
Thank you

db2 connect, however, gives you the alias you used to connect.

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jon | last post by:
I have a database called abc-100 which seems to cause problems with replication and importing sql files created with mysqldump. First, if on the master we create a temporary table (because we...
1
by: Trent | last post by:
Hello, I was wondering if anyone here could help with a Quest Central issue. I have two different hosts listed in Quest Central. Each host has a database on it, but the databases have the...
7
by: Spencer | last post by:
Is it possible with a SQL query against a system table to determine what the database name or instance name is that you are logged into? We are on DB2 8.1.6. Spencer
6
by: Agnes | last post by:
Please help, i had completed over 30-50 reports, now. our client insist to change the database name. anyshorcut that I can change the database name in the report without re-write all of them ??...
1
by: Jacand4321 | last post by:
I'm trying to audit all the database activities using Server-side trace in SQL Server 2000. Basically I need to get the login information (login Id, Login time etc) along with the name of the...
0
by: Ray | last post by:
Hi, I have upgraded my program from vb.net 2003 to vb.net 2005. In 2003, I can get the database name of tables of crystal report by the following code: For Each table In...
2
by: David C. Barber | last post by:
This updates a previous post. We have updated our SQL Server 2000 to new hardware by reinstalling SQL Server 2K to a new, dual processor server. We performed a full SQL backup of the entire...
6
by: craigkenisston | last post by:
How to change database name on the fly? I have an asp.net application in which a user connects to a sql server, where there's a centralized database with the users table and general settings....
1
by: AparnaKulkarni | last post by:
Want to call a crystal report of version 8.5 through VB.NET. In this the data is passed to report through XML file. On running this, the report asks for Database name, Server name, Userid, Pwd. ...
2
by: Adi | last post by:
hi everyone... i have a doubt.. is there any way i can get the database name.. my page is accessing.. i would like to display the database name, the current page is accessing. This has to be done...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.