Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

SqlServer commands


SqlServer commands

Hello everyone, how to execute sqlplus <db_user>/<db_user_pw>@<sid> command . If there is no Oracle, and there is SqlServer?
And what is @<sid> ?

23-Emerald II

db_user is the name of the WIndchill user who executes DB commands. Found in file under the load point.

db_pass is the password for the db_user account. it is encrypted, so you have to know it or find someone who does.

sid is the name of the database defined when the system was created. It cam also be found in, if you know the service name.


Once SQLplus is open, you can execute your SQL scripts and logged into the DB, you8 can run the scripts or enter commands line by line.




Thanks, , there is still a problem with sqlplus, how to change the command for SQLSERVER?


It is showing that sqlplus isn't a recognized command, meaning that it isn't installed, not that the syntax of the command is wrong.  The question is why are you trying to use sqlplus via command line and not using SQL Server Management Studio?

BrianToussaint, I can execute SQL commands inside SQL SERVER, I thought that it is necessary to do everything through Windchill Shell that there was a synchronization of files ?

@VladiSlav what are you trying to do?  I do remember when I was creating numbering sequences for new soft types that I created, that it was done through a Microsoft SQL Server Query File ".sql".  If you check out CS42301 on the PTC support page, it will tell you how to do the number sequencing.


I mainly use the manager to do queries.  A couple of times with tech support guidance I have actually had to manipulate data.

BrianToussaint, I'm trying to run an example from the documentation with cust_Windchill_src


13. Load schema for Pet.
a. Locate, under load point/db, Make_pkg_acme_Table.sql.
a. Oracle (single byte): db/sql/com/acme/Make_pkg_acme_Table.sql
b. Oracle (multi-byte): db/sql3/com/acme/Make_pkg_acme_Table.sql
c. SQLServer: db/sqlServer/com/acme/Make_pkg_acme_Table.sql
b. cd to the db/<xxx> directory from above (db/sql, db/sql3, or db/sqlServer)
c. Run the script
a. Oracle: sqlplus <database credentials> @com/acme/Make_pkg_acme_Table.sql
b. SQLServer: …
d. Repeat for @com/acme/Make_pkg_acme_Index.sql

@VladiSlav  I sure hope you are on a test server. (I'm not responsible for you trying this and you might want to verify with tech support that is the command you need to use.)  I don't know why they put the .... after SQLServer in line b to run the script.  The command it tells you to use when creating a new sequence as shone in the CS article: is as below....





BrianToussaint, thank you. Yes this is a test server, I just started to learn, while even the first example does not work, looking for examples easier, but only harder were