How to find out the name of the sql server. F.A.Q. on installing the program and necessary components

Changing the name of the computer with an installed instance of MS SQL Server- not a good idea, because after renaming, some problems may arise in the operation of SQL. To avoid these problems, you must update your system metadata to reflect the computer name change.

This can be done using a simple SQL query. This is what the query looks like for a default instance of SQL Server:

sp_dropserver ″old_name″;
GO
sp_addserver ″new_name″, local;
GO

And so for the named one:

sp_dropserver ″old_name\InstanceName″;
GO
sp_addserver ″new_name\InstanceName″, local;
GO

For example, let's take a computer with an installed instance of MS SQL Server. To see the current server name, open SQL Management Studio and run the query:

select @@Servername

As you can see, the server name obtained from the query (2012R2Std_Temp) does not match the computer name (SQL_Test).

Since the example uses a default instance of SQL Server, to change the name we will run the following query:

sp_dropserver ″2012R2Std_Temp″;
GO
sp_addserver ″SQL_Test″, local;
GO

After renaming, you must restart SQL Server. This can be done from command line, with the command:

net stop mssqlserver && net start mssqlserver

Does A-Number CRM work under operating systems? Windows XP, Windows Vista, Windows 7, Windows 8 , Windows 10 ?

To avoid errors, the program must be run as a user who has permission to write to the disk and the registry.

Is it possible to use MS SQL Server 2005, 2008, 2012 instead of MS SQL Server 2000.

Yes! Since version 1.74

Attention!! After installing MS SQL server, make sure that the service has started and that the connection to the server is configured correctly. (For MS SQL from 2005 to 2012 this is done through - SQL Server Configuration Manager.)

If there is a suspicion that the client computer cannot connect to the SQL server, how can this be checked?

On the command line of the client computer, run the command:

Only those who have MS SQL 2000 (MSDE) installed!!! After /U enter the user name, in this case sa, after /P enter the password, after /S enter the name of the MS SQL server, for a local connection you can leave it blank. This is what the command looks like:

OSQL /U sa /P sdfl380dsklj /S mycomp

You will see a prompt: 1 >

Execute select command:

1> select * from sysfiles

If you see the query result, then the connection to the SQL server exists.

End command session:

In the event that you do not have a file on your computer osql.exe This is an executable file. Unpack it and put it in the windows\system32 folder, after which you can execute commands from the command line.

To work with MS SQL 2008, use the utility: sqlcmd, to call help on commands, use: sqlcmd /?

or On the command line of the client computer, run the command:

telnet [sql server name or ip] 1433

It will look like this:

telnet 192.168.200.100 1433

(The telnet service must be running)

Determining the problem, connecting to SQL Server!!

Unpack the archive "Data Link.zip"

We extract three files - newudl.reg, nonewudl.reg, Data Link.UDL.

We execute two registry files - newudl.reg, nonewudl.reg, after that we launch the file - Data Link.UDL

In the “Data connection properties” form, in the tab - Data provider - go to the line Microsoft OLE DB Provider for SQL Server, click the button - Next.

On the Connection tab, configure the connection and look at what step the error occurs.

The service "MSSQLSERVER" is not running

Enter "Control Panel" - "Administration" - “Services", start the service "MSSQLSERVER"

Pay attention to the service startup type. Required type: Auto.

Why is it not installed? MSDE??

Microsoft File and Printer Sharing Service is not installed.

Enter "Control Panel" - "Network and remote network access"- “Connect via local network”.

In the Local Area Connection Properties window, click the " Install".

Then you should select the item Service and add "Microsoft Networks File and Printer Sharing Service". Then you should restart your computer and repeat the installation MSDE.

The "Server" service is not running

Enter "Control Panel" - "Administration" - “Services", start the service "Server"


How to enable the installation log MSDE??

To enable the installation log, run the installation from the command line with the following key:

setup.exe /L*v C:\

The log will be created in the root of the C:\ drive

Why during installation MSDE gives an error:

A strong SA password is required for security reasons. Please use SAPWD switch to…….

?

No password assigned for user "sa" !!

This parameter is set in the setup.ini file options, the line format should be like this:

SAPWD="AStrongPassword"

Instead of the word in quotation marks, enter the password in the Latin layout.

The installation aborts itself without issuing errors. In Program Files are created required folders. And at the end of the installation they are deleted themselves.

You need to completely remove from the machine all references to MS SQL that remain from previous installation attempts, reboot the computer and repeat the installation!!

First check if there is MSDE on the list installed programs, and if in a standard way it will not be possible to uninstall, then feel free to completely delete the directory C:\Program Files\Microsoft SQL Server, and restart your computer.

Attention!!

If you previously had it installed on your computer software, which worked under the control MS SQL, then in the directory: C:\Program Files\Microsoft SQL Server\MSSQL\Data Perhaps there are database files left that may be useful to you later, find out this issue before deleting!!

Instead of Russian text - questions

"Start" - "Control Panel" - "Language and regional standards"(bookmark "Languages"), press the button "More details"- Languages ​​and text input services (bookmark "Additionally") put a checkmark in the checkbox "Enable text services support for all programs", press the button "Apply."

How to find out my name SQL server??

If you have installed MSDE, or MS SQL Server then after restarting the computer you should see an icon in the tray SQL Server Service Manager(looks like a barrel with a green arrow). When you hover over this icon with the mouse arrow, you will see a hint with the name of your server. The entry looks like this: Running -\\ xserver - MSSQLServer, the name of your server is located immediately after two backslashes, that is, in the example given - xserver.

It also most likely matches the name of your computer.

If you see an error like this: invalid column name...

Answers to questions about working with A-Number CRM.

A short preface about the logic of work at the initial stage.

When you created a new database it is empty. That is, only two fields were initially created in it, these are No. and Comment. Accordingly, you need to create all the necessary fields for work.

Php?option=com_content&task=view&id=29#1

After you have created the database fields, they are not displayed in the Main Table, why? - because the Main Table displays only those fields that you place on the Contact Card. Therefore, you go into the Card editing mode, and add previously created fields to it, and place them on the Card in the form that you like best, that is, we have created the Card design.

Php?option=com_content&task=view&id=59

But you should remember that the design you just created was created as an Administrator user, and only this user will display it. Often, after adding new users to the system, the question arises - why, when opening the Card for other users, the Card is empty? - because they didn't create their own Card design. But if you do not need to create an individual design for each user, you can distribute to them any design that was created in this database, it’s easy and takes exactly a minute.

Php?option=com_content&task=view&id=33

And one more point that requires explanation:
When you add a new user to the system, he is not included in any of the access groups, that is, until you add him to one of the existing groups, he will see an empty Card and an empty Main Table, do not forget that each user, must be a member of one of the access groups.

Php?option=com_content&task=view&id=26

I realized that in order for a field to be displayed in the Main Table, it must be placed on the Card" - how to do this?

To do this, you need to open the Card in editing mode, and arrange the elements (previously created fields) as you see fit, after which they will be displayed in the Main Table.


When you try to use import with field matching, the program complains: “Select a branch without linked contacts for transfer. Import failed.” How to deal with this?

Before importing, you need to create an empty branch in the tree (without contacts attached to it), and select it as the target when importing.

This was done specifically in order to avoid (as practice has shown) wasting extra time searching for newly imported records from those that were entered into the database before. And so they will all lie neatly in a branch, from where you can distribute them among the required branches, without unnecessary hassle.

If you don't see buttons in the Contact Card header And... this means that you have a topic AERO.

Of course not.

If I accidentally erased something on a card, is it possible to somehow roll back this action?

No, but you can look at the Change History.
Menu: Administration - Contact change log
or:
Reports - User Activity

If you register, for example, 10 contacts, and then delete one or
several, the numbering is not restored. Those. There were 10, there are 5 left
after deletion, the sixth registered will receive number 11 and numbering
will be 1,2,3,4,5,11. How can this problem be solved?

The number is a global record identifier so is always unique, it is not a row count.

Does the program work via the Internet?

If, for example, I have several offices in different cities, will the program work as a single database?

Can each manager log into the program using his own login?

Is there a version of CRM for iPhone?

No, for now only for Windows.

Does the system work in multi-user mode over the network?

10

My work company has a MSSQL 2005 server. I have two questions to find out the current user log and any way to send a warning message:

The first question is whether there is T-SQL or SP to look up the current username and machine name. If the user uses the SQL server name to remote access to SQL server, is there a way to find out this user's window name (windows login name)?

My next question is if I can get the username or id, is there a way to send a warning message like "the SQL server is currently being cleaned up or backup"Please do not log in at this time." This might be difficult, I guess. I may have to send an email to the user.

SQL Server is only available in-house. SQL server has a list of users as login users: Windows users, SQL users and sa.

  • 3 answers
  • Sorting:

    Activity

30

SELECT SUSER_SNAME(), HOST_NAME()

If the connection is "sa" (or any other SQL login), you cannot find the domain/windows username. SQL Server knows that it is "sa" or that it is a SQL login.

HOST_NAME may be untrusted and can be set in the connection string (“Application Name”). Or it could be vague, like " Microsoft Office» for default for Access, Excel, etc.

You can go back using client_net_address in sys.dm_exec_connections and match the MAC address to the IP and find out who is logged in...

4

An easy way to find out how the host and user is

EXEC sp_who2;

Where you get some other information that might be good to know as if the user is active and so on... this doesn't solve the problem gbn declared.

3

Thanks for all your suggestions. I have tried all the methods and I think Joakim Backman's method satisfies my need. Here's a summary of what I'm learning.

  • The sys.syslogins data request contains only login information. The account does not indicate the user's current timestamp. I tried to login from another application into my SQL and this query does not list the login.
  • SELECT SUSER_SNAME(), HOST_NAME() displays only one user in the SQL server. For example, I login as my name for the SQL server. The result of this query contains only my name and machine name. This query does not show current users on the SQL server.
  • exec sp_who2 contains the information I need. It lists the current username, active state, db username access, and command used.

In order to get the information that I use in SP, I have to filter and join the information to other tables such as emails. Here are the codes I use:

DECLARE @retTable TABLE (SPID int not null , Status varchar (255) not null , Login varchar (255) not null , HostName varchar (255) not null , BlkBy varchar(10) not null , DBName varchar (255) null , Command varchar (255) not null , CPUTime int not null , DiskIO int not null , LastBatch varchar (255) not null , ProgramName varchar (255) null , SPID2 int not null , REQUESTID INT) INSERT INTO @retTable EXEC sp_who2 SELECT Status, Login , HostName, DBName, Command, CPUTime, ProgramName -- * FROM @retTable --WHERE Login not like "sa%" -- if not interested in sa ORDER BY Login, HostName

I installed Microsoft SQL Server 2008.

When I launch SQL Server Management Studio (SSMS) I get the Connect to Server login window with a blank text field for Server name. I tried many names but I couldn't solve it.

How can I find/get the server name?

Step 1: Make sure SQLEXPRESS and LocalDB are installed on your system. Go to SQL SERVER Configuration Manager => SQL Server Service

If nothing is specified for SQL Server services, install below components (for 64-bit OS) 1. SqlLocalDB 2. SQLEXPR_x64_ENU 3. SQLEXPRADV_x64_ENU 4. SQLEXPRWT_x64_ENU

Step 2: Enter commissioning. (Dot) as the server name and click Connect [enter image description here] Enter again. \SQLEXPRESS as server name and click on connection

1.You can run the following command.

EXEC xp_cmdshell "reg query "HKLM\Software\Microsoft\Microsoft SQL Server\Instance Names\SQL"";
GO

2. use of the built-in standard report.

select instance -> right click -> Reports -> Standard Reports -> Dashbords Server

There are many methods mentioned above. But I use a fairly simple method (well, not simple, like SELECT @@ SERVERNAME). When you launch SQL Server Management Studio, you will see below GUI prompt

There Server Name is the name of your server (there may be multiple servers according to your dev environment, choose the right one). Hope this helps :)

considering the following examples

  • SQL Instance Name: MSSQLSERVER
  • Port: 1433
  • Hostname: MyKitchenPC
  • IPv4: 10.242.137.227
  • DNS Suffix: dir.svc.mykitchencompany.com

Here are your possible server names:

  • local\MSSQLSERVER
  • local, 1433\MSSQLSERVER
  • MyKitchenPC,1433\MSSQLSERVER
  • 10.242.137.227,1433\MSSQLSERVER
  • MyKitchenPC.dir.svc.mykitchencompany.com, 1433\MSSQLSERVER

start -> CMD -> (Write comand) SQLCMD -L first line is the server name if the server name is (local) Server name: YourPcName\SQLEXPRESS

Run this query to get the name

As mentioned by @Khaneddy2013, cmd SQLCMD -L does not returns the server name on startup. Bcz I just installed SSMS (local db and server were not installed). After attempts installations SqlLocaLDB And SQLEXPR32_x86_ENU(32-bit OS) I was able to connect. And now the cmd window also displays the server names.

The default server name is your computer's name, but you can use ".". (Dot) instead of the local server name.

Another thing you should consider is maybe you have installed SQL Server Express Edition. in this case you must enter ". \sqlexpress" as the server name.

my problem was that when connecting to the database SQL data In the Add Links Wizard, find SERVERNAME. I found it by running a query (SELECT @@ SERVERNAME) inside SQL management studio and reusl is my server name. I put this in the server name field and everything went fine.

I also had this problem for the first time.

In the Connect to Server dialog box, check the default settings and click Connect. To connect, the Server name field must indicate the name of the computer on which SQL Server is installed. If the Database Engine is a named instance, the Server Name field must also contain the instance name in the format: computername\instancename.

So, for example, I solved the problem in the following way: I typed the server name: Alex-PC\SQLEXPRESS