Showing posts with label management. Show all posts
Showing posts with label management. Show all posts

Thursday, March 22, 2012

adventureworks installation

I downloaded and installed the .msi from codeplex. After installation I open SQL Server Management Studio but don't see AdventureWorksDB in the list of databases. How is this possible? Should I not be seeing this new database? Do I have to do something else?

From within the sql server studio, right click on the databases entry. The task you are looking for is "attach database".

Grab the .mdf file for the adventure works db. ( It may try to grab a .log file that is in the wrong directory, if so, delete the reference to it on the screen. It will create another log file in the same directory as the .mdf file.)

sql

adventureworks db and dw not showing up in management studio database list

I've installed both the AW db and dw off the MS download. I see the db in the directory I use for other databases, the dw doesnt seem to want to go where I tell it. Anyway, when I connect to my instance of sql (developer's) I dont see the AW db.used attach and all is ok

AdventureWorks Database not showing up management studio express

After installing the Adventure works database samples they do NOT show up in Management Studio Express?

I have done a clean install of SQL Server Express 2005 SP1 with Advanced services.

The database samples only install as physical files, they are not attached to the SQL Server process. If you want to use them, go in the SSMS and right click on the Database node, choose All Tasks and click Attach database.. Locate the MDF File and the LDF File and click Apply (or OK). SQL Server will attach the databases to the SQL Server process and you can access the data.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||I found this not quite accurat. The Attach is in the Object Explorer window under the sqlexpress datebase, right click Databases (nt Database) then click Attach. The window which opens should show the AdventureWorks database without having to browse. This required action is not mentioned in the tutorial.

AdventureWorks Database not showing up management studio express

After installing the Adventure works database samples they do NOT show up in Management Studio Express?

I have done a clean install of SQL Server Express 2005 SP1 with Advanced services.

The database samples only install as physical files, they are not attached to the SQL Server process. If you want to use them, go in the SSMS and right click on the Database node, choose All Tasks and click Attach database.. Locate the MDF File and the LDF File and click Apply (or OK). SQL Server will attach the databases to the SQL Server process and you can access the data.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||I found this not quite accurat. The Attach is in the Object Explorer window under the sqlexpress datebase, right click Databases (nt Database) then click Attach. The window which opens should show the AdventureWorks database without having to browse. This required action is not mentioned in the tutorial.sql

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.

AdventureWorks Database - cannot access Database Diagrams

Hi,

When I try to access the database diagrams in AdventureWorks, I get the following message:

TITLE: Microsoft SQL Server Management Studio Express

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.


BUTTONS:

OK

Why is this?

All advice / help apprecuated.

Thanks

hi,

after "upgrading" a database from MSDE or installing AdventureWorks database, you have to access the database properties window and set the database owner to a registered login... for upgraded dbs you have to modify the compatibility level to 90 as well..
you can then access the Diagrams window..

upgraded database should have the statistics rebuilt as well WITH FULL SCAN..

DBCC CHECKDB WITH DATA PURITY should be performed as well as upgraded database do not have the "column's level values checked" by default...

regards

adventureworks attach error

i've attempt to atach the adventureWorks database to follow the webcourse 2924 but I got the following error:

TITLE: Microsoft SQL Server Management Studio

Attach database failed for Server 'localhost'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Could not find row in sysindexes for database ID 28, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.
Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 602)

But, how can I run DBCC CHECKTABLE on non attached database?

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=602&LinkId=20476


BUTTONS:

OK

Mary,

Please follow this article to attach AW.

http://msdn2.microsoft.com/en-us/library/ms310325.aspx

Tuesday, March 20, 2012

Advantages of Database Diagram

What is the advantages/disadvantages of using Database Diagram and link all the tables in MS SQL Server Management Studio versus letting the application check and link the different tables at run time? Currently, I do not have all my tables linked in a Database Diagram. I do everything at run time in my application code behind. What are the best practices? Which is easier or perhaps more secure?

I always used the diagram tool in SQL2000 - not only is it a great resource for new DBA's and developers, it adds constraints that you might otherwise forget. It's a great simple way to ensure you don't end up with missing links in your data.

|||

Many thanks for the response. Is constraint the biggest advantage of using diagram? By the way, can I use MS SQL Server Management Studio 2005 to diagram a database tables on SQL Server 2000?

|||

Lack of referential integrity can lead to very hard to trace faults. Where relationships exist, it is far better to define then at the database level as the relationship is then always enforced.

You can have more than one diagram. It is not necessary to have diagrams to define foreign key relationships, it is just a bit easier that way.

|||

Thanks for the responses.

sql

Saturday, February 25, 2012

ADO.NET returns different colum value when compared to View results in SQL 2005 Management

I have a complex view in my sql 2005 database.

The view returns a column that could be null (as the result of a left outer join).

The coulmn that is returned is an integer.

Everything works fine if I run the view from SQL 2005 Management Studio.

My column value is always null if I use ADO.NET's SqlAdapter to return a DataTable.

Has anybody seen this behaviour before?

Any help appreciated.

Regards,

Paul.

Hi Paul,

From you description, I understand that when you query data from the database view, the destination column in the DataSet is always null.

This could be caused by a wrongly configured SqlDataAdapter or the mismatched target DataSet schema.

For example, if you're using a typed DataSet, the target column data type is in another type. In this case, data might be converted incorrectly. Also, please try to check the table mapping and column mapping for the SqlDataAdapter.

HTH.

|||

I've solved the problemSmile

I changed the DB Connection to system admin and everything worked ok.

Looks like I've got a permissions issue with one or more of my SQL Functions.

Thanks for the help.

Regards,

Paul.

Thursday, February 9, 2012

Admin. of SSRS via SQL Server Mgmt Studio

I would like to be able to administer SQL Server Reporting Services (SSRS)
via the SQL Server Management Studio (SSMS). It appears, in our setup at
least, that the only individuals who are able to use the SSMS are those who
are included in the BUILTIN\Administrators group (admins on the server). Our
setup calls for a separation of roles between those who setup/manage the
servers (setup apps on the servers - local admins on the server) and those
who will administer the application after it is installed. I am setup with
the System Administrator Role and with Content Manager in the HOME folder. I
am not able to connect to the SSRS instance via SSMS, where the local admins
(BUILTIN\Administrators) are able to manage SSRS via the SSMS. Is there a
way for the non local admins to use SSMS to administer SSRS?What is it that you are trying to do. Most of the type of admin type work to
do with RS is done via Report Manager (the protal that ships with RS).
Subscriptions, assigning roles, etc. What are you trying to do that you need
to use SSMS to do?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"LTC" <LTC@.discussions.microsoft.com> wrote in message
news:A4AEDC9B-D588-4DDB-9729-F1A309EDCA39@.microsoft.com...
>I would like to be able to administer SQL Server Reporting Services (SSRS)
> via the SQL Server Management Studio (SSMS). It appears, in our setup at
> least, that the only individuals who are able to use the SSMS are those
> who
> are included in the BUILTIN\Administrators group (admins on the server).
> Our
> setup calls for a separation of roles between those who setup/manage the
> servers (setup apps on the servers - local admins on the server) and those
> who will administer the application after it is installed. I am setup
> with
> the System Administrator Role and with Content Manager in the HOME folder.
> I
> am not able to connect to the SSRS instance via SSMS, where the local
> admins
> (BUILTIN\Administrators) are able to manage SSRS via the SSMS. Is there a
> way for the non local admins to use SSMS to administer SSRS?|||I have been using Report Manager portal for RS, however I use the SSMS to
administer SS DBMS and SSAS. It would be more convenient to work all within
one tool.
"Bruce L-C [MVP]" wrote:
> What is it that you are trying to do. Most of the type of admin type work to
> do with RS is done via Report Manager (the protal that ships with RS).
> Subscriptions, assigning roles, etc. What are you trying to do that you need
> to use SSMS to do?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "LTC" <LTC@.discussions.microsoft.com> wrote in message
> news:A4AEDC9B-D588-4DDB-9729-F1A309EDCA39@.microsoft.com...
> >I would like to be able to administer SQL Server Reporting Services (SSRS)
> > via the SQL Server Management Studio (SSMS). It appears, in our setup at
> > least, that the only individuals who are able to use the SSMS are those
> > who
> > are included in the BUILTIN\Administrators group (admins on the server).
> > Our
> > setup calls for a separation of roles between those who setup/manage the
> > servers (setup apps on the servers - local admins on the server) and those
> > who will administer the application after it is installed. I am setup
> > with
> > the System Administrator Role and with Content Manager in the HOME folder.
> > I
> > am not able to connect to the SSRS instance via SSMS, where the local
> > admins
> > (BUILTIN\Administrators) are able to manage SSRS via the SSMS. Is there a
> > way for the non local admins to use SSMS to administer SSRS?
>
>

Adjusting the summary view

I'm using SQL 2005 Management Studio SP 2 on Windows XP against a SQL 2005 SP 2 server. In the summary view for Database Tables, I can only see the date for when the tables are created, yet they sort by date and time. How do I make the table creation time stamp part show up along with the date? I tried selecting List and Details, with no more detail than date.

Hi Andymcdba1,

We only support name,schema, and created in this view in the current release with no way to change the details.

We have a work-item in our backlog to offer more choices and options in the next general release of SQL Server.

Thanks,

Terrence Nevins

SQL Server Program Manager

Adjusting the summary view

I'm using SQL 2005 Management Studio SP 2 on Windows XP against a SQL 2005 SP 2 server. In the summary view for Database Tables, I can only see the date for when the tables are created, yet they sort by date and time. How do I make the table creation time stamp part show up along with the date? I tried selecting List and Details, with no more detail than date.

Hi Andymcdba1,

We only support name,schema, and created in this view in the current release with no way to change the details.

We have a work-item in our backlog to offer more choices and options in the next general release of SQL Server.

Thanks,

Terrence Nevins

SQL Server Program Manager