Showing posts with label logs. Show all posts
Showing posts with label logs. Show all posts

Thursday, March 22, 2012

AdventureWorks database not seen by Management Studio Express CTP

When I install AdventureWorks.db for SQL Express, it runs without errors. The database files (data and logs) are in the SQL Express 2005 data directory. However, I can not see the database in Managment Studio Express CTP. I've tried repairing and uninstall/install again. Does not help.

I have SQL Express 2005 cleanly installed. I have the pubs and Northwinds databases cleanly installed. (I was able to execute the queries that came for installing these). I can see both pubs and Northwinds in Management Studio Express CTP.

Any suggestions?

You won′t be able to see them if you don′t have permissions to the database itself, did you connect to database with the same credentials as you connected as you executed the queries that you mentioned ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

Yes, I did connect with the same credentials.

Also, the AdventureWorks did not come with a query like the pubs and Northwind databases. It just comes as a self-installing file. So I didn't have to open it in Mgmt Studio and execute it. It just installs and says it was successful when done.

|||

You must attach the files to an instance of SQL Server Express.

Execute the following script to identify the directory where the master database file is located.

select physical_name from sys.database_files where name = 'master'

Then, execute a similar script to attach the files.

exec sp_attach_db @.dbname=N'AdventureWorks', @.filename1=N'c:\Programas\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\AdventureWorks_Data.mdf', @.filename2=N'c:\Programas\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\AdventureWorks_log.ldf'

Regards.

|||I did all above and still did not see it in the list.|||

hi,

you mean you executed the attach statement with no exception raised and you can't see the database in the list of registered databases even after a refresh of the list (rx click the database node, refresh)?

regards

|||

Hi there.

When you start SQL Management Studio Express, right click on Databases and click add in the Attach Databases window that opens. This will open the directory tree on your system and it will default to the Data directory where the AdventureWorks database is installed by default. You should see it in the window. Select it and click OK. It will then appear in the Attach Databases window so click OK again.

You may have to refresh the Object Explorer window, and then the database will show up in your list of databases. Hope that helps.

Graham.

AdventureWorks database not seen by Management Studio Express CTP

When I install AdventureWorks.db for SQL Express, it runs without errors. The database files (data and logs) are in the SQL Express 2005 data directory. However, I can not see the database in Managment Studio Express CTP. I've tried repairing and uninstall/install again. Does not help.

I have SQL Express 2005 cleanly installed. I have the pubs and Northwinds databases cleanly installed. (I was able to execute the queries that came for installing these). I can see both pubs and Northwinds in Management Studio Express CTP.

Any suggestions?

You won′t be able to see them if you don′t have permissions to the database itself, did you connect to database with the same credentials as you connected as you executed the queries that you mentioned ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

Yes, I did connect with the same credentials.

Also, the AdventureWorks did not come with a query like the pubs and Northwind databases. It just comes as a self-installing file. So I didn't have to open it in Mgmt Studio and execute it. It just installs and says it was successful when done.

|||

You must attach the files to an instance of SQL Server Express.

Execute the following script to identify the directory where the master database file is located.

select physical_name from sys.database_files where name = 'master'

Then, execute a similar script to attach the files.

exec sp_attach_db @.dbname=N'AdventureWorks', @.filename1=N'c:\Programas\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\AdventureWorks_Data.mdf', @.filename2=N'c:\Programas\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\AdventureWorks_log.ldf'

Regards.

|||I did all above and still did not see it in the list.|||

hi,

you mean you executed the attach statement with no exception raised and you can't see the database in the list of registered databases even after a refresh of the list (rx click the database node, refresh)?

regards

|||

Hi there.

When you start SQL Management Studio Express, right click on Databases and click add in the Attach Databases window that opens. This will open the directory tree on your system and it will default to the Data directory where the AdventureWorks database is installed by default. You should see it in the window. Select it and click OK. It will then appear in the Attach Databases window so click OK again.

You may have to refresh the Object Explorer window, and then the database will show up in your list of databases. Hope that helps.

Graham.

Thursday, March 8, 2012

aduit connections to SQL Server

On sql 2005 is there any audit logs on by default that log connections to sq
l
server and what database the connection was to.
If not on, is there one that you can turn on.
Not to long ago we had some records deleted out of the sql database
mysteriously. I am trying to find out how that happened and to keep it from
happening again.There is a default trace in SQL Server 2005 that is enabled
by default. You can find information about the default trace
in books online and this link has more info:
http://www.mssqltips.com/tip.asp?tip=1111
-Sue
On Wed, 14 Feb 2007 08:49:05 -0800, Andrew
<Andrew@.discussions.microsoft.com> wrote:

>On sql 2005 is there any audit logs on by default that log connections to s
ql
>server and what database the connection was to.
>If not on, is there one that you can turn on.
>Not to long ago we had some records deleted out of the sql database
>mysteriously. I am trying to find out how that happened and to keep it from
>happening again.|||Andrew
In addition on Sue's reply
> Not to long ago we had some records deleted out of the sql database
> mysteriously. I am trying to find out how that happened and to keep it
> from
> happening again.
You can use
1) DDL Triggers
2) Event notifications
"Andrew" <Andrew@.discussions.microsoft.com> wrote in message
news:8B1D1BB3-9EC2-4C31-87FA-064A1FB5C2E0@.microsoft.com...
> On sql 2005 is there any audit logs on by default that log connections to
> sql
> server and what database the connection was to.
> If not on, is there one that you can turn on.
> Not to long ago we had some records deleted out of the sql database
> mysteriously. I am trying to find out how that happened and to keep it
> from
> happening again.
>