November 19, 2015 at 5:40 am
why sql server uses .sql file?
can I attach or detach .sql file to the sql server if yes then how?
November 19, 2015 at 5:45 am
It's just the default extension for a text file containing T-SQL code. A .sql file isn't a database.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 19, 2015 at 5:47 am
.sql is the extension of a script file not a database, its not an mdf/ndf/ldf file and thus cannot be attached or detached from SQL.
The caveat to this is that if someone created the DB and specified upon creation that the file extensions should be .sql instead of mdf/ndf/ldf
November 19, 2015 at 6:57 am
The caveat to this is that if someone created the DB and specified upon creation that the file extensions should be .sql instead of mdf/ndf/ldf
Shudder.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
November 19, 2015 at 7:04 am
Phil Parkin (11/19/2015)
The caveat to this is that if someone created the DB and specified upon creation that the file extensions should be .sql instead of mdf/ndf/ldf
Shudder.
I once created a database with both the data and log files being NTFS alternate streams of a readme.txt. Just to see if I could.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 19, 2015 at 7:35 am
GilaMonster (11/19/2015)
Phil Parkin (11/19/2015)
The caveat to this is that if someone created the DB and specified upon creation that the file extensions should be .sql instead of mdf/ndf/ldf
Shudder.
I once created a database with both the data and log files being NTFS alternate streams of a readme.txt. Just to see if I could.
I created a database with an extension of .DOC in a demo. Silly stuff is possible. Don't do that.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
November 19, 2015 at 7:41 am
Grant Fritchey (11/19/2015)
GilaMonster (11/19/2015)
Phil Parkin (11/19/2015)
The caveat to this is that if someone created the DB and specified upon creation that the file extensions should be .sql instead of mdf/ndf/ldf
Shudder.
I once created a database with both the data and log files being NTFS alternate streams of a readme.txt. Just to see if I could.
I created a database with an extension of .DOC in a demo. Silly stuff is possible. Don't do that.
Indeed, just because you can, doesn't mean you should.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply