What is four part name?

Explanation : ServerName.DatabaseName.DatabaseOwner.TableName
Example : localhost.AdventureWorks.Person.Contact
Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.
What is four part name?

Explanation : ServerName.DatabaseName.DatabaseOwner.TableName
Example : localhost.AdventureWorks.Person.Contact
Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.
SQL Server slow? Let's fix it together in about four hours.
In my Comprehensive Database Performance Health Check, you share your screen, I guide you, and we fix your biggest performance troublemakers. No passwords. No remote access.
You keep every script, and the know-how to fix it yourself next time.
Want your whole team to learn it?
My Practical Workshop has no PowerPoint, just live demos. My AI Enablement Workshop shows your team where AI saves hours, and where it quietly costs them.
Over 400 customers have worked with me this way, and not one shared a password. See all consulting options.
Pinal Dave is an SQL Server Performance Tuning Expert and independent consultant with over 24 years of hands-on experience. He holds a Masters of Science degree and numerous database certifications.
Pinal has authored 19 books and 120 Pluralsight courses. To freely share his knowledge and help others build their expertise, Pinal has also written more than 5,800 database tech articles on his blog at https://blog.sqlauthority.com.
Pinal is also a CrossFit Level 1 Trainer (CF-L1) and CrossFit Level 2 Trainer (CF-L2).
Nupur Dave is a social media enthusiast and an independent consultant. She primarily focuses on the database domain, helping clients build short and long-term multi-channel campaigns to drive leads for their sales pipeline.
Shaivi Pinalkumar Dave is a book author and a women’s artistic gymnast.

16 Comments. Leave new
In the example for a 4-part name, does the server name refer to the name of the computer or does it refer to the name of the SQL Server instance? These will not necessarily be the same names.
Aren’t all indexes created as separate structures from a table? Although the index is created against a particular
table, doesn’t the index itself exist in the database as a separate, self-contained structure?
Which index type — clustered or nonclustered — logically
sorts the database of a table?
brother i will need to enter the data to the table of db1 from db2 and db1 is on remote server
please send me the syntax if possible
Hello Kasif,
1. Copy data using Import/Export wizard or SSIS package.
2. Insert data using OPENQUERY function
3. Insert data using OPENROWSOURCE function
4. Insert using 4 part naming. you would need to create a LinkedServer for this.
5. Create script of data at source server and run on target database. As this would need more workaround so not recommonded.
Regards,
Pinal Dave
Hi,
I am very much impressed with your sql blogs and posting.Pinal I have newly stepped into SSIS package could you please help me around in this ….
How to run a stored procedure in ssis package .And i have to pass the parameter’s from excel sheet .Like this
=”exec st_example ‘” &F2 &”‘, ” & E2 & “, ‘” & H2 & “‘”
and in the excel sheet , i need to pass the parameter by row by row .it would contains about 800 row ‘s .i am running this stored prod manually daily.
And i have to schedule this job and send an alert mail.
Sir i am new about to linked server.i am using this in my local server
sp_addlinkedserver
@server=’ip address of my remote server’,
@srvproduct=”,
@provider=’SQLNCLI’,
@datasrc=’databasename’
and then i make this query:
SELECT *
FROM OPENQUERY(‘ipadress’,databasename.uid.’select * from tbl_Products ‘)
it not work. plz sir help me.
Thanks
Randeep Chauhan
Can u explain about memory leak in sql server?
yogigollapudi – In general SQL Server doesn’t leak memory. It’s by design of SQL that once it has grabbed memory, it would keep it to itself unless asked by operating system.
This behavior is generally perceived as memory leak which is not true.
Thank you for clarification.
Your welcome yogigollapudi!
Hi
i am getting messages in errorlog as Process ID 400 was killed by hostname , host process ID 0.
there is no hostname , and process ID 0, when i checked for process id in task manager , 0 is for system idle process.
Could you please suggest me on this, what i have to check.
yogigollapudi – hostname and host process ID is empty for system processes. is there any other error which happened before that in ERRORLOG?
does it happen at specific time? have you tried capturing a profiler?
yes i tried to capture with profiler but i have not found any clues, this is happening between 2 am to 11 am and getting almost 15-20 these error messages.
Hi Dave,
You write in this blobpost that the four part name consists of: ServerName.DatabaseName.DatabaseOwner.TableName.
But isn’t actually
ServerName,DatabaseName.SchemaName.TableName?
In a lot of situations the DatabaseOwner and default schema will have the same name: e.g. [dbo]. But if a table belongs to a different schema, then at least I don’t get a connection by stating the DatabaseOwner.
Regards,
Mikkel
you are correct. It should be SchemaName.