New to sql

hi
i started learning sql some time ago and have got some expertise over it but when i try to run accept command it does not work on my 8i personal and when i install 8i enterprise on my win 2k NT it ask for net8 host name please help me over it and when i cancel it and run sql it says TNS PROTOCOL ERROR
please help me

Why is it that when I added the following, it says
not a grp by expression.
SELECT i.instructor_id, COUNT(s.course_no),
i.first_name ||','|| i.last_name name, s.SECTION_ID
FROM instructor i, section s
WHERE i.instructor_id = s.instructor_id
GROUP BY i.instructor_id;You can put only grouping columns or aggregates in select clause. Imagine something like this (for simplicity - table after join):
INSTRUCTOR_ID    COURSE_NO   SECTION_ID
aaa                        1                      1
aaa                        2                      3 SELECT instructor_id, COUNT(course_no), section_ID
  FROM table_name
  GROUP BY instructor_id;
results:
AAA        2          ????Which section_id should be returned?

Similar Messages

  • I'm new to SQL Server Integration Services and I need help on how to begin learning SSIS. Is there any training for it besides msdn?

    I'm new to SQL Server Integration Services and I need help on how to begin learning SSIS. Is there any training for it besides msdn?

    Check this thread where people have already given their suggestion on learning SSIS
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f2cc1cf3-204d-454a-a189-47df87a3aa23/i-want-to-learn-ssis?forum=sqlintegrationservices
    I would suggest to go for You tube videos (type learn SSIS or begin SSIS step by step) you will get lot of good tutorials to start with.
    Happy Learning!!
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

  • Can't select the new Azure sql service tiers when creating a new database or upgrading an existing one

    Hi all,
    I have set up the preview for the new Azure SQL tiers on both of the subscriptions we have for Azure. The one under my MSDN subscription to and a pay as you go subscription
    The pay as you go subscription works fine but when I try to upgrade an existing Azure sql database or create a new one on my MSDN subscription it doesn't give me the option of the new tiers.
    Using the new portal it says I need to sign up to the preview, but I already have and when I go to try to add a new subscription to the preview for Azure SQL it says all my active subscriptions are on the preview.
    Any idea what the issue could be?
    Cheers
    Ash

    Hi,
    Apologies for the inconvenience.
    I suggest you open a Billing Support Ticket. They will be able to check this for you.
    http://azure.microsoft.com/en-us/support/options/
    Regards,
    Mekh.

  • PreparedStatement.setDate(new java.sql.Date(long))

    Anyone knows how to set insert a Date with Time, Day, Year into a database? I have tried using the preparedStatement.setDate(new java.sql.Date(long)) but it only inserts yyyy mm dd but I want to include time too.
    Anyone knows how here? Please advice.

    how to create an instance of Timestamp?
    new java.sql.Timestamp(????)
    What to put in the parameter?I think that I might have answered that in another one of your posts, if not could you elaborate your problem
    http://forum.java.sun.com/thread.jsp?forum=31&thread=165123

  • SQL Server 2014 New T-SQL Features

    I have seen the following new T-SQL features:
    1. In-memory OLTP tables.
    2. Inline specification of CLUSTERED and NONCLUSTERED indexes is now allowed for disk-based tables.
    3. The SELECT … INTO statement is improved and can now operate in parallel.
    Any others?  Thanks.
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

    http://windowsitpro.com/sql-server-2014/top-ten-new-features-sql-server-2014
    http://www.sqlpass.org/sqlserver2014/Webinars.aspx
    Enhanced query processing for better performance without app changes.
    Buffer Pool extension to SSDs for faster paging.
    Resource Governor controls IO along with CPU and memory.
    Enhanced Always On now supports 8 secondary for better HA (High Availability

  • What's New in SQL Server 2012 SP2

    Hi All,
    I can't find the page for "What's New in SQL Server 2012 SP2". Does anyone knows what features improved. Need to present to the Business for applying SP2.
    Thanks in advance.

    SQL Server 2012 Service Pack 2 is available - but there's a catch!
    http://sqlblog.com/blogs/aaron_bertrand/archive/2014/06/10/sql-server-2012-service-pack-2-is-available.aspx
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • New gsl.sql.driv.Driver();    //????

    I bought the book:"Java Swing" and I have problems with an Example, in this case the mistake is with the follow line:
    new gsl.sql.driv.Driver();
    Do you know why I have problems with this line?
    The mistake message is:
    C:\My Documents\Java\Swing>javac QueryTableMod
    QueryTableModel.java:17: cannot resolve symbol
    symbol : class Driver
    location: package driv
    new gsl.sql.driv.Driver();
    ^
    1 error

    Check if you have package gsl.sql.driv in your jdk (it is non standart package). If no, you have to put jar file of this package in
    disc:\path to your jdk\jre\lib\ext
    hope it will help you.

  • New java.sql.Time(3600000) = 02:00:00

    hi,
    i'm a little confused with time in java. everyone know that 3600000 millisecond = 01:00:00 (1h) so what is going on with this: new java.sql.Time(3600000) = 02:00:00 ?
    does anyone can help?

    Everyone also knows that the standard "stringification" of such an object provides you with the date/time in your timezone while the value relates to GMT. 01:00 GMT is 02:00 CET.

  • How do I create database from bacpac on new Azure SQL DB Preview (v12)

    Hi, I want to restore a database from a bacpac on the new preview tier, but there is no option in the portal(s) to do it.
    If I try "import data-tier-application" in SSMS I get error: 
    The service objective 'Business' specified is invalid. (Microsoft SQL Server, Error: 40804)
    The only options for edition in ssms is web and business

    The feature is still in preview so I checked if the feature 'Import' is expected to work or not. It's enabled only for few data centers as of today. In the coming days, you should be able to Import as mentioned. If you want this to be confirmed, I suggest
    you contact azure support via "click your account" and "select Contact Microsoft support" on right-top portal page.
    -Karthik (KKB)

  • New To SQL Developer Data Modeler - Data Dictionary Report

    I am new to Data Modeler and I am currently learning what I can do and can't with it. Is there a way to generate a "Data Dictionary" report? We would like a report we can distribute that describes all tables and columns with descriptions and comments. We used to use an old version of Power Designer and we could do this from the data model we created. Is it possible to do something like this from SQL Developer Datas Modeler?

    Hi,
    Saxon is just an option, you don't need it by default.
    Could be permissions problem. What are you working on i.e. OS? What java version do you use?
    Even though you have specified directory for the reports do you have permissions to write there?
    Report generation directories priority is:
    1. Custom directory if specified in Settings->Data Modeler->Default Reports Directory
    2. /datamodeler/reports/
    3. User home directory
    You must have permissions somewhere on these directories. On the other hand you are saying that report_data.xml is generated so you have permissions.
    Okay. Now I saw a bug in 710. When you click "Generate report" there are progress dialogs and result dialog, but if you meanwhile click somewhere or change focus, these dialogs are hiding below main "Reports" dialog i.e. you are not seeing them. If you use Alt+Tab the result dialog will popup. This bug is fixed in the next release.
    So you must see either result dialog or error dialog at the end of report generation. If not check with Alt+Tab if it is not hidden somewhere below and if there is no such dialog close the DataModeler and check the log file for some error.
    There is SQL Developer Data Modeler 3.3 Early Adopter Available.
    http://www.oracle.com/technetwork/developer-tools/datamodeler/downloads/datamodeler-33-ea-1869055.html
    Above issue is fixed there and report is opening automatically.
    Edited by: Dimitar Slavov on Nov 29, 2012 11:53 PM

  • SQL Developer// new install // SQL Worksheet will not open

    New install of SQL Developer 1.1.2.25 on WinXP. Oracle 9.2 database on same machine. Database connection to 10.2 database instance on other machine was successful. When I attempt to open SQL Worksheet on the client machine, I get the following errors:
    java.lang.IllegalAccessError: tried to access class oracle.ide.net.IdeURLStreamHandler from class oracle.ide.net.URLFileSystem$1
         at oracle.ide.net.URLFileSystem$1.createURLStreamHandler(URLFileSystem.java:87)
         at oracle.ide.boot.URLStreamHandlerFactoryQueue.createURLStreamHandler(URLStreamHandlerFactoryQueue.java:119)
         at java.net.URL.getURLStreamHandler(URL.java:1104)
         at java.net.URL.<init>(URL.java:393)
         at java.net.URL.<init>(URL.java:283)
         at oracle.ide.net.URLFactory.newURL(URLFactory.java:636)
         at oracle.ide.net.URLFactory.newURL(URLFactory.java:136)
         at oracle.dbtools.sqlworksheet.sqlview.SqlEditorNode.<init>(SqlEditorNode.java:65)
         at oracle.dbtools.sqlworksheet.sqlview.SqlEditor.openNewEditor(SqlEditor.java:1914)
         at oracle.dbtools.sqlworksheet.sqlview.SqlEditor.openNewEditor(SqlEditor.java:1973)
         at oracle.dbtools.sqlworksheet.sqlview.SqlEditor.openNewEditor(SqlEditor.java:1991)
         at oracle.dbtools.sqlworksheet.sqlview.SqlEditorWizard.invoke(SqlEditorWizard.java:109)
         at oracle.ide.wizard.WizardManager.invokeWizard(WizardManager.java:310)
         at oracle.dbtools.sqlworksheet.sqlview.SqlEditorController.toolbarAction(SqlEditorController.java:1008)
         at oracle.dbtools.sqlworksheet.sqlview.SqlEditorController.handleEvent(SqlEditorController.java:561)
         at oracle.ide.controller.IdeAction.performAction(IdeAction.java:551)
         at oracle.ide.controller.IdeAction$2.run(IdeAction.java:804)
         at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:823)
         at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:521)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    How do I fix this?
    Thanks!
    TL

    Solution: The Redneck Tuneup for Windows
    1) With the transmission in neutral, hold the gas pedal all the way down to the floor for 1 minute.
    2) Restart the computer.

  • Migrate from Existing SQL 2008 R2 Failover Cluster (Rackspace) to new offsite SQL 2008 R2 Cluster (our own cloud)

    I have an existing cluster sitting in Rackspace. We have a new co-location with its own SAN that we want to migrate everything over to. Now, if we were keeping the SAN active in Rackspace, this wouldn't be an issue and I'd just add two new nodes to the cluster
    and take down the two old nodes, but I need the data shipped to the new SAN so everything in Rackspace can be turned off. VPN is configured between sites (500mbps pipe), so bandwidth isn't a problem.
    Should I be adding new shared storage to the existing cluster, replicate to that, turn off the old shared storage, then add new nodes and eventually disable old nodes? I'm trying to do this with the least downtime.
    The picture can best be described as this (very simplified)
    RACKSPACE CLUSTER - on its own SAN
    Node 1: SQLSERVER1-RACK
    Node 2: SQLSERVER2-RACK
    SQL Server Name: SQLSERVER
    NEW CLUSTER - on its own SAN
    Node 1: SQLSERVER1-NEW
    Node 2: SQLSERVER2-NEW

    while this might be doable using SQL Server replication, log shipping is best on a continual basis, or use a backup restore for a one time copy.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

  • Concerns over switching between new Azure SQL Database Service Tiers

    Windows Azure's new SQL Database
    service tier pricing model will be put into effect in less than 12 months. We currently have SQL Databases on the Business and Web Edition pricing models.
    We recently asked Azure Support a number of questions around the scalability and ability to switch between these tiers. The responses so far have been far from encouraging:
    Q: If we exceed the criteria for a given tier (see http://msdn.microsoft.com/library/azure/dn741336.aspx), how will Azure respond? For example, if we are on the S1 service tier, and we exceed the maximum number of sessions (200), will any new sessions be
    blocked until we manually increase the service tier? Or will you automatically move (and bill) us to/for the next tier level?
    A: If you exceed the criteria of the existing tier, you shall be notified of performance issue like throttling. Users may experience slowness and blocking. There will not be any automatic upgrade.
    Q: So to confirm, if we suddenly experience increased, unanticipated client activity overnight due to our web site becoming more popular, you will be blocking any user sessions over and above our performance level limit, until we manually make the transition
    to the next level? Is there no “overdraft” facility/scalability in this respect? If this scenario took place within a short space of time, how would we have time to react? Simply blocking new sessions and preventing customers from using our site is not acceptable.
    A: I’m sure you understand that SQL Azure database is a shared resource and hence we cap the resources for individual subscription so that a fair service is provided to all the concurrent users. If you feel that you cannot compromise on the user experience
    then you shall think of an edition that best suits you. Please refer to the following document to best understand the throttling and its impact. http://social.technet.microsoft.com/wiki/contents/articles/1541.windows-azure-sql-database-connection-management.aspx#Throttling_Limits
    Q: Since the changing of the performance level could take several minutes/hours depending on the size of the database, would we experience any downtime/degradation of performance of the database during this period?
    A: You might
    Q: If downtime/degradation of performance are a possibility whilst we switch service tiers, what do Microsoft recommend we do to safeguard against this? Should we create a second database on a higher tier level and then export the data from the lower tier and
    import to the higher, before switching over? How do Microsoft recommend we switch tiers in a production environment with minimal disruption?
    A: If you want to upgrade the tiers due to degradation of performance, you will have to create another database on a higher tier and import the data.
    One of our key reasons for moving to Azure hosting was the seamless scalability it appeared to offered. As you can imagine, the responses above are a major concern for our production environment. Does anyone else have any thoughts or concerns in this respect?

    James,
    I reviewed the support incident you referred to and believe that the questions you asked may have been answered later in the interaction you had with the engineer.  For the benefit of others viewing this forum I want to reiterate the answers
    to your key questions here as well.
    Q. What is the behavior when you reach the limits for the service tier?
    A. Each service tier currently has limits on 4 different dimensions (CPU, physical reads, log writes and memory) of resource consumption.  When you reach one of the limits, the behavior depends on which resource limit you are hitting, but
    generally speaking is consistent with the behavior you would see with a similar hardware limit in the SQL Server box product.  For example, when you reach the CPU limit your queries will start showing more SOS_SCHEDULER_YIELD waits,
    the memory limit will cause a higher percentage of pages to be read from disk instead of the buffer cache (PAGEIOLATCH_xx waits), etc.  This set of limits does not directly abort any of your queries--they just run longer as they
    vie for the fixed set of resources made available to your database.  In a system where the load greatly exceeds the resources, queries may start to time out.
    The new service tiers continue with the Web/Business edition behavior of limiting the number of sessions and concurrent requests (worker threads) you can have.  When you exceed these limits you'll get error 10928.  Note that
    each tier in Basic/Standard/Premium have different values for these limits (http://msdn.microsoft.com/en-us/library/azure/dn369873.aspx) than Web/Business and thus may encounter the errors at different usage levels.  The key is choosing the appropriate
    service level for the application, and to facilitate that the sys.resource_stats view shows historical usage information so you know where you stand as far as reaching any of the limits.  This resource consumption data is also available in the portal.
    Q. Is it possible to switch service tiers, and is there any disruption when you do so?
    A. Yes, you can change between service tiers as described in this MSDN documentation (http://msdn.microsoft.com/en-us/library/azure/dn369872.aspx).  This can be done through the portal, powershell, or REST APIs.  [The preview currently has a restriction
    where legacy servers don't support switching to Basic/Standard which is expected to be removed in the near future.]  The link above outlines the limits on the number of tier changes you can do in a 24 hour period, expected time to perform the change, and
    the client disconnect that occurs.
    If you have further questions, feel free to re-engage on the support incident or reply to this forum thread.

  • New to SQL anywhere - db rebuilding question

    Hi there,
    I have inherited a small project involving a SQL Anywhere database that I have a question about. I have a database file that was created years ago and is hosted on a network server that a small number of client applications access. Over the years, the version of the db engine has been upgraded (currently running on SQL Anywhere 16), but the database file itself has not. I am currently archiving and cleaning out a bunch of data, and I wanted to run a rebuild on the database. During my crash course of SQL Anywhere, I read that the only way to rebuild the db is to unload and then reload it, which I did using Sybase Central. However, it appears that this also upgrades the db version, which makes a few of the client applications unhappy when they try to connect (these apps are not currently under my control). In corresponding with the person who previously maintained this db, it seems that the db file was originally created on version 12 of SQL anywhere, though I don't have an exact version number. Is it possible to reload the database into an 'old version' (for lack of a better term) using the existing engine, or do I need to try and find a copy of 12 to do this with?

    Hi Jose,
    I have been, and I've been able to manage some of the data this way. I was hoping to try and rebuild the file itself though so that the size would shrink. It would hopefully make our weekly backups take a bit less time. What I tried to do was follow the Unload Database wizard and had it unload/reload into a newly created database. The new database has all the right data and the file size itself is smaller, but I see that it added new features (I'm not sure if that's the right terminology. In the newly-created db for example, I see things like 'Sequence Generators', and 'Spacial Reference Systems' in the Sybase Central browsing tree, which are not present in the old version of the db).
    I guess what I'm asking basically is, can the v16 SQLA db engine create or reload into a new database that has the old legacy version 12 features? And if that's not the case, would any minor version of the v12 engine work (I only know the file was originally created with v12, not the minor version). For whatever reason, the client applications are expecting a v12 database. I could go without rebuilding to shrink the db if necessary, I was just hoping to do so and save some time/storage space for our backups since I archived and purged a few GB of data out of the file.

  • Mirgation P6 v7 to new SBS2011 (SQL Server 2008 R2 Express)

    Hi guys,
    We are in a process of upgrading client's server with P6 v7 from windows 2003 (SQL 2005 Express) to SBS2011 (SQL Server 2008 R2 Express).
    Is there any specific document/migration procedure for P6 v7 when doing server upgrade?
    I've already set up virtuall SBS2011 server for testing and would appriciate any advices on how to proceed.
    Should I just install the software and then move (export/import) the database over? if yes, then how :) ? What about clients?
    Any feedback is helpfull
    Thank you so much!
    Vik

    There is an article in the knowledge-base 905825.1 that explains how to do this.
    But in short, restore the database onto the new server and run the following commands against the restored database to re-sync the user-names. You then just need to edit the database connection information on the clients to reflect the databases new location.
    EXEC sp_change_users_login 'Update_One', 'pubuser', 'pubuser'
    EXEC sp_change_users_login 'Update_One', 'privuser', 'privuser'

  • Very new to sql plus

    I am using sql plus by the command line, I am using the ed mode. My problem is, I have two inserts one right after another. in note pad:
    insert into table values
    insert into table values
    ('d')
    The problem is only one insert gets done.
    What is the correct way to write this ?
    Eric

    If it is the same table, you could do something like:
    SQL> create table mytable(col1 varchar2(10));
    Table created.
    SQL> insert into mytable(col1) values(&value);
    Enter value for value: ' '
    old   1: insert into mytable(col1) values(&value)
    new   1: insert into mytable(col1) values(' ')
    1 row created.
    SQL> r
      1* insert into mytable(col1) values(&value)
    Enter value for value: 'd'
    old   1: insert into mytable(col1) values(&value)
    new   1: insert into mytable(col1) values('d')
    1 row created.
    SQL> select * from mytable;
    COL1
    d
    SQL> set feedback on
    SQL> /
    COL1
    d
    2 rows selected.

Maybe you are looking for