Monday, March 19, 2012

how to create a sql database in the server?

Hi,

I want to create a new database in the server using SQL express,not in the local machine. so what can I do?

Thank you

hi,

databases are always created on the server machine and not in the eventual "remote clients"..

just perform a CREATE DATABASE dbName; statement

regards

|||thank you.
but I want to know where the location is after performing this statement: CREATE DATABASE dbName. in the server? Do I need to connect to the server using express first?
|||

hi,

dophine wrote:

thank you.
but I want to know where the location is after performing this statement: CREATE DATABASE dbName. in the server?

yes... traditionally in the

C:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\Data

folder...

Do I need to connect to the server using express first?

yes as no statement can be executed if not against a SQL Server instance...

regards

|||

HI,

as stated you may find it in Drive:\Program Files\Microsoft SQL Server\MSSQL\Data

and after login in SQL Server you may run sp_helpdb yourdbname , which will gives you detail of the data/log files .

Hemantgiri S. Goswami

|||

Hi all,

When I try to connect to the server using sql express, I cannot find the name of the server instance. So does it mean the sql express should be installed in the server?

Thank you

|||

Hi,

by dfault SQL Express creats named instance so your SQL Server's name would be yourpcname\sqlexpress. And to connect to SQL Server it must be installed in your system or another system on network to get connected.

Hemantgiri S. Goswami

|||

Hi

when I open the SQL express and browser the network servers, there are some server instances. That means the SQL can connect to the remote machine, right? However, I cannot find the server instance I want. And I try to connect to the server by typing the command in the command promt. The following message shown.

HResult 0x3, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [3].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred w
shing a connection to the server. When connecting to SQL Server 2005
re may be caused by the fact that under the default settings SQL Ser
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

Thank you.

|||

HI,

Yes it can connect to remote machine but ensure that Remote Connections are enabled for Named Piped and TCP/IP under Surface Area Configuration ,

refer below KBs for more

http://support.microsoft.com/kb/905618 & http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx

HTH

Hemantgiri S. Goswami

|||

Hi,

I would like to know whether one of the causes of such error is that sql express is not installed in the network server side.

Thank you.

|||

hi,

this exception is always raised when a connection can not be established with the "target server", be it local or remote..

causes could be a mispelling of the instance name or incomplete name in case of named instance (ServerName\InstanceName), as long as additional network problems, or even the network protocols not being enabled for the remote instance...

obviously the computer you are connecting to has to have a SQL Server/SQLExpress instance installed...

regards

No comments:

Post a Comment