SQL practice database

Hi FOlks,
I installed the companion CD to 10g. How do I change databases to practice using PL/SQL from my SQLplus application?
Thanks
BRuce

As Justin mentioned you will need to unlock the HR user/schema. Also, before you ask... yes, user and schema are synonymous. A user or schema, whatever you call them will have associated tables in them. And tables that are under (or are created by) that user belong to that user only.
When you signed in as SYSMAN and you looked up the tables, that query showed you the tables belonging to SYSMAN, not HR.
Login in to HR and you will see the tables(and other objects) belonging to HR.
Good luck and fun adventure.

Similar Messages

  • Moving an existing SQL Express Database to SQL Server 2008 (included in SBS2011) help!

    I have software that uses SQL 2005 right now, but the database is close the max size (4 GB). I have SBS2011 installed and it includes SQL 2008 and SQL 2008R2.  I want to move the database to the 2008 version that can that can handle larger databases.
    I'm not an SQL expert, but have some experience with it.  What I need are some directions on how to make this change without causing any problems with the system, including setting up the SQL server so it will have all the same settings as the old one.
    This is a practice management software.
    Thanks in advance for any help.  Harvey

    Hi,
    I think you can upgrade SQL Server 2005 to later version of SQL Server rather than moving the existing database to another SQL Server instance.
    Upgrade SQL Server 2005 SP2 Express to SQL Server 2008 R2 Express and SQL Server 2005 SP4 SQL Server 2012 Express. And you will have maximum 10 GB per database.
    Make sure that your operation system is compatible with SQL Server
     version which you want to upgrade to. For more information, see:
    http://msdn.microsoft.com/en-us/library/ms143506(v=sql.105).aspx#SSE_x64
    It is possible to backup and restore the database on another instance and modify the database path in the software.
    You need to test it in your test environment first before making changes in the production environment.
    In addition, you need to consult with the software developer and see if there is any potential issue.
    Upgrade to SQL Server 2012 Using the Installation Wizard (Setup)
    http://technet.microsoft.com/en-us/library/ms144267.aspx
    Back Up and Restore of SQL Server Databases
    http://technet.microsoft.com/en-us/library/ms187048.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Best practise for creating an application that connects to a SQL Server database

    I have created an application that connects to a SQL Server database and views information using a datagrid and performs several updates when a button
    is selected.  
    I have created a SQLcontrol.vb using the following code:
    Imports System.Data.Sql
    Imports System.Data.SqlClient
    Public Class SQlControl
    'connection 1
        Public SQLCon As New SqlConnection With {.ConnectionString
    = "Data Source=;Initial Catalog=;Integrated Security=True"}
    'connection 2
        Public SQLCon1 As New SqlConnection With {.ConnectionString
    = "Data Source;Initial Catalog=;Integrated Security=True"}
        Public sqlcmd As SqlCommand
        Public sqlda As SqlDataAdapter
        Public sqldataset As DataSet
        Public Function hasconnection() As Boolean
            Try
                SQLCon.open()
                SQLCon.close()
                Return True
            Catch ex As Exception
                MsgBox(ex.Message)
                Return False
            End Try
        End Function
        Public Sub runquery(query As String)
            Try
                SQLCon.Open()
                sqlcmd = New SqlCommand(query,
    SQLCon)
                'LOAD
    SQL RECORDS FOR DATAGROD
                sqlda = New SqlDataAdapter(sqlcmd)
                sqldataset = New DataSet
                sqlda.Fill(sqldataset)
    BH READ DIRECTLY FROM THE DATABASE
                'Dim
    R As SqlDataReader = sqlcmd.ExecuteReader
                'While
    R.Read
                'MsgBox(R.GetName(0)
    & ": " & R(0))
                'End
    While
                SQLCon.Close()
            Catch ex As Exception
                MsgBox(ex.Message)
                'will
    close connection if still open
                If SQLCon.State
    = ConnectionState.Open Then
                    SQLCon.Close()
                End If
            End Try
        End Sub
        Public Sub runquery1(query As String)
            Try
                SQLCon1.Open()
                sqlcmd = New SqlCommand(query,
    SQLCon1)
                'LOAD
    SQL RECORDS FOR DATAGROD
                sqlda = New SqlDataAdapter(sqlcmd)
                sqldataset = New DataSet
                sqlda.Fill(sqldataset)
    BH READ DIRECTLY FROM THE DATABASE
                'Dim
    R As SqlDataReader = sqlcmd.ExecuteReader
                'While
    R.Read
                'MsgBox(R.GetName(0)
    & ": " & R(0))
                'End
    While
                SQLCon1.Close()
            Catch ex As Exception
                MsgBox(ex.Message)
                'will
    close connection if still open
                If SQLCon1.State
    = ConnectionState.Open Then
                    SQLCon1.Close()
                End If
            End Try
        End Sub
    End Class
    A code for one of my button which views displays data grid contains the following code:
    Private Sub Button1_Click_1(sender As Object,
    e As EventArgs) Handles Button1.Click
            If SQL.hasconnection
    = True Then
                SQL.runquery("select 
    * from tablea")
                If SQL.sqldataset.Tables.Count
    > 0 Then
                    DGVData.DataSource = SQL.sqldataset.Tables(0)
                End If
            End If
        End Sub
    I am fairly new to vb.net and have read a few books and followed a few tutorials on youtube, what I would like to know is, are there any disadvantages
    to the way I have connected to a SQL database using the SQLControl.vb.  A lot of the vb books include data adapter and dataset within the form, I'm not sure if I'm following best practice by have the connection details outside of the form.
    My other question is, I have created two connections in the SQLControl and call these connections within the same form using the same data adapter
    and dataset.  It all works fine but I just wanted to know of any potential issues?
    Public SQLCon As New SqlConnection With {.ConnectionString
    = "Data Source=;Initial Catalog=;Integrated Security=True"}
    'connection 2
        Public SQLCon1 As New SqlConnection With {.ConnectionString
    = "Data Source;Initial Catalog=;Integrated Security=True"}
    Thanks

    My other question is, I have created two connections in the SQLControl and call these connections within the same form using the same data adapter and dataset.  It all works fine but
    I just wanted to know of any potential issues
    1) You are not using Sepration of concerns for a solution that is doing data access, like using a DAL.
    http://en.wikipedia.org/wiki/Separation_of_concerns
    2) You are directly issuing SQL commands at the UI, leading to sql injection attacks.
    3) You are not using a UI design pattern, which leads you to tightly couple database activity to the UI.
    http://www.codeproject.com/Articles/228214/Understanding-Basics-of-UI-Design-Pattern-MVC-MVP
    @System243trd, parameters are important to prevent SQL injection attacks (people will insert SQL commands into the database if you do not perform basic checking of what you are passing to the database). If you write a stored procedure try to make
    the variables the correct SQL server data type to avoid problems later of people trying to call it directly.  Darnold924 is right, I see no code to prevent against SQL injection attacks. In addition, during development in some instances LocalSQLDB
    database system is used and during deployment you usually need to use the production SQL server database. Moreover,  Linq-to-SQL is used on Windows Phone 8.1 and it is required for phone development later and so I highly recommend learning
    it if you plan on developing windows phone applications.
    @System243trd, If you want the code for the windows phone app I think it uses the MVVM model or that might be for universal apps or regular windows phone apps. I have been using the windows phone Silverlight pivot or panorama template (it might
    be pieces of both). I've already submitted to the windows phone marketplace and it had to go through certification first. I plan on later making an article on it but I need to first fix one or two simple problems I have with it.  Here's a link to
    the source code if you later want to look at the source code (in vb.net): 
    https://jeffsblogcodesamples.codeplex.com/downloads/get/1445836
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - Sherlock Holmes. speak softly and carry a big stick - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog
    - http://www.computerprofessions.us

  • Connecting BO universes with SAP on a SQL server database

    Hello,
    The aim is to make a secured connection between a BusinessObjects universe and an SAP system that runs on a SQL server database.
    We will have in the nearby future 1 SAP system for several customers (SAP in the clouds). For those customers we want to maintain their BusinessObjects connection with the SAP system as it is for the moment. This means that the customers who are working with their current BO system (5.1.6) connect for the moment between BusinessObjects and their local SAP system  via the universe connection (Oracle driver and user). These customers should connect in the nearby future to a central SAP system and only be able to see the data of their own company (based on a client number). Iu2019m wondering if we could use the SAP-authorisation mechanism in order to do so. This would mean that we define an SAP user in SAP and that we define the same user in BusinessObjects and that there is a layer in between (cfr. The sap java connector) that allows a secure connection for a client to only its specific data (based on client number f.i.)
    Can you tell me if there exists already a solution for this for BO 5.1.6 or what is the pre-requisite in order to do so. I know that the Best Practices of SAP-Bo use already this kind of mechanism but then we talk about BO XI 3.0 and ECC 6.0 linked via a Java Connector. Does there already exists something like that for the connection between an SAP system (on a SQL server database) and a BusinessObjects 5.1.6 system.
    Thanks in advance for your answer.
    Thierry Renaer

    Hello,
    Thank you for your reply. And what about BO XI 3.0? What should we be using?
    Ik have been using the SAP Java Connector but I'm wondering if there exists more user friendly (read easily adaptable) tools in order to provide a secure connection between SAP BO XI 3.0 and SAP ECC.
    Many regards
    Thierry Renaer

  • SQL Practice

    Hello everyone. I have been using SQL for almost a year now and am currently studying for my 70-461 exam. I have the Microsoft training kit book, have read, highlighted, and done most of the exercises, however the best way for me to learn is just constant
    practice in multiple scenarios. I was wondering if there is any additional "labs" or practice questions out there that I can use (based off of either the AdventureWorks2012 or the TSQL2012 practice databases) to help further fine-tune my skills in
    SQL. I hope within another year or so to get a job specifically working with databases and eventually become a DBA so I want to know this information well. 
    Thanks in advance!

    Dont know if this works for you.. but what I try these days is to look into the transact-sql forums specifically for all the types of good and wierd questions. I try to find solutions for them and most of the time before I could find a solution someone
    would have already posted theirs. I then try to compare my code with theirs and try to find how better, easy and simple theirs is.
    I am learning quite a lot about coding . I am a hardcore dba and my coding skills arent great. I am learning a lot from the forums.
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • SAP IDES ECC5.0 (SQL 2005 Database) installation Error at  Database instan.

    At the time IDES ECC 5.0 installation (SQL 2005 database), I was copy all DVD on Hard drive and start setup then at installation of database instance, following Errors are occured. so I cant continue with the installation, if anyone have installation guide/or solve the following error please mail me at [email protected]
    from Log file SAPCLUST
    Interface access functions from dynamic library dbmssslib.dll loaded.myCluster
    (3.5.Imp): 613: error when retrieving table description for physical table AABLG.
    myCluster (3.5.Imp): 614: return code received from nametab is 32
    myCluster (3.5.Imp): 296: error when retrieving physical nametab for table AABLG.
    (CNV) ERROR: code page conversion failed
                 rc = 2
    from sappool.log
    Interface access functions from dynamic library dbmssslib.dll loaded.failed to read short nametab of table ARCH_NUM     (rc=32)conversion failed for row 0 of table  VARKEY = ⁘††††††††††††††††††††††††
    (CNV) ERROR: code page conversion failed
    So please send me solution/ or any configuration need for SQL 2005 / installation guide thanks

    This may be hard disk problem, some file not able to write on HDD.
    Regards
    Rajnish

  • Can Oracle view refer a table in Sql Server Database

    Can a view created in Oracle database refer a table created in SQL Server database. If yes, how do we do it. Code will be very help full.
    Again, if yes does it require any special software and what would be price of that software.
    Thanks for your response in advance.
    Venkat Sathiamurthy

    You would need to configure Oracle Heterogeneous Connectivity to create a database link to the SQL Server system. This can either be done via the Oracle Transparent Gateway for Microsoft SQL Server, which retails for $15,000 per server at http://store.oracle.com or by configuring Oracle Generic Connectivity and using ODBC to go after the SQL Server data. Depending on the operating system you run Oracle on, there may be a free (or cheap) ODBC driver for SQL Server that could be used.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Trigger to populate table in sql server database

    Maybe this isn't the right board to post this in, but here goes:
    We have an Oracle 9i database, with a table that get's populated with a new record every minute or so.
    We need to take some values from the newly inserted record and populate a table in a sql server database instantly. The people requesting this have not said as much, but I am thinking deletes and updates would need to be the same.
    How would it be best to do this? My first thought was a trigger on the oracle table that populates the sql server table via heterogeneous db link.
    Any other ideas?
    thanks in advance..
    update- repost in heterogeneous forum
    Edited by: user571263 on Mar 15, 2011 11:25 AM

    Maybe this isn't the right board to post this inI think you are right:
    Heterogeneous Connectivity
    Werner

  • How can I  connect to SQL server database thru local network by using JSP?

    I'm currently doing a project by using JSP..And I need to display record from the SQL Server database in our school's local network. May I know how can I do that? How can I write the code so that I can able to access the SQL Server databsase Throught school's network by using JSP? Please tell me step by step how can I do that. I'm using Tomcat 4.1 as Web Server. And I had J2SE and J2EE installed in my computer.

    first you have to establish a ODBC DSN on your computer,
    that connects to the database...you can do that from your control pannel.
    i assume that the TOMCAT server is residing on your computer....(if the webserver is in other computer then you would have to create a System DSN on the data sources ODBC option in the settings>control pannel of that machine)
    then you can use that DSN name to connect to the data base from the class file....for further assistance on how to create the class that access the tutorials in sun site.
    regards
    G

  • How can I get the data array from SQL Server Database?

    Hi,
    I can write a data array(2D)into a table of my SQL Server Database. The data array was writen to a column with image type. I know a data array is transformed a binary string when writing into database, but I dont know how to get the data array when I fetch the binary string from database.
    My question is:
    How to transform the binary string into data array? which vi's should I use? I have tried unflatten from string but failed.
    Any response is appriciated.
    Red

    happyxh0518 wrote:
    > I can write a data array(2D)into a table of my SQL Server Database.
    > The data array was writen to a column with image type. I know a data
    > array is transformed a binary string when writing into database, but I
    > dont know how to get the data array when I fetch the binary string
    > from database.
    >
    > My question is:
    > How to transform the binary string into data array? which vi's should
    > I use? I have tried unflatten from string but failed.
    In order to use Unflatten from string you first need to Flatten it
    before writing it. Also depending on the database driver, the returned
    data may actually not be binary but Hexadecimal encoded ASCII which you
    would first have to decode to binray.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to connect a PDF form to SQL server database through web service?

    Hi,
    I'm new to LiveCycle designer. I have designed a PDF form in LC designer ES2, which suppose to take a personnel number and retrieve the personnel information from a SQL server database. Currently its working fine with XML data and a search button, but I need to securly connect to a database through web service. I know how to connect to a wsdl file through designer. What I need is a wsdl file to connect the form to database. For this purpose, is there any WSDL code to use as the web service?
    I really appreciate your help and advice.

    Hi,
    I'm new to LiveCycle designer. I have designed a PDF form in LC designer ES2, which suppose to take a personnel number and retrieve the personnel information from a SQL server database. Currently its working fine with XML data and a search button, but I need to securly connect to a database through web service. I know how to connect to a wsdl file through designer. What I need is a wsdl file to connect the form to database. For this purpose, is there any WSDL code to use as the web service?
    I really appreciate your help and advice.

  • Reporting from a MS SQL Server database

    Hi,
    I'm trying to build an interface with JSP and J2SE for a MS SQL Server database, and I would like to know if there are any existing technologies that would facilitate report generation. I'm aware of Crystal Reports for JBuilder but I would prefer a free solution. Thanks in advance!

    Try JasperReports
    http://jasperreports.sourceforge.net/
    HTH

  • Sql developer won't connect with SQL server database on cluster

    Hello,
    I have a microsoft SQL server database on a windows cluster. Name for this cluster is like XXX/YYY
    When I try to connect to this database with SQL developer, I get a failure, mentioning:
    "Status : Failure -Cannot connect to Miscrosoft SQL Server on XXX/YYY"
    As far as I know, I have installed the correct jtds driver (version 1.2.5), since I can connect to sql server databases on single server hosts.
    Does anyone know how to connect to databases on windows clusters?
    Edited by: Ingmar on Jan 16, 2012 4:08 PM
    Edited by: Ingmar on Jan 16, 2012 4:22 PM

    Hi Ingmar,
    Try this is in the port box
    1433/dbname;instance=YYY
    dbname can be omitted
    -Turloch
    SQL Developer team
    1/Giving an instance name in SQLDeveloper connection to SQL Server (from August 2011)
    MS SQL Server Connection
    The correct syntax to deal with this is in the port box
    1433/dbname;instance=instance
    dbname can be omitted
    2/cluster configuration (uses instance name)
    http://stackoverflow.com/questions/1160024/jdbc-connect-string-for-sql-server-cluster
    where vvv\iii is the cluster address: jdbc address is:
    "jdbc:sqlserver://vvv;instanceName=iii"
    3/jtds url details available in
    http://jtds.sourceforge.net/faq.html

  • Configure Synchronization Connections An error has occurred while accessing the SQL Server database

    Hi,
    i am getting following error message
    Central Administration --> Synchronization Connections
    An error has occurred while accessing the SQL Server database or the SharePoint Server Search service.
    If this is the first time you have seen this message, try again later. If this problem persists, contact your administrator.
    Central Administration -->  Manage Profile Service: User Profile Service Application --> Manage User Properties
    Error
    An unexpected error has occurred.
    Troubleshoot issues with Microsoft SharePoint Foundation.
    Correlation ID: 3bce5a11-f2dc-4788
    Please tell how to fix it.
    iffi

    Event ID 5555 -> i have change the Timer jobs recycling time AM to PM
    for  User profile page not display  number of count in the page first check services , connection , 
    IISRESET /NOFORCE   /  timer services restart 
    Deepesh Yevle MCTS

  • How can I get an accurate count of computers (workstations) logged in to my SQL Server database?

    We license our software by number of workstations.
    I have a query that I have used for years to get an accurate count of the workstations logged in to my SQL Server database. For simplicity, all users use the same login name/password. This is built in to the script that attaches to the DB. They
    have access only to that DB with the exception of
    USE [Master] GRANT VIEW SERVER STATE to MyUser
    The query that has been working is below:
    Basically this relies on the mac address (Master.dbo.sysprocesses.net_addre
    SELECT COUNT(Users) AS UserCount FROM (SELECT COUNT(Master.dbo.sysprocesses.hostname) AS Users FROM Master.dbo.sysprocesses LEFT OUTER JOIN Master.dbo.sysdatabases ON Master.dbo.sysdatabases.dbid = Master.dbo.sysprocesses.dbid WHERE (Master.dbo.sysdatabases.name = 'MyDatabase') GROUP BY Master.dbo.sysprocesses.net_address) AS UserCount_1
    ss), since both Workstation names and ip addresses can be duplicated.
    Recently this has stopped working at a number of customers. Suddenly individual workstations are showing multiple net addresses for the same workstation causing a substantial overcount of users. This may be related to SQL Server 2012 - not sure.
    What I need is a very reliable way to get a count of workstations logged in to my database.
    If anyone can tell me why I am suddenly getting multiple net_addresses for each workstation and how to prevent that that would be one possible solution.
    Otherwise if anyone can give me a rock solid way to get a workstation count other than the above that would be great. Our largest customer is 50 users by the way.
    Thanks in advance for any help.
    Kim

    I think your count is getting skewed because of duplicate rows in sysprocesses because of parallelism. Add DISTINCT to your query:
    SELECT COUNT(Users) AS UserCount
    FROM
    ( SELECT COUNT(DISTINCT Master.dbo.sysprocesses.hostname) AS Users
    FROM Master.dbo.sysprocesses LEFT OUTER JOIN Master.dbo.sysdatabases
    ON Master.dbo.sysdatabases.dbid = Master.dbo.sysprocesses.dbid
    WHERE (Master.dbo.sysdatabases.name = 'MyDatabase'
    GROUP BY Master.dbo.sysprocesses.net_address) AS UserCount_1
    Satish Kartan www.sqlfood.com

Maybe you are looking for

  • HP Color LaserJet CP1518ni toolbox error

    HP Color LaserJet CP1518ni, when I try to open the toolbox, I get an error message, "HP ToolboxFX has encountered an error and can not recover.  Please restart HP Toolbox FX, or restart you PC."  I have restarted my PC and it hasn't changed the situa

  • Is Robohelp 5x compatable with Windows 7

    Is Robohelp 5x compatable with Windows 7 - what will happen if I upgrade to Windows 7

  • Photoshop CS5 Eating up my system

    I'm sorry for using such a broad term but it's the first thing that popped in my head. I really can't figure out what went wrong... One day everything was fine now everything is just completely off the charts.. Naturally this is most likely a user (m

  • As I associate a RF Profile with a series of AP´s

                       As I associate a RF Profile with a series of AP´s

  • PDF files that turn into 08 files

    Hi Guys, I am a l2 remote desktop support analyst and had a user who was saving pdf files using adobe reader 6. When the user saved the files and went back into them he noticed that they were saving as a 08 file and could no longer open them in Adobe