-
SQL Server 2005 Opening Script File Problem
Hi All,
I just installed SQL Server 2005 on my PC. I have some scripts written by one of my friend to create some tables and stored procedures. Whenever I go to open the script file the file opens in Notepad instead of appearing in the query window.
How can i correct this.
-
You need to change association in windows. Try assoc command in command prompt or go to Windows explorer and go to Tools - folder options - File type and change association.
-
Is file extension .sql? Will load .sql file in ssms by default.
-
Hi skhanal,
i did the above by making the sql extn as default in windows explorer but the .sql file still opens in notepad.
-
try this
CMD>assoc .sql=sqlwb.sql.9.0
-
Or just right click .sql file and go to open with -> choose program..., select ssms then check 'always use the selected program to open this kind of file'.
-
A Simple Association is All You Need ....
It's a common question. The response just before this one is what I tell clients / readers regularly ...
Let us know if that doesn't do it for you ...
Bill
-
Hi skhanal,
tried the above command on cmd prompt but the .sql file still opens in notepad and the contents are non-readable charaters. Is it something to do with the edition, i am using standard edition of MS-SQL 2005.
Although the MSSMS gets open on click of .sql file but the end result is that the the contents of sql file opens in notepad. I think the MSSMS is making the .sql file to open in notepad. Any changes to be made in the settings of MSSMS??
Regards
Prashant
Last edited by prashant12se; 10-21-2008 at 01:10 AM.
-
Hi rmiao,
have already tried the right click option on the .sql file, but it still opens in notepad..
Last edited by prashant12se; 10-21-2008 at 01:07 AM.
-
Not sure why all those didn't work on your pc. Anyway, you can open .sql file inside ssms.
-
Another Option ...
And you could always open the file in notepad, etc., and cut and paste it to the Editor - then save the script among the RDBMS objects collection, etc.
Good Luck ...
Bill
-
Hi All,
the .sql file opens in MSSMS using notepad but the contents of the notepad are non-readable characters, so no use of copy-paste to the new query window. I couldn't found anythings as such to rectify this. Maybe there must be some settings to be done in MSSMS.
-
Can You Read the Text in NotePad?
I thought you said you could open the file in Notepad in one of your earliest posts - and assume you can read it there. If so, can't you cut and paste it - from Notepad?
BTW, I mean the Windows Notepad - good old Notepad.exe ...
Thanks.
Bill
-
>> the contents of the notepad are non-readable characters
Is it really a sql script for sql server?
-
Hi, yes it's a .sql file..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|