hey folks,
I'm wondering if there is a function that i can give a db_name to and it will check the sql server to see if it exists without actually connecting to the db. If the name does not exist, i don't want to get an error in the log. any ideas?

thanks,
greg

hey folks,
I'm wondering if there is a function that i can give a db_name to and it will check the sql server to see if it exists without actually connecting to the db. If the name does not exist, i don't want to get an error in the log. any ideas?

thanks,
greg

I am kind of confused if you meant without logging into the database server, or checking for the existence of a certain database within that db server.

you cannot check/search anything contained within the database without first connecting to it

otherwise if you meant the second one, then the only thing I can think of off the top of my head is the command:

show databases
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.