Showing posts with label objects. Show all posts
Showing posts with label objects. Show all posts

Monday, March 12, 2012

Login error

I want to tranfer few objects from SQL server2000 to 2005.

I used tranfer object task and defined the connection but i am getting the error cannot apply value null to property login:value cannot be null.

How can i solve the problem/

from

Sufian

Search this forum. Plenty of people have had the same problem.

-Jamie

Login dropped by Transfer Objects Task

Hello all :)
First, sorry for my english but I don't practice everday
So,
I'm a new user of Microsoft SQL 2005 and I'm testing some functionalities in SSIS.

I used the Transfer Objects Task to copy one database to another.
The both db's are on the same instance.

I chose these options for the transfer

-SourceConnection :My_Instance
-SourceDatabase :My_DB
-DestinationConnection :My_Instance
-DestinationDatabase :CopyOfMy_DB
-DropObjectsFirst =True
-IncludeExtendedProperties =Fasle
-CopyData =True
-ExistingData =Replace
-CopySchema =True
-UseCollation =True
IncludeDependentObjects =False
CopyAllObjects =True

The others options are set on FASLE

When I execute the package, I got an error message, the logins are dropped. I cannot connect to the database engine, even with my admin account.
I have to restore themaster database !

So my question is : why this SSIS task drop all the logins in sql server in place of just copy one database?

What's the solution for this problem?

Thanks for your comments !

Matt

Nobody knows ?

Matt
|||

Hi Matt,

When CopyAllObjects is set to True, the source database and all associated objects are copied -- including logins. When DropObjectsFirst is also to True, SSIS (actually, the underlying SMO layer) attempts to drop all objects (including the logins!) before the copy takes place. Since your source and destination databases are on the same server, this puts the server in a bad state.

While not exactly a bug, this behaviour is a bit dangerous, and there are plans to make the validation "smarter" in the next release to prevent this sort of thing from happening.

To make a copy of your database, you should set CopyAllObjects to False, and set the appropriate fields under ObjectsToCopy to True. (ie. CopyAllTables, CopyAllViews).

Hope that helps!

~Matt

Login dropped by Transfer Objects Task

Hello all :)
First, sorry for my english but I don't practice everday
So,
I'm a new user of Microsoft SQL 2005 and I'm testing some functionalities in SSIS.

I used the Transfer Objects Task to copy one database to another.
The both db's are on the same instance.

I chose these options for the transfer

-SourceConnection : My_Instance
-SourceDatabase : My_DB
-DestinationConnection : My_Instance
-DestinationDatabase : CopyOfMy_DB
-DropObjectsFirst = True
-IncludeExtendedProperties = Fasle
-CopyData = True
-ExistingData = Replace
-CopySchema = True
-UseCollation = True
IncludeDependentObjects =False
CopyAllObjects = True

The others options are set on FASLE

When I execute the package, I got an error message, the logins are dropped. I cannot connect to the database engine, even with my admin account.
I have to restore the master database !

So my question is : why this SSIS task drop all the logins in sql server in place of just copy one database?

What's the solution for this problem?

Thanks for your comments !

Matt

Nobody knows ?

Matt|||

Hi Matt,

When CopyAllObjects is set to True, the source database and all associated objects are copied -- including logins. When DropObjectsFirst is also to True, SSIS (actually, the underlying SMO layer) attempts to drop all objects (including the logins!) before the copy takes place. Since your source and destination databases are on the same server, this puts the server in a bad state.

While not exactly a bug, this behaviour is a bit dangerous, and there are plans to make the validation "smarter" in the next release to prevent this sort of thing from happening.

To make a copy of your database, you should set CopyAllObjects to False, and set the appropriate fields under ObjectsToCopy to True. (ie. CopyAllTables, CopyAllViews).

Hope that helps!

~Matt

Friday, March 9, 2012

Login Access

I want to give a login the ability to see all database objects, insert and
and delete data, run stored procedures, and execute objects within a specifi
c
database. I do not want them to create or delete any database objects or
adjust security. How do I accomplish that by using the database roles?
>I want to give a login the ability to see all database objects, insert and
> and delete data, run stored procedures, and execute objects within a
> specific
> database. I do not want them to create or delete any database objects or
> adjust security. How do I accomplish that by using the database roles?
With a user-defined role. There is no predefined role for executing
procedures. Check the permissions of the fixed db oles in BOL at
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/a08108a3-f1fb-43ac-a264-3f2f
9749db5d.htm.
Dejan Sarka
http://www.solidqualitylearning.com/blogs/