Does SQL Server exist

  • I have two questions:

    1) How can I find out does SQL Server with certain name exist

    2)How can I find out does a database with a certain name exist on this SQL Server

    thanks beforehand

     

  • Before you do ANYTHING you need to have a login with Access to those servers!!!

    1. Use: This Trick

    2. Query the master..sysdatabases table


    * Noel

  • It is not an answer. When you create new SQL Server registration in Enterprise Manager, it shows all SQL Servers, visible in LAN, without any login.

  • If you were refering to the Annonced servers you can run :

    isql -L

    Beware ! Announcing can be turn OFF!


    * Noel

  • F.Y.I. muk07 - when asking others for help, it's not a good idea to spout back at them "It is not an answer". Not if you expect to get any replies to future questions. No one's getting paid for this.

    1. noeld answered your 1st question. You didn't ask for solution w/o login. You didn't ask for "all SQL Servers in LAN like EM". In your original post, you asked for "a certain name" which is 1 server. noeld answered corectly.

    If you want list of SQL Servers like EM, then ask for it.

    Answer (if you have client tools installed):

    osql -L  (-L must be caps) from command line. No user id/password required.

    2. existence of database on server. Going to require a login because you actually want info from server instead of just checking for existence of server. noeld's response stands.

  • Thanks to davidf for a time he spared to learn me how to behave myself

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply