Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts

Thursday, March 22, 2012

Adventureworks db

I installed adventureworks db onto sqlExpress. It does not show up althought it is in the:

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

I look up the database in the Microsoft SQL Server Management Studio Express, But it's not visible. I've turned the service off andon, but it still is not available. Any ideas what has happened.

john welte

The installation of the sample database does not mean that you attached it for use in SQL Server. You will need to use the sp_attach procedure or the command which can be found in Management Studio under Right click the Server > Attach Database > specify the location and the name of the database file > Done :-)

HTH; Jens Suessmeyer.

http://www.sqlserver2005.de

Thursday, February 16, 2012

ADO Connection to MSSQL Server 2005... Need help

Hi,

at first a few things about my system:
I use Visual Studio 2005 Pro on WinXP SP2 and I have recently installed MSSQL Server 2005 Express on my system.

I want to establish a connection to the MSSQL Server from C++ (not .NET) using ADO.

For this I use the following connection String:

Open(L"Provider=SQLNCLI;Server=FREECASTLE;Integrated

Security=SSPI;DataTypeCompatibility=80;MARS

Connection=True;",L"",L"",ADODB::adConnectUnspecified);

This works. But this is not exactly that what I wanted, because here

just my Windows Authentication is used. I want to be able to pass

username and password for users that are allowed to access the SQL

Server. Here my first confusion begins: I have the option to pass the username and password into the connection string (User Id and Password) or I guess that I can pass them also as parameter 2 and parameter 3. But with trying both of these options I get always a connection error that my specified Username is not be trusted ( I don't know how the message looks in the English version, because I have the german version), but I suppose you know what I mean.

Of course I have to create such accounts in the SQL Server before trying to login with them. I guess that I made something wrong when doing this. I started the Server Manager Studio and there I navigated into the Object Explorer. In the folder Security I created a new account for testing (using SQL Server Authentication). But I cannot use that account for logging in.

I have to admit that I am very new to the SQL Server thing, so I hope someone can help me or can give me hints on what to do better. I am very thankful for every reply...That specific error message means, that you only enabled your server for WIndows authentication, if you want to use also SQL Server authentication you will have to enabled it first (using mixed Authentication). See the Screencast on my site for more information about Changing the authentication mode in SQL Server.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||Hi Jens,
with your Screencast I solved my problem. Thank you very much for your help.

Thursday, February 9, 2012

admin name change does not allow mssql to start up

I installed mssql 2K when the sys admin acount name was adminis1. I used that as the service startup account. Everything worked fine. I had to change the sys admin account name to adminis2. When I rebooted Mssql would not start up (because adminis1 did not exist anymore). I added a new account with the old name (adminis1) then rebooted but mssql would still not start. I renamed the sys admin account back to the original name and now mssql starts up. We still need to go to the adminis2 name (a local standards thing)
How do I set up the data base to start with this new name?Hi,
From your post I understand that you only change the Account name and not
the password. If this is the case then, you can edit the registry and
change the user name, to reflect the new user and the SQL Server Service
will start. Once the SQL Service starts, you can modify the Startup Account
Name for the additional services like the SQL Server Agent Service.
Start Regedit and go the following key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLSERVER
Modify the String Value for "ObjectName" to the new account name.
Close Regedit
Start the SQL Server Service.
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, you should first make a backup copy of the
registry files (System.dat and User.dat). Both are hidden files in the
Windows folder.
WARNING: Using Registry Editor incorrectly can cause serious problems that
may require you to reinstall Operating System. Microsoft cannot guarantee
that problems resulting from the incorrect use of Registry Editor can be
solved. Use Registry Editor at your own risk.
Ashish
This posting is provided "AS IS" with no warranties, and confers no rights.

admin name change does not allow mssql to start up

I installed mssql 2K when the sys admin acount name was adminis1. I used that as the service startup account. Everything worked fine. I had to change the sys admin account name to adminis2. When I rebooted Mssql would not start up (because adminis1 di
d not exist anymore). I added a new account with the old name (adminis1) then rebooted but mssql would still not start. I renamed the sys admin account back to the original name and now mssql starts up. We still need to go to the adminis2 name (a local
standards thing).
How do I set up the data base to start with this new name?
Hi,
From your post I understand that you only change the Account name and not
the password. If this is the case then, you can edit the registry and
change the user name, to reflect the new user and the SQL Server Service
will start. Once the SQL Service starts, you can modify the Startup Account
Name for the additional services like the SQL Server Agent Service.
Start Regedit and go the following key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\MSSQLSERVER
Modify the String Value for "ObjectName" to the new account name.
Close Regedit
Start the SQL Server Service.
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, you should first make a backup copy of the
registry files (System.dat and User.dat). Both are hidden files in the
Windows folder.
WARNING: Using Registry Editor incorrectly can cause serious problems that
may require you to reinstall Operating System. Microsoft cannot guarantee
that problems resulting from the incorrect use of Registry Editor can be
solved. Use Registry Editor at your own risk.
Ashish
This posting is provided "AS IS" with no warranties, and confers no rights.

admin name change does not allow mssql to start up

I installed mssql 2K when the sys admin acount name was adminis1. I used th
at as the service startup account. Everything worked fine. I had to change
the sys admin account name to adminis2. When I rebooted Mssql would not st
art up (because adminis1 di
d not exist anymore). I added a new account with the old name (adminis1) th
en rebooted but mssql would still not start. I renamed the sys admin accoun
t back to the original name and now mssql starts up. We still need to go to
the adminis2 name (a local
standards thing).
How do I set up the data base to start with this new name?Hi,
From your post I understand that you only change the Account name and not
the password. If this is the case then, you can edit the registry and
change the user name, to reflect the new user and the SQL Server Service
will start. Once the SQL Service starts, you can modify the Startup Account
Name for the additional services like the SQL Server Agent Service.
Start Regedit and go the following key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl
Set\Services\MSSQLSERVER
Modify the String Value for "ObjectName" to the new account name.
Close Regedit
Start the SQL Server Service.
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, you should first make a backup copy of the
registry files (System.dat and User.dat). Both are hidden files in the
Windows folder.
WARNING: Using Registry Editor incorrectly can cause serious problems that
may require you to reinstall Operating System. Microsoft cannot guarantee
that problems resulting from the incorrect use of Registry Editor can be
solved. Use Registry Editor at your own risk.
Ashish
This posting is provided "AS IS" with no warranties, and confers no rights.