Help Desk

Help Desk unix windows sql oracle forum

More About Me...

This site is created by Ajit kumar and Naveen kumar, working with MNC from past 6 years supporting fortune 500 companies. This site is a free service and provide solutions to most of the subject like UNIX, WINDOWS, JAVA, C++, C, PERL, SAP, ORACLE, SQL.

Another Tit-Bit...

Life is a vehicle which is driven with the help of the wheels called "HARDWORK", but the journey is impossible without the fuel called "CONFIDENCE".

  • Books
One Word spoken with love can soothe the sorrowful hearts of many.

A loveful command does not arouse hostility.It makes the person great.

Naveen

Don't be puzzled by problems,Whatever they may be .Always face them as if they are Technical Help Desk .

SQL DBA

Sql Database realted question and answer.

5 comments:

  1. Unknown said...
     

    All Friends

    Can some one help me how to create a database in SQL 2005 and also how to see how many database are created and i am using which database.

    Thanks in Advance
    Guru

  2. Naveen Kumar said...
     

    I am dividing your question in multiple questions and answer them one by one.

    Q1) How to create database(D in SQL 2005.
    A) You can create DB in two ways
    i. Management studio -> In object Explorer, expand your server name-> Databases -> Right click and select New Database
    ii. Query Analyser -> CREATE DATABASE MYDATABASENAME

    Q2) How many DB's
    A) Visually from Management Studio and from Query analyser -> select * from sys.databases

    Q3) Db in use
    A)select DB_NAME()

    Answered By Mr Ajit Kumar from Value Labs

  3. Anonymous said...
     

    I want to import all database names into my SQL Server using a query

    Can some one help me with the query?

    Thank
    sanjay patil

  4. Miracle Kid said...
     

    Hi,
    My understanding of the question: You want to get the list of databases on another server B and insert into a table on your server A

    Soln: 1. Link both the servers, i.e Link Server B from Server A, using GUI or Sp_Addlinkserver
    If your Link name is [remSrvr]
    Now use fully qualified name to query

    select * from remSrvr.master.sys.databases

    now if you insert the data into any table, then

    select * into myDBlist from remSrvr.master.sys.databases

  5. Anonymous said...
     

    Useful information in sql 2005 -

    One of new features in SQL 2005 that I haven't seen much talk about is that you can now add aggregate functions to any SELECT (even without a GROUP BY clause) by specifying an OVER() partition for each function. Unfortunately, it isn't especially powerful, and you can't do running totals with it, but it does help you make your code a little shorter and in many cases it might be just what you need.

    Regards
    SQL Experts

Post a Comment



 

Traffic

Quote of the day