Author |
Topic |
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 00:25:29
|
I'm having trouble with my installs on window 2003 server. I have a VBS to config the server with -I sa -P XXX , the script works on all other OS Xp and win2000 but on server2003 my software cannot log on to sql server. Any one seen this before. I can not tell if the script is being run, but I see the same effect when we install with anti-virus software running with script blocking on. This PC has no anti-virus software. Is there a way to run sql scripts from osql on a comman line. I tried but fail to log on. I do not know what password and user id was configed.Suka |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-04 : 12:41:30
|
If you don't know the userid and password, how do you expect to run the scripts? Yes you can run SQL scripts from osql at a cmd window:If your Windows account has enough permissions to run the scripts, then:osql -SServer1 -E -iC:\SomeFolder\Somescript.sqlElse:osql -SServer1 -USomeUser -PSomePassword -iC:\SomeFolder\Somescript.sqlTara |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 12:53:27
|
When a do the install setup I use secutitymode=sql and sapwrd=xxx then after install the config show that builtin\administarers changed the password. I can not log in after install. The server starts up only in services with local account.Suka |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-04 : 12:55:32
|
If you are an administrator on the database server, you do not need to use SQL authentication. Use Windows authentication instead.Tara |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 13:16:21
|
Thats the problem I do know how to get what password was setup on the SQl. Admin password do not work, I can only start the service ,I can not use SP_addlogin or any other sql command as I can not get log into the server? I'm lost why this work on all other OS. but 2003 servers.Richard |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-04 : 13:21:23
|
I don't understand your last post. You don't have the password or you do? And for which account? Does anyone have the sa password or a local admin account (windows account)?Tara |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 13:40:49
|
during the install setup. Default password is SAPWD="" ,so If I use the default setup. I should be able to log in to the sql DB using the default sa login. On this machine the config files show that a login to add buildin/admin with password change was used, I will sent the text on the next post. I'm going to log to the forums from other machine.suka |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 13:46:39
|
This is the config.out fileI can not login to this DB. It looks as if the sa password was changed by the setup.suka###############################################################################Starting Service ...SQL_Latin1_General_CP1_CI_AS-m -Q -T4022 -T3659Connecting to Server ...driver={sql server};server=POSWORKSTATION1\POS;UID=sa;PWD=;database=masterConfiguring Server ...EXEC sp_grantlogin N'BUILTIN\Administrators' [Microsoft][ODBC SQL Server Driver][SQL Server]Granted login access to 'BUILTIN\Administrators'.EXEC sp_addsrvrolemember N'BUILTIN\Administrators', 'sysadmin'[Microsoft][ODBC SQL Server Driver][SQL Server]'BUILTIN\Administrators' added to role 'sysadmin'.update master.dbo.spt_server_info set attribute_value = @@version where attribute_id = 2EXEC sp_detach_db 'pubs'EXEC sp_detach_db 'Northwind'EXEC sp_addserver N'POSWORKSTATION1\POS', local [Microsoft][ODBC SQL Server Driver][SQL Server]Password changed.EXEC sp_configure 'allow updates', 1 [Microsoft][ODBC SQL Server Driver][SQL Server]DBCC execution completed. If DBCC printed error messages, contact your system administrator.[Microsoft][ODBC SQL Server Driver][SQL Server]Configuration option 'allow updates' changed from 0 to 1. Run the RECONFIGURE statement to install.reconfigure with override update master.dbo.sysaltfiles set size=1024 where name=N'tempdev'EXEC sp_configure 'allow updates', 0 [Microsoft][ODBC SQL Server Driver][SQL Server]DBCC execution completed. If DBCC printed error messages, contact your system administrator.[Microsoft][ODBC SQL Server Driver][SQL Server]Configuration option 'allow updates' changed from 1 to 0. Run the RECONFIGURE statement to install.reconfigure with override Disconnecting from Server ...Stopping Service ...SQL Server has been successfully configured!############################################################################### |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-04 : 13:51:18
|
So do you have an account that is a member of the local admin group on the database server? If so, logon to a machine with that account and use Windows authentication to get in. By default, members of the local admin group have sa privileges. If all you have is osql:osql -S(local) -E-E says to use the account that I used to logon with to the machine. If you are not on the database server, change (local) to the server name.Tara |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 13:55:49
|
D:\Program Files\Microsoft SQL Server\MSSQL$POS\Binn>osql -S POS -E[TCP/IP Sockets]Specified SQL server not found.[TCP/IP Sockets]ConnectionOpen (Connect()).This is what I get.Suka |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-04 : 13:57:14
|
Is the MSSQLSERVER service started on the database server? Did you run the command on the database server or a client machine? If on a client machine, try it from the database server, also try (local).Tara |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 13:58:48
|
This is on one machine not hook up to the network I'm not using the server yet.Suka |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 14:00:16
|
yes it is started or runningsuka |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 14:15:55
|
taraI have software that uses install shield to set up the desktop engine. I have the sql script run after the install of the files . now on 2003 servers the install goes ok, with one exception. the program can not log on to the destop server $POS. So what I'm trying to do is to use the MSDN 2000 setup and run the script to config the sql for my software. The script can run but stops due to log fail sa log on password is not what was expected. I think somewhere during the install the sa password is revoked by 2003 server. the config files look the same as on xp. Is there some reason that 2003 server would not setup the sa password as per instruction in the standard install?suka |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-04 : 14:19:28
|
I don't know. There are options that you can pass to the installation. One of them is SAPASSWORD. There are a bunch of others. Perhaps you need to use one of those.Tara |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 14:19:55
|
D:\Program Files\Microsoft SQL Server\MSSQL$POS\Binn>osql -E -S MSSQL$POS[DBNETLIB]SQL Server does not exist or access denied.[DBNETLIB]ConnectionOpen (Connect()).This message comes up trying to use trusted connect.suka |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 14:22:00
|
i ahve tried as many as I could find none seem to let sa password be use.Is ther a nother way to test the connection?suka |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-04 : 14:32:53
|
With MSDE, you don't have SQL client tools, so osql is what you use.I just looked at your osql command. I don't think you are referencing the server name correctly. What is the name of the server? Did you install a named instance or default instance?Tara |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 14:34:23
|
POSSTATION1/POSInstance name is POSSuka |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-04 : 14:35:45
|
Then:osql -SPOSSTATION1\POS -ETara |
|
|
suka
Starting Member
17 Posts |
Posted - 2004-03-04 : 14:37:13
|
D:\Program Files\Microsoft SQL Server\MSSQL$POS\Binn>osql -E -S POSWORKSTATION1POS1> Ok This gets me to here ,How do I change or add user and password. I need to have U=sa P=xxxsuka |
|
|
Next Page
|