Question

In: Computer Science

​​​​​​ Write a SQL statement to retrieve user account information (username, account_status, default_tablespace, temporary_tablespace, and created...

​​​​​​

  1. Write a SQL statement to retrieve user account information (username, account_status, default_tablespace, temporary_tablespace, and created date) of your account.

  1. Write a SQL statement to retrieve the “USERS” table space information (tablespace name, block_size, initial extent, max_extents).

  1. Write a SQL statement to retrieve the physical file information (file name, tablespace name, bytes, blocks, and status).  

Solutions

Expert Solution

I use the field name in caps. Any doubt please comment me. The sql queries are correct. I test it.

Write a SQL statement to retrieve user account information (username, account_status, default_tablespace, temporary_tablespace, and created date) of your account.

Answer 1)

select USERNAME,ACCOUNT_STATUS,DEFAULT_TABLESPACE,TEMPORARY_TABLESPACE,CREATED "CREATED DATE" FROM DBA_USERS;

Write a SQL statement to retrieve the “USERS” table space information (tablespace name, block_size, initial extent, max_extents).

Answer 2)

select TABLESPACE_NAME,BLOCK_SIZE,INITIAL_EXTENT,MAX_EXTENTS from dba_tablespaces where TABLESPACE_NAME='USERS';

Write a SQL statement to retrieve the physical file information (file name, tablespace name, bytes, blocks, and status).

Answer 3)

select df.name "FILE NAME",tbl.name "TABLESPACE NAME",df.bytes,df.blocks,df.status from v$datafile df,v$tablespace tbl where df.ts#=tbl.ts#;


Related Solutions

write a program i java that ask the user to enter salary, user ID and username...
write a program i java that ask the user to enter salary, user ID and username and out put them
Developer User Account Create a user account using T-SQL for developers named DEVELOPER with the password...
Developer User Account Create a user account using T-SQL for developers named DEVELOPER with the password TESTACCOUNT that grants the user the ability to: Select and modify any table. Connect to and have access to all resources. In SSMS
Write C++ code that prompts the user for a username and password (strings), and it calls...
Write C++ code that prompts the user for a username and password (strings), and it calls the login() function with the username and password as arguments. You may assume that username and password have been declared elsewhere. Your code should print error messages if login() generates an exception: LoginException: "Username not found or password incorrect" ServerException: "The login server is busy and you cannot log in" AccessException: "Your account is forbidden from logging into this server" Any other exception: "Unknown...
Write C++ code that prompts the user for a username and password (strings), and it calls...
Write C++ code that prompts the user for a username and password (strings), and it calls the login() function with the username and password as arguments. You may assume that username and password have been declared elsewhere. Use virtual functions, pure virtual functions, templates, and exceptions wherever possible. Please explain the code. Your code should print error messages if login() generates an exception: LoginException: "Username not found or password incorrect" ServerException: "The login server is busy and you cannot log...
Using the HotelDB tables, provide the following result as a screen image. WRITE SQL to retrieve...
Using the HotelDB tables, provide the following result as a screen image. WRITE SQL to retrieve rows from any hotel with Family room types and price less than $150. use hoteldb; CREATE TABLE HOTEL ( hotelNo numeric primary key , name varchar(40) , address varchar(40) , city varchar(200) ); CREATE TABLE ROOM ( roomNo numeric Primary Key , hotelNo numeric References HOTEL , type varchar(20) , price dec(9,2) ); CREATE TABLE GUEST ( guestNo numeric primary key , name varchar(40)...
Use the following information to create SQL commands to retrieve data from Henry Books database :...
Use the following information to create SQL commands to retrieve data from Henry Books database : For each book, list the book code, book title, publisher code, and publisher name. Order the results by publisher name. For each book published by Plume, list the book code, book title, and price. List the book title, book code, and price of each book published by Plume that has a book price of at least $14. List the book code, book title, and...
Using SQL Developer Question 1 Create a block to retrieve and display pledge and payment information...
Using SQL Developer Question 1 Create a block to retrieve and display pledge and payment information for a specific donor. For each pledge payment from the donor, display the pledge ID, pledge amount, number of monthly payments, payment date, and payment amount. The list should be sorted by pledge ID and then by payment date. For the first payment made for each pledge, display “first payment” on that output row. Question 2 Redo question 1, but use a different cursor...
Create a function named getCreds with no parameters that will prompt the user for their username...
Create a function named getCreds with no parameters that will prompt the user for their username and password. This function should return a dictionary called userInfo that looks like the dictionaries below: # Administrator accounts list adminList = [ { "username": "DaBigBoss", "password": "DaBest" }, { "username": "root", "password": "toor" } ] Create a function named checkLogin with two parameters: the userInfo and the adminList. The function should check the credentials to see if they are contained within the admin...
PL/SQL Write a PL/SQL block, using a Case Statement that prints a student’s letter     grade...
PL/SQL Write a PL/SQL block, using a Case Statement that prints a student’s letter     grade based on the value stored in a variable called grade. Use the ACC      grading system described in the course syllabus to create the block and set     the initial value of grade as 95. Use only one print statement and no      logical operators in your code. Assume a grade can exceed 100, but it      can’t be negative. Grade Scale: Grade Scale:...
Write a Powershell script to create a Windows user account that is a non-admin user. This...
Write a Powershell script to create a Windows user account that is a non-admin user. This assignment assumes that you already have a Windows VM, with the administrator account created.. To complete the assignment, write the PowerShell script, run it on your VM, and submit the script here.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT