Not logged in
Login
Help
 
Help Tools  

Frequently Asked Questions 

Why am I getting "Invalid object name" error for every query?
You are probably in the wrong Context, please select the proper context for your query from the Context drop-down menu on the top left of the Query page. You should read the Help page section on 'Context and Queues' for further information.

How can I estimate the size of the output from a query?
You can do this in two steps. First, get the total number of rows the query would return by reducing the SELECT clause in your query to "SELECT COUNT(*)" (leaving everything else the same) and running the query, e.g., if your original query is "SELECT objID, ra, dec FROM PhotoTag WHERE ra BETWEEN 180.0 and 180.1", then replace this with "SELECT COUNT(*) FROM PhotoTag WHERE ra BETWEEN 180.0 and 180.1" and run the query. You may need to run it in the long queue (using Submit button) because even counting the rows can take more than a minute for certain intensive queries. The second step is to estimate the size of a thousand rows from the same query. You can do this by tacking a "TOP 1000" to the front of your SELECT clause and omitting the WHERE clause, e.g. in the above query, you would modify it to just "SELECT TOP 1000 objID, ra, dec FROM PhotoTag". Now run this version of the query using the Submit button, so the output will go to a MyDB table. Once the query is finished, check size of the MyDB table on the MyDB page. The sizes are indicated in KB. Using the size for 1000 rows, calculate the size of the full output using the appropriate multiplier, e.g., if the first query returned 1851326 (i.e. 1,851,326 rows), and the size of the MyDB table from the second query was 48 KB, then the total output size would roughly be 1851 x 48 = 88848 KB, or 89 MB. If the estimated size turns out to be larger than the space available in your MyDB, you can either delete some tables if you don't need them, or ask for more space by contacting the help desk. If the estimated size is much more than your MyDB space remaining, e.g., if it is more than a few GB, then the best option probably will be to ask the help desk to run the query on your behalf and let you download the results from an FTP site. There will also be a MyScratch scratch DB option available soon so you can run such queries yourself and send the output to a temporary scratch space.

Why am I getting the error "Execution terminated by the provider because a resource limit was reached." when I submit a query?
You are probably running your query in the MyDB context, which is only meant for running queries that are relatively lightweight and are requesting data predominantly from your MyDB tables. If that is not the case, you should always choose the context where most of your data is coming from and run your query in that context. If you still get this error in a non-MyDB context, please contact the help desk.

Any keyboard shortcuts?
Yup. The page for query submission has a few keyboard shortcuts for things like submitting a query, checking syntax, showing results, etc. Shortcuts are described in the tooltip for the button that performs the equivalent action. Additionally, you can press the Tab key to automatically indent selected text.

How do I submit part of a query?
From the 'Query' page, select the part of your query that you want to execute, then click on the appropriate action, like 'Quick' or 'Syntax'. Your selection will be treated as the entire query. This also works with keyboard shortcuts.

What does 'General Network Error' mean?
This error message is usually a result of particularly high server load. It is not a direct result of your query. A resubmit will usually fix this.

What does 'Column names in each table must be unique.' mean?
SQL requires that all columns within a table contain a unique name. This error usually occurs when a user inadvertantly tries to create a table with duplicate column names. For example, views 'Photoobj' and 'Galaxy' both contain an 'objid' column, so if one tried a select * from both of these into a single table this error would occur. The fix is to explicity name the conflicting column as something else, so instead of doing 'select ra from photoobj' you could do 'select ra as ra2 from photoobj'.

What does 'Query results exceed memory limitations' mean?
This means the result of the query which you've submitted is greater than the memory buffer will allow. This message only applies to 'quick' queries; queries using 'submit' do not have any memory restrictions. The easiest thing to do is just use submit instead of quick.

How may I check how many jobs are waiting in a given queue?
Go to the Queues page by clicking on the link here or in the menu-bar.

(How) can I bump up my MYDB size limit?
You may request additional space - you do not automatically get more space. Please email the Help Desk (Contact link at the bottom of the page) after you log in.

What happens if my query does not complete ?
We strictly limit the length of queries for up to eight hours. If your query fails to complete in this amount of time you should ask for it to be analyzed and we will attempt to make your query more efficient.

Who do I notify if my job doesn't run for a long time (the queue appears to be stuck)?
Occasionally the service running the jobs hangs (although we hope to have fixed it in this version). If you see many waiting jobs and none executing, please email the SDSS Help Desk using the Contact link at the bottom of this page.

Why can't I drop or create tables outside the MyDB context?
This is due to CasJobs' distributed operation and because SQL Server does not allow tables to be dropped or created remotely (from a different server via a linked server connection). For more information, please see the CasJobs Limitations due to Distributed Execution section in the Help page.

How can I add a count or enumerator column to my table?
If you need to add an enumerator (an int id) column to your table (e.g., for use in the neighbors search type queries), you can do it as described in the Enumerator Column example in the Advanced CasJobs Queries page.

Why can't I run user-defined functions from outside the context of the DB in which they are defined?
This is due to CasJobs' distributed operation and because SQL Server does not allow user-defined functions to be executed remotely (from a different server via a linked server connection). For more information, please see the CasJobs Limitations due to Distributed Execution section in the Help page.

Why isn't my CasJobs Command-Line (CL) tool working?
Two common problems with the CL tool are the Java version compatibility and network problems due to either an incorrect config.casjobs file or your local proxy or firewall setting. The CL tool is currently only compatible with Java SDK v1.5 or higher (v1.6 recommended). If you are using a compatible version of Java, and it is still not working (e.g. giving you the error "Error retrieving host info."), then you need to contact the Help Desk (see Contact link below) with the contents of your config file and information about your proxy and firewall settings.

Where can I find the schema information for various tables, functions and procedures similar to the SkyServer Schema Browser?
To get the schema for different tables in a given context a la the SkyServer Schema Browser, go to the MyDB page and from the dropdown menu at the top left of the page, select the context that you want the schema information for (default is your MyDB context). Then you will see the tables for that context listed on the left instead of your MyDB tables. Click on one of the tables to see its schema information. To view schema for views, functions and procedures, click on the appropriate link below the context menu. To go back to your MyDB schema page, select MyDB again from the context menu.

How can I cross-identify (find matching objects in SDSS) for my list of sources for which I have RA,decs?
If your list of RA,decs is of small to moderate size (up to a few hundred objects), you might be better off using the SkyServer CrossID page to correlate your positions to SDSS objects. For longer lists, you will need to use the neighbors search options in CasJobs. The first step is to import your list of positions using the CasJobs Import page. If you don't already have a column in your imported table to identify each object, you may want to add an enumerator column as instructed above. After you've done that, the easiest option is to go to your MyDB page and click on the table you just imported. If there are columns named "ra" and "dec" in a table, a "Neighbors" button appears in the menu at the top of the page. You can click on this button and select the options you desire to do a neighbors search within the specified radius for each object in your list. If this is not good enough for your purposes (e.g., if you want to specify a different search radius for each object in your list), then you will have to roll your own neighbors search as described in the Advanced Queries help page under Nearest Neighbor Search.