Is it possible to query which databases are on a databaseserver
I am trying to create a list of databases to which a specified user can connect.
The user has to specify the database server, user name and password and I want to show a list of possible databases.
Can this be accomplished?
Thanks.
Thanks for the help. The code below lists the databases in a MS SQL Server. For MySql I think the trick is to use the query "SHOW DATABASES;" with as column name 'Database', but I don't have a MySql Server here at this moment to test it.
public static List getDatabases(final Connection dbCon) throws Exception {
List databases = new ArrayList();
try {
String databaseName = null;
ResultSet rs;
Statement stat;
stat = dbCon.createStatement();
rs = stat.executeQuery("exec sp_databases");
while (rs.next()) {
databaseName = rs.getString("DATABASE_NAME");
if (!databases.contains(databaseName)) {
databases.add(databaseName);
} catch (SQLException e) {
throw new Exception("Get databases failed:" + e.getMessage());
return databases;
}
Similar Messages
-
I have synced two devices in FF. Is it possible to know which computers are synced using? I am worried about someone figuring out my email address and password.
HI nilhanw,
No currently there is not manage devices, only manage device. However changing the password will change the certificates on all the devices within less of an hour.
I hope this helps. -
HT1420 Is it possible to determine which machines are Itunes authorized?
Is it possible to determine which machines are Itunes authorized so I can only deauthorize one or is it not possible to see a list of your authorized machines?
Sorry but no. All you can see is a total account, not a list of individual systems that are authorized. If you want to deauthorize only a single computer, you need to do that from that computer.
Regards. -
Parallel Query - which actions are possible?
Hello guys,
we have an OLTP system which a huge amount of data... and now i want to try to introduce parallel query in the system and test something around.
I have some experiences with parallel query in an OLAP environment, but not in an OLTP.
What i am searching for?
An overview for Oracle 10g which lists all possible query accesses that are possible in a parallel environment.
For example:
- FTS - possible
- Nested Loops - possible
- Index Range scans - not possible
I know some .. but not all so i am searching for an overview on the oracle documentation page but was not able to found something.
Maybe you can help me.
Regards
StefanHello sybrand (my little senior dba),
regarding to the paper of Doug Burns there are more things that can be executed parallel (but this paper is about Oracle 9i), so please don't post if you don't have any knowledge.
http://www.dbanotes.net/archives/px.pdf
=> As Oracle’s parallel capabilities have been developed, most tasks can be executed in parallel now. According to the 9.2.0.5 documentation, Oracle supports parallel execution of the following operations: -
Access methods
For example, table scans, index fast full scans, and partitioned index range scans.
Join methods
For example, nested loop, sort merge, hash, and star transformation.
I am searching for such an information about Oracle 10g... maybe there are some more things that can be executed parallel wit 10g.
Thanks and Regards
Stefan -
Possible to tell which programs are accessing the internet? Bandwidth?
I seem to have intermittent, severely limited access to the internet at times.
Is it possible to tell if a particular program running in the background is either downloading or scanning or "online" in some manner...?
Is it possible on a Mac to see how much bandwidth, memory, cpu cycles, etc. particular programs are taking...in a window similar to that which opens on a PC after pressing CTRLALTDEL ?
thank youCheck out Activity Monitor in your Applications/Accessories folder.
-
Which databases are required to be moved in MOSS 2007 for upgrade to 2010?
Hi,
We are planning to upgrade MOSS 2007 environment to SharePoint 2010. As a next step, I have to move the following databases. Please correct me if we need to also move the Shared Services (SSP) content databases.
Content Databases of Main website (move required)
Content Databases of SSP (move required)
Content Databases of Central Admin. (move not required)
Thanks in advance!
LMContent Database, this is most important stuff.
if you have mysite and User profiles then you need to move the SSP to 2010. check the below blog for steps and understanding:
http://blogs.msdn.com/b/alimaz/archive/2009/11/08/upgrading-moss-2007-ssp-user-profiles-and-mysite-content-to-sharepoint-server-2010-using-db-attach-method.aspx
Yes you dont need the Central admin.
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
Is it possible to query different databases at once?
I have databases representing some states. I want to get a count of records for each instead of having to query each individual database. So I want the output to look like:
WY 12345
PA 1678
CT 187654Can you try the below query?
select 'test1',count(*) from dssp.dbo.CompareTable
union all
select 'test2',count(*) From dssp1.dbo.compareTable1
union all
select 'test3',count(*) From dssp2.dbo.compareTable1
--Prashanth -
Can we know which DBs are having access through DBLinks to local DB?
Gurus,
Is it possible to know which DBs are linked to our local DB using DB Links?
e.g.
There are 2 DBs Database1 and Database2 having schemas Schema1 and Schema2 respectively.,
Schema1 in Database1 is having a DBLink DBLink1 which connects to Schema2 of Database2.
Hence, by logging into Schema1 a user can access the objects of Schema2 in Database2 ( assume that appropriate privilages are granted)
If "I" have access to Database2 only, then is there any way that will tell me that Database1 is having access to Database2 using the DBLink1...like wise?
Please Guide-
Thanks in advance!
-Abhijit.Thanks Martijn,
It seems the views specified in the link you provided provide the information of DBLinks that have been defined at the local database.
But, I want to know which remote DBs are accessing my local DB using DBLinks?
Pls Guide.
Edited by: Abhijit.Oracle on May 15, 2009 10:39 AM -
SQL query which return all the NET SERVICES which are avaiable in tnsname
hi all
how to write a sql query which return all the net services which are avaiable in tnsname.ora
Regards
sAlso, tnsnames.ora is stored on the client, and not necessarily on the server; it's possible (and quite likely) that the name I use for a database in my tnsnames.ora could be different from the name you use for the same database; conversely we might use the same name for two different databases.
Regards Nigel -
Which database we are connected
Any body suggest me how to find which database we are currently connected in it (without querying v$database view) user have only the connect and resource role privs
Thanx,
VelSQL*Plus is just resolving the "show parameter" command to query the appropriate data dictionary table. Low-privilege users cannot execute that command
system@jcave > create user foo identified by foo;
User created.
Elapsed: 00:00:00.02
system@jcave > grant connect, resource to foo;
Grant succeeded.
Elapsed: 00:00:00.01
system@jcave > @connect foo/foo
Connected.
foo> show parameter instance_name;
ORA-00942: table or view does not existIs it possible for the original poster either to grant the user in question SELECT access to the v$database table or to create a stored procedure that returns the instance name and grant the user EXECUTE access to that?
Justin
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC -
SharePoint Databases - How to determine which ones are being used and which ones aren't
I am not sure where to exactly post this question. On the SQL Server side or on a SharePoint side.
I am a SQL Server Database Administrator who is monitoring some SharePoint databases. On a daily basis it seems that they are creating new databases but don't delete the databases that they are no longer using. For example, they might be testing
on a development server and if things aren't working properly instead of asking that the databases be deleted they just go ahead and create new databases to do what ever they need to do. Is there a way on the SQL Server side to determine which SharePoint
databases are being used and which ones aren't being used? Or does one determine this information through the SharePoint Central Administration console?
lcerniHello,
The following query gives you the databases now in use.
SELECT
DISTINCT d.name
FROM
sys.dm_tran_locks
tl INNER
JOIN sys.databases
d
ON
tl.resource_database_id
= d.database_id
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Which archivelogs are required for restoring database
I'm moving to RMAN direct to tape backups (via Netbackup). I'm hoping someone can clarify for me which archivelogs are needed for restoring/recovering a RMAN "hot" backup.
I will have two tape pools with different retention periods:
- standard (kept for 2 months)
- long term (kept for 7 years)
I plan to backup as follows:
- archivelogs every 15 mins direct to the standard pool
- daily backups to the standard pool
- monthend backups to the long term pool
Month ends will either be a full or a full plus a cumulative (level 2) (depending on the weekday that month end falls on).
The bit I'm concerned about is archivelogs. After 2 months they will be expired on tape. But do I need archive logs in order to restore the month end backups?
At the moment I record the SCN before the backup begins and after it finishes (retrieved via select first_change# first_scn from v$log where status = 'CURRENT'). Before recording the post-backup SCN, I force a logfile switch.
For clones, I always restore to the post-backup SCN that I previously recorded (rather than using the tag I associated with the backup).
So a few questions related to restoring after the 2 month window:
- do I need the archivelogs created during the timespan of the backup ran in order to restore to the post-backup SCN?
- If so, is just backing up these archivelogs (to the long term pool) by specifying the range of pre-backup SCN to post-backup SCN sufficient or are additional archivelogs likely to be required?
- if I restore the database and don't specify an SCN but just specify the tag used at the time of the backup, will archive logs be required at all? In this case what would be the state of the restored database - would it be as it was at the beginning or at the end of the backup?Hi user4835675,
do I need the archivelogs created during the timespan of the backup ran in order to restore to the post-backup SCN?Yes.
If so, is just backing up these archivelogs (to the long term pool) by specifying the range of pre-backup SCN to post-backup SCN sufficient or are additional
archivelogs likely to be required?Can you do a skip of the daily backup schedule duing the monthend backups run and run the "archivelogs every 15 mins" job to the long term pool?
Or temporarily stop the "archivelogs every 15 mins" job during the monthend job and run the monthend backup with the "backup database plus archivelog" clause?
if I restore the database and don't specify an SCN but just specify the tag used at the time of the backup, will archive logs be required at all?Yes, you need archivelogs to recover the datafiles to a consistent state.
In this case what would be the state of the restored database - would it be as it was at the beginning or at the end of the backup?You can only restore to a point in time which past the end of the backup.
Rgds,
Tycho -
Which databases like oracle are available to connect to java in eclipseide
which databases like oracle are available to connect to java in eclipse ide
ANY DATABASE WHICH HAS A JDBC DRIVER CAN BE CONNECTED THROUGH YOUR CODE. ECLIPSE HAS NOTHING TO DO WITH CONNECTING DATABASES.
-
SQL query to know which users are working on which forms in APPS R12
Dear gurus
We need the SQL query to know which users are working on which forms in APPS R12, and how to get the user.name of those records.
thanks in advance
best regardsHi,
Please see this thread.
USERS CONNECTED
Re: USERS CONNECTED
Regards,
Hussein -
I have got a lot of apps, which are not installed on any of my iDevices anymore. is there a possibility to remove all those apps from iTunes without searching which ones are, and which ones aren't installed on one of my iDevices?
Assuming all the device(s) have been synced to this computer as its Home computer. The easiest way would be to delete all the apps from iTunes. After which connect your device(s) to the computer (iTunes) and transfer purchases from the device(s) by right click (control click) the device name in the left sidebar and the click transfer purchases. When done only the apps on your device(s) will be in you iTunes library.
Hope that helps
Maybe you are looking for
-
Since upgrade to ios6.0.1 a few days ago my wifi doesn't work
I received a notification to upgrade to iOS 6.0.1. Ever since then I have been having problems with wifi. Go to a website, safari cannot connect to the server. Go to PayPal app, works ok, login...cannot find server. My Verizon app, login ok, try to g
-
How do you turn off the auto grid?
How do you turn off the auto grid? I read in a forum that the solution is "View- show- turn off grid". But the weird thing is I had to have that website open to even get the alternative up under "View". If I didn´t, there were other alternatives ther
-
Execute immediate will work in SQL Block in shell script?
Hi Friends, i am wirting script to get the account id's corresponding to CIF from oracle table and need to pass to procedure. Here first_org and last_org are shell variables. When i execute the below program it is throwing execute not found. Can you
-
After automatic updates, the sound quit working properly. At first I thought it was newer games that were "too much" for the older computer to handle (Craft the World) but then also noticed that the same problems plague games that I know worked just
-
Problem doing SFTP through ISDN
Hi, I have a problem doing SFTP through ISDN, ISDN connection is not staying active throughout the duration of the file transfer, it drops after its timeout value even if data transfer is in progress and file transfer break at that point, this happen