Showing posts with label databases. Show all posts
Showing posts with label databases. Show all posts

Monday, March 19, 2012

[SQL-DMO]The name tdb_grabowy1 was not found in the Databases collection.

We need to copy about 25 databases whenever we get a new software
delivery. Currently, the process is to manually use the DTS database
copy wizard.

Doing some research, I created a DTS package to copy databases. But
this was not going to work since I have to hard code the database
names in the package. Back to RTFMing, I discovered the Dynamic
Properties Task. So now I setup a .bat file that calls dtsrun and via
global variables passes in the source and target database names to the
copy db DS package.

I did a simple test against a test database that I have and it worked.
But when I tried it against some "real" databases I get the following
errors. I have searched and googled but I have not found anything.
Help?

DTSRun OnError: Copy SQL Server Objects, Error = -2147199728
(80045510)
Error string: [SQL-DMO]The name 'tdb_grabowy1' was not found in the
Databases collection. If the name is a qualified name, use [] to
separate various parts of the name, and try again.
Error source: Microsoft SQL-DMO
Help file: SQLDMO80.hlp
Help context: 1131Hi

It is not clear why you need to update the data in a table if there is a
software delivery, normally I would expect scripts to make any of the
necessary changes, or if data is being imported then each database would
contain (common) code that would be able to do the import.

The error is reasonably self explaining. You are trying to use
'tdb_grabowy1' which either does not exists or you possibly don't have
permissions to use. If the database does exist try run the process just for
the one database on it's own.

If you process drops the database and then re-creates it, you could do this
task by restoring the database or copying the data and log files and then
attaching them.

John

"CxG" <chris.grabowy@.lmco.com> wrote in message
news:35c4f452.0409090837.77ca8573@.posting.google.c om...
> We need to copy about 25 databases whenever we get a new software
> delivery. Currently, the process is to manually use the DTS database
> copy wizard.
> Doing some research, I created a DTS package to copy databases. But
> this was not going to work since I have to hard code the database
> names in the package. Back to RTFMing, I discovered the Dynamic
> Properties Task. So now I setup a .bat file that calls dtsrun and via
> global variables passes in the source and target database names to the
> copy db DS package.
> I did a simple test against a test database that I have and it worked.
> But when I tried it against some "real" databases I get the following
> errors. I have searched and googled but I have not found anything.
> Help?
> DTSRun OnError: Copy SQL Server Objects, Error = -2147199728
> (80045510)
> Error string: [SQL-DMO]The name 'tdb_grabowy1' was not found in the
> Databases collection. If the name is a qualified name, use [] to
> separate various parts of the name, and try again.
> Error source: Microsoft SQL-DMO
> Help file: SQLDMO80.hlp
> Help context: 1131|||> It is not clear why you need to update the data in a table if there is a
> software delivery, normally I would expect scripts to make any of the
> necessary changes, or if data is being imported then each database would
> contain (common) code that would be able to do the import.

We are in development and when we get a new copy of the COTS products
then we make copies of the existing baseline databases to new baseline
copies. That way development, debugging, prod support can continue in
the previous baseline, until we get prod up and running on the new
baseline.

> The error is reasonably self explaining. You are trying to use
> 'tdb_grabowy1' which either does not exists or you possibly don't have
> permissions to use. If the database does exist try run the process just for
> the one database on it's own.

I am using a DTS package that copies databases. Its a simple package
that executes the Copy SQL Server Objects Task. Normally, it would be
hardcoded to copy a specific source database to a specific target
database, but I am using a Dynamic Properties Task to modify the
package attributes to allow me to specify a source/target database
name upon execution of the DTS package. tdb_grabowy is my play/test
database. I am attempting to copy it to tdb_grabowy1.

It is getting the noted error message in the middle of the execution
of the package.

[SQL2000] permissions to use view based on tables from many databases

Hi
I have two databases: Customers and Operations. In Customers database I have
made a view based on a few tables from both Customers and Operations (left
join - customers without any operations). In the same database (Customers) I
have created a stored procedure based on the view. Finally I'd like to give
to some users permission only to exec the stored procedure.
Have I to add the users to Customers? If yes, please describe me how to
limit the users privileges only to execution the stored procedure (no rights
to open tables or view from Customers).
Regards,
Grzegorz
Ps. I had sent the post on microsoft.public.sqlserver.security, but I had no
answer.By default when you add a user they do not have any permissions to do
anything. So just make sure you don't add them to any of the server or
database roles. Then simply GRANT them execute permission on that sp.
Andrew J. Kelly SQL MVP
"Grzegorz Danowski" <gdn__na@.serwerze__poczta.onet.pl> wrote in message
news:dteimk$1b7$1@.inews.gazeta.pl...
> Hi
> I have two databases: Customers and Operations. In Customers database I
> have made a view based on a few tables from both Customers and Operations
> (left join - customers without any operations). In the same database
> (Customers) I have created a stored procedure based on the view. Finally
> I'd like to give to some users permission only to exec the stored
> procedure.
> Have I to add the users to Customers? If yes, please describe me how to
> limit the users privileges only to execution the stored procedure (no
> rights to open tables or view from Customers).
> Regards,
> Grzegorz
> Ps. I had sent the post on microsoft.public.sqlserver.security, but I had
> no answer.|||Well, it works fine in situations when all tables are in the same database,
but it doesn't work when tables are in two databases. If user have no rights
to read source table from other database SQL Server shows error:
"SELECT permission denied on object 'CustomersData', database 'Customers',
owner 'dbo'."
Grzegorz
Uytkownik "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> napisa w
wiadomoci news:%23Iia6cuNGHA.2336@.TK2MSFTNGP12.phx.gbl...
> By default when you add a user they do not have any permissions to do
> anything. So just make sure you don't add them to any of the server or
> database roles. Then simply GRANT them execute permission on that sp.
> --
> Andrew J. Kelly SQL MVP|||Are the objects owned by the same owner in both db's? If so you may have to
specify rights on the other tables. Is Cross database Ownership chaining
turned on?
http://support.microsoft.com/?kbid=810474
Andrew J. Kelly SQL MVP
"Grzegorz Danowski" <gdn__na@.serwerze__poczta.onet.pl> wrote in message
news:dtf589$5h3$1@.inews.gazeta.pl...
> Well, it works fine in situations when all tables are in the same
> database, but it doesn't work when tables are in two databases. If user
> have no rights to read source table from other database SQL Server shows
> error:
> "SELECT permission denied on object 'CustomersData', database 'Customers',
> owner 'dbo'."
> Grzegorz
>
> Uytkownik "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> napisa w
> wiadomoci news:%23Iia6cuNGHA.2336@.TK2MSFTNGP12.phx.gbl...
>|||Thanks, it works.
Grzegorz
Uytkownik "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> napisa w
wiadomoci news:O07NN2uNGHA.2064@.TK2MSFTNGP09.phx.gbl...
> Are the objects owned by the same owner in both db's? If so you may have
> to specify rights on the other tables. Is Cross database Ownership
> chaining turned on?
> http://support.microsoft.com/?kbid=810474
> --
> Andrew J. Kelly SQL MVP
>
> "Grzegorz Danowski" <gdn__na@.serwerze__poczta.onet.pl> wrote in message
> news:dtf589$5h3$1@.inews.gazeta.pl...
>|||It is a in SQL that permission is check on the first called element i.e.
in case of stored procedure the there's a check made if the user has
the right to execute a procedure. Thus it's possiblie to allow a user to
execure a procedure and e.g. display a subset of data without allowing
to read tables content. Up to sp3 it was valid for the whole server.
From sp3 you've got to set cross-databse chaining explicitly.
Grzegorz Danowski wrote:
> Hi
> I have two databases: Customers and Operations. In Customers database I
> have made a view based on a few tables from both Customers and
> Operations (left join - customers without any operations). In the same
> database (Customers) I have created a stored procedure based on the
> view. Finally I'd like to give to some users permission only to exec the
> stored procedure.
> Have I to add the users to Customers? If yes, please describe me how to
> limit the users privileges only to execution the stored procedure (no
> rights to open tables or view from Customers).
> Regards,
> Grzegorz
> Ps. I had sent the post on microsoft.public.sqlserver.security, but I
> had no answer.

[SQL2000] permissions to use view based on tables from many databases

Hi

I have two databases: Customers and Operations. In Customers database I have
made a view based on a few tables from both Customers and Operations (left
join - customers without any operations). In the same database (Customers) I
have created a stored procedure based on the view. Finally I'd like to give
to some users permission only to exec the stored procedure.

Have I to add the users to Customers? If yes, please describe me how to
limit the users privileges only to execution the stored procedure (no rights
to open tables or view from Customers).

Regards,
Grzegorz

Ps. I had sent the post on microsoft.public.sqlserver.security, but I had no
answer.By default when you add a user they do not have any permissions to do
anything. So just make sure you don't add them to any of the server or
database roles. Then simply GRANT them execute permission on that sp.

--
Andrew J. Kelly SQL MVP

"Grzegorz Danowski" <gdn__na@.serwerze__poczta.onet.pl> wrote in message
news:dteimk$1b7$1@.inews.gazeta.pl...
> Hi
> I have two databases: Customers and Operations. In Customers database I
> have made a view based on a few tables from both Customers and Operations
> (left join - customers without any operations). In the same database
> (Customers) I have created a stored procedure based on the view. Finally
> I'd like to give to some users permission only to exec the stored
> procedure.
> Have I to add the users to Customers? If yes, please describe me how to
> limit the users privileges only to execution the stored procedure (no
> rights to open tables or view from Customers).
> Regards,
> Grzegorz
> Ps. I had sent the post on microsoft.public.sqlserver.security, but I had
> no answer.|||Well, it works fine in situations when all tables are in the same database,
but it doesn't work when tables are in two databases. If user have no rights
to read source table from other database SQL Server shows error:
"SELECT permission denied on object 'CustomersData', database 'Customers',
owner 'dbo'."

Grzegorz

Uytkownik "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> napisa w
wiadomoci news:%23Iia6cuNGHA.2336@.TK2MSFTNGP12.phx.gbl...
> By default when you add a user they do not have any permissions to do
> anything. So just make sure you don't add them to any of the server or
> database roles. Then simply GRANT them execute permission on that sp.
> --
> Andrew J. Kelly SQL MVP|||Are the objects owned by the same owner in both db's? If so you may have to
specify rights on the other tables. Is Cross database Ownership chaining
turned on?

http://support.microsoft.com/?kbid=810474

--
Andrew J. Kelly SQL MVP

"Grzegorz Danowski" <gdn__na@.serwerze__poczta.onet.pl> wrote in message
news:dtf589$5h3$1@.inews.gazeta.pl...
> Well, it works fine in situations when all tables are in the same
> database, but it doesn't work when tables are in two databases. If user
> have no rights to read source table from other database SQL Server shows
> error:
> "SELECT permission denied on object 'CustomersData', database 'Customers',
> owner 'dbo'."
> Grzegorz
>
> Uytkownik "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> napisa w
> wiadomoci news:%23Iia6cuNGHA.2336@.TK2MSFTNGP12.phx.gbl...
>> By default when you add a user they do not have any permissions to do
>> anything. So just make sure you don't add them to any of the server or
>> database roles. Then simply GRANT them execute permission on that sp.
>>
>> --
>> Andrew J. Kelly SQL MVP|||Thanks, it works.
Grzegorz

Uytkownik "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> napisa w
wiadomoci news:O07NN2uNGHA.2064@.TK2MSFTNGP09.phx.gbl...
> Are the objects owned by the same owner in both db's? If so you may have
> to specify rights on the other tables. Is Cross database Ownership
> chaining turned on?
> http://support.microsoft.com/?kbid=810474
> --
> Andrew J. Kelly SQL MVP
>
> "Grzegorz Danowski" <gdn__na@.serwerze__poczta.onet.pl> wrote in message
> news:dtf589$5h3$1@.inews.gazeta.pl...
>> Well, it works fine in situations when all tables are in the same
>> database, but it doesn't work when tables are in two databases. If user
>> have no rights to read source table from other database SQL Server shows
>> error:
>> "SELECT permission denied on object 'CustomersData', database
>> 'Customers', owner 'dbo'."
>>
>> Grzegorz
>>
>>
>> Uytkownik "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> napisa w
>> wiadomoci news:%23Iia6cuNGHA.2336@.TK2MSFTNGP12.phx.gbl...
>>> By default when you add a user they do not have any permissions to do
>>> anything. So just make sure you don't add them to any of the server or
>>> database roles. Then simply GRANT them execute permission on that sp.
>>>
>>> --
>>> Andrew J. Kelly SQL MVP
>>|||It is a in SQL that permission is check on the first called element i.e.
in case of stored procedure the there's a check made if the user has
the right to execute a procedure. Thus it's possiblie to allow a user to
execure a procedure and e.g. display a subset of data without allowing
to read tables content. Up to sp3 it was valid for the whole server.
From sp3 you've got to set cross-databse chaining explicitly.

Grzegorz Danowski wrote:
> Hi
> I have two databases: Customers and Operations. In Customers database I
> have made a view based on a few tables from both Customers and
> Operations (left join - customers without any operations). In the same
> database (Customers) I have created a stored procedure based on the
> view. Finally I'd like to give to some users permission only to exec the
> stored procedure.
> Have I to add the users to Customers? If yes, please describe me how to
> limit the users privileges only to execution the stored procedure (no
> rights to open tables or view from Customers).
> Regards,
> Grzegorz
> Ps. I had sent the post on microsoft.public.sqlserver.security, but I
> had no answer.

[SQL SERVER 2005] Copy data from one database to another on same server

Ok, here is my dilemma
I have an application that has many sites. Each site has it's own database. The databases have common tables (ie the name and fields are the same) What I want to be able to do is when creating a new database, I want to be able to copy certain common table data from one database to another. I have run into an error because the table have an IDENTITY so this is not working

INSERT INTO Containers SELECT * FROM ADMS2_Indian_Point.dbo.Containers

I also tried
USE ADMS2_RSCS
GO
SET IDENTITY_INSERT Containers ON
GO
INSERT INTO Containers SELECT * FROM ADMS2_Indian_Point.dbo.Containers
GO
SET IDENTITY_INSERT Containers OFF
GO

I got an error saying that I need to have a column list. I am trying to use this for any tables, so my question is this..
Is there any way to get around using a column list or is there a way to dynamically create the column list?
Or, Is there a better way that I should be doing this?

Please keep in mind I am not a dba and everything I have learned about SQL is from my good pal Google :)

Thanks for any helpWhy can't you just write out the column list?

using select * in anything but throw away code is a no-no.|||just write the column list as jezemine suggests
OR
use "select into" instead of "insert into". remember the table will be created fresh (should not already exists) and will be created without index etc.
OR
create necessary common tables with data, index everything in "model" database. every new database u create thereafter will have all those objects ready immediately after creation. no sql needed.|||If your server is dedicated to these databases, then I would suggest copying all of the objects and data that you need to the Model database. After that, every database you create will be a copy of model and will have everything you need.

Sunday, March 11, 2012

[QA] Run 1 query on multiple db's

Hello, could someone help me on this one.
Situation:
Multiple databases with same tables etc. (12 monthly archiving data db's).
In Query Analyzer, can I run 1 query same table on all my 12 db's which
would output 1 result?
Let say:
USE dbjanuari
select firstname from employees
where firstname = 'tom'
but instead dbjanuari, also dbfebruari, dbmarch etc.
Sorry for this 'noobly' question.
Rgds 2 all
T.SELECT firstname from dbjanuari.dbo.employees where firstname = 'tom'
UNION ALL
SELECT firstname from dbfebruari.dbo.employees where firstname = 'tom'
UNION ALL
SELECT firstname from dbmarch.dbo.employees where firstname = 'tom'|||"bert" <bertcord@.gmail.com> wrote in message
news:1107275120.849338.6340@.c13g2000cwb.googlegroups.com...
> SELECT firstname from dbjanuari.dbo.employees where firstname = 'tom'
> UNION ALL
> SELECT firstname from dbfebruari.dbo.employees where firstname = 'tom'
> UNION ALL
> SELECT firstname from dbmarch.dbo.employees where firstname = 'tom'
>
Ok, thank you Bert for helping me out!!
Rgds,
T.

[QA] Run 1 query on multiple db's

Hello, could someone help me on this one.
Situation:
Multiple databases with same tables etc. (12 monthly archiving data db's).
In Query Analyzer, can I run 1 query same table on all my 12 db's which
would output 1 result?
Let say:
USE dbjanuari
select firstname from employees
where firstname = 'tom'
but instead dbjanuari, also dbfebruari, dbmarch etc.
Sorry for this 'noobly' question.
Rgds 2 all
T.SELECT firstname from dbjanuari.dbo.employees where firstname = 'tom'
UNION ALL
SELECT firstname from dbfebruari.dbo.employees where firstname = 'tom'
UNION ALL
SELECT firstname from dbmarch.dbo.employees where firstname = 'tom'|||"bert" <bertcord@.gmail.com> wrote in message
news:1107275120.849338.6340@.c13g2000cwb.googlegroups.com...
> SELECT firstname from dbjanuari.dbo.employees where firstname = 'tom'
> UNION ALL
> SELECT firstname from dbfebruari.dbo.employees where firstname = 'tom'
> UNION ALL
> SELECT firstname from dbmarch.dbo.employees where firstname = 'tom'
>
Ok, thank you Bert for helping me out!!
Rgds,
T.

Thursday, March 8, 2012

[QA] Run 1 query on multiple db's

Hello, could someone help me on this one.
Situation:
Multiple databases with same tables etc. (12 monthly archiving data db's).
In Query Analyzer, can I run 1 query same table on all my 12 db's which
would output 1 result?
Let say:
USE dbjanuari
select firstname from employees
where firstname = 'tom'
but instead dbjanuari, also dbfebruari, dbmarch etc.
Sorry for this 'noobly' question.
Rgds 2 all
T.
SELECT firstname from dbjanuari.dbo.employees where firstname = 'tom'
UNION ALL
SELECT firstname from dbfebruari.dbo.employees where firstname = 'tom'
UNION ALL
SELECT firstname from dbmarch.dbo.employees where firstname = 'tom'
|||"bert" <bertcord@.gmail.com> wrote in message
news:1107275120.849338.6340@.c13g2000cwb.googlegrou ps.com...
> SELECT firstname from dbjanuari.dbo.employees where firstname = 'tom'
> UNION ALL
> SELECT firstname from dbfebruari.dbo.employees where firstname = 'tom'
> UNION ALL
> SELECT firstname from dbmarch.dbo.employees where firstname = 'tom'
>
Ok, thank you Bert for helping me out!!
Rgds,
T.

Saturday, February 25, 2012

[Microsoft] [ODBC SQL Server Driver] Timeout expired

Hi, Everyone,

I have a SQL 2000 cluster with sp4. I used SQL QUERY Analyzer to running DBCC CHECKDB for 2 of user’s databases (one is 110 GB and other 5 GB) and get the following message: [Microsoft] [ODBC SQL Server Driver] Timeout expired.I am running same DBCC CHECKDB against system databases or other small users’ databases are fine.

I can get resulted back from T-SQL (DBCC CHECKDB) against these 2 user databases and I checked sp_configure with other server, I can not find the difference.

Can someone help me out?

KT

Are you executing CHECKDB against 2 of those databases at the same time?

Also check event viewer and SQL error logs for any sort of slow performance with any of the hardware or components on this server.

Have you tried scheduling the same using a SQLagent job?

Have you applied or tested the sp4 hotfix?

|||

I ran dbcc checkdb agaist each database at each time. There has no information logon at even view and SQL log when I got time out message.

I haven't schedule this dbcc checkdb at SQL agent job yet.

I only applied hot fix -KB903086 and brought SQL server level to v8.00 2140.

|||ODBC Sql server drive Timeout expires error message getting when I connect to sql200 server data base with query analyzer

[Microsoft] [ODBC SQL Server Driver] Timeout expired

Hi, Everyone,

I have a SQL 2000 cluster with sp4. I used SQL QUERY Analyzer to running DBCC CHECKDB for 2 of user’s databases (one is 110 GB and other 5 GB) and get the following message: [Microsoft] [ODBC SQL Server Driver] Timeout expired.I am running same DBCC CHECKDB against system databases or other small users’ databases are fine.

I can get resulted back from T-SQL (DBCC CHECKDB) against these 2 user databases and I checked sp_configure with other server, I can not find the difference.

Can someone help me out?

KT

Are you executing CHECKDB against 2 of those databases at the same time?

Also check event viewer and SQL error logs for any sort of slow performance with any of the hardware or components on this server.

Have you tried scheduling the same using a SQLagent job?

Have you applied or tested the sp4 hotfix?

|||

I ran dbcc checkdb agaist each database at each time. There has no information logon at even view and SQL log when I got time out message.

I haven't schedule this dbcc checkdb at SQL agent job yet.

I only applied hot fix -KB903086 and brought SQL server level to v8.00 2140.

|||ODBC Sql server drive Timeout expires error message getting when I connect to sql200 server data base with query analyzer

[Match any Portion] - Possible in MSSQL?

I asked this question in the mysql forums, but I am also interested in any info regarding MSSQL. I've seen databases with search systems with the functionality I seek below. I just have no idea how they are doing it. Thank you.

We have an mysql inventory database. We want to be able to put in 4984.600 and choose "match any portion" and it finds 4984600 which is in our database.

Does Mysql have a "match any portion" search function? In this case LIKE didn't work which we tried already.

Any ideas? or are we stuck with using MSSQL. We know this will work with MSSQL.

Thank you very much. This is a huge problem for us.

JimHuh?

You want to match 44984600 to 4984.600? Are these strings or numeric data?

It makes no sense to match these "on any part". That is like saying you want to match "Betty" to "Rob", since they both contain the letter "B".

Perhaps you should explain more clearly, and include the code that you have tried.|||Hi there,

Here you can see in action what I am talking about.

First, go to this website http://www.bell-electrical.com. On the left side there is an "Inventory Search" section. Enter Part no. 4984.600 ( You don't have to enter a manufacturer, or check any radio boxes. ).

The website will now redirect to another website and display your result. It will contain the part number 4984600 without the decimal. That particular website is using an ASP script with an MSSQL backend. This is why I say it works with MSSQL. Whether it is the ASP script or something else using sql, I am not exactly sure, but they are doing something to make this work.

I am basically looking to implement something like this using php and mysql, but am unsure if it's possible. I have noticed that most big php scripts including vbulletin for example don't have this function either.

The particular company that is using this search system, is not known for custom programming. Rather they usually use basic asp and mssql systems. This also leads me to believe that it's probably not all that complex.

Any ideas on how they might be achieving this would be great. I have also heard that in MS Access there is actually some parameter that you can use to switch from a "Match" search to a "Match Portion" search. I am wondering if there is something like this in MSSQL as well.

Anyway, hopefully this reply will help everyone understand what I am trying to accomplish.

Thanks again for all the replies.|||I don't think you want to "match portion". It looks like you want to strip all non-numeric (or non-alphanumeric) characters from the string prior to doing your search. And then maybe use the LIKE operator to search as a substring of existing.

TSQL has a nice selection of character string manipulation functions you can use, depending upon the details of your situation. Lookup the REPLACE function, for instance.

Sunday, February 19, 2012

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

I installed the SQL SERVER , Oracleclient on my computer, and I can connect to remote SQL server,oracle databases using wizards , however when I try to run application iam getting this error.

Server Error in '/shiva/datagrd' Application.

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.OleDb.OleDbException: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Source Error:

Line 40: //SqlDataAdapter da=new SqlDataAdapter("select * from sms",con);
Line 41: DataSet ds=new DataSet();
Line 42: da.Fill(ds,"tab");
Line 43: DataGrid1.DataSource=ds.Tables[0].DefaultView;
Line 44: DataGrid1.DataBind();


Source File:e:\shiva\datagrd\webform1.aspx.cs Line:42

Stack Trace:

[OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
System.Data.OleDb.OleDbConnection.InitializeProvider()
System.Data.OleDb.OleDbConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
datagrd.WebForm1.Page_Load(Object sender, EventArgs e) in e:\shiva\datagrd\webform1.aspx.cs:42
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()



Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

please provide the solution.

What is your sql connection string in your web application?

|||

string strCon="Provider=SQLOLEDB.1;User ID=sa;Initial Catalog=Anjali;Data Source=MIPL0121;Persist Security Info=False"; //my connection string

and it is existing i am able to see the data through microsoft sql server --> enterprise manager

and i am able to get the data for my windows applications but not for web application why?

|||

You would have to use:

String strCon = "Server=MIPL0121;Database=Anjali;User ID=myuser;password=mypassword;"

|||

still problem is like that only

i think problem with some other one not with connection string

https://secure.experts-exchange.com/register.jsp?srid=m6c%2BKpauvxfudZgRmo%2Fm6A%3D%3D&rsid=20&viewQuestionRedirectURL=%2FDatabase%2FOracle%2FQ_20402341.html%3Fqid%3D20402341%26qid%3D20402341&submit=

my problem is exact as this


|||

Hi,

This is definately a security issue. In you connection string, you're using the Windows integrated authentication to connection to the server.

You can do this in the VS.NET because it is using your windows identity(Running under your account). However, the ASP.NET app is running under the ASPNET account, which doesn't have that previlege.

To resolve this, you can either give the ASPNET account proper permission to access the database, or use other accounts for accessing the database.

|||but i am able to get the data from remote server using same connection string in vs2005 but not in 2003 why?|||at the same time i am not able to get the data from ORACLE also and the connection string and code is perfectly executing on my neighbor system.|||at the same time i am not able to get the data from ORACLE also andthe connection string and code is perfectly executing on my neighborsystem with the same setting|||

Hi,

I'd like to know if you're connecting from VS.NET IDE using this connection string. Or you're using this connection string in your ASP.NET application.

Because in different scenarios, it holds different user credentials. Also, please check if you have used the correct OleDb driver to do the connection to SQL Server.

|||

ya i am using this connection string in asp.net application

but i tryied by using vs.net IDE(using Wizards) also its givng the same error when i am connecting throw wizards it is connecting and showing the database contents(mean if a select a tabe it

showing the discription of that table ) but when i am running the application it giving the above error

Saturday, February 11, 2012

@bitmap was not supplied to upd procedure in transactional

Initially when I had setup my transactional replication I had created it with
out taking a snapshot and by synching the databases.
Now I am trying to add new table to one of my existing publication in
production by creating scripts for ins, upd and del in test server and
deploying it to subscriber but it throws an error saying
"sp_MSupd_tablenameexpects parameter '@.bitmap', which was not supplied"
Inserts just work fine.
This is what i used to add-
exec sp_addarticle @.publication = 'Repl_Source'
, @.article = TableName
, @.source_table = TableName
, @.sync_object = null
exec sp_addsubscription @.publication = 'Repl_Source'
, @.article = TableName
, @.subscriber = SERVERNAME
, @.destination_db = 'Repl_Destination'
how many columns are in your table?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"SQL Replication Guy" <SQLReplicationGuy@.discussions.microsoft.com> wrote in
message news:AF5F5FE4-E43C-48C6-8FF9-9739C7C3DE62@.microsoft.com...
> Initially when I had setup my transactional replication I had created it
> with
> out taking a snapshot and by synching the databases.
> Now I am trying to add new table to one of my existing publication in
> production by creating scripts for ins, upd and del in test server and
> deploying it to subscriber but it throws an error saying
> "sp_MSupd_tablenameexpects parameter '@.bitmap', which was not supplied"
> Inserts just work fine.
> This is what i used to add-
> exec sp_addarticle @.publication = 'Repl_Source'
> , @.article = TableName
> , @.source_table = TableName
> , @.sync_object = null
> exec sp_addsubscription @.publication = 'Repl_Source'
> , @.article = TableName
> , @.subscriber = SERVERNAME
> , @.destination_db = 'Repl_Destination'
>
>
|||18 columns.
If I rememebr correctly I have tested same before a 6 months agao on
different table and i rememeber it working. Not sure what changed.
"Hilary Cotter" wrote:

> how many columns are in your table?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "SQL Replication Guy" <SQLReplicationGuy@.discussions.microsoft.com> wrote in
> message news:AF5F5FE4-E43C-48C6-8FF9-9739C7C3DE62@.microsoft.com...
>
>
|||Hi Hilary,
I think this is what thats happenening
- As I have scripted ins, upd and del scripts in dev environment by
generating them by running snapshot in transactional replication, those are
scripted with @.bitmap varaiable.
- Looks like the code I have used to add subscription
exec sp_addsubscription @.publication = 'Repl_Source'
, @.article = TableName
, @.subscriber = SERVERNAME
, @.destination_db = 'Repl_Destination'
is trying for ins, upd and del procs with no @.bitmap.
Instead of above code I have used
exec sp_addsubscription
@.publication = Repl_Source,
@.article = TableName,
@.subscriber = SERVERNAME,
@.destination_db = 'Repl_Destination',
@.sync_type = N'automatic',
@.subscription_type = N'pull',
@.update_mode = N'read only'
then when i made data changes it asked for snapshot to be execute dfirst and
it created sp's at destination with out bitmap
As all my other sp's were created during initial setup with bitmap i would
like them to be in sync . rather than some with bitmap variable and some with
out..
Any advise....
"SQL Replication Guy" wrote:
[vbcol=seagreen]
> 18 columns.
>
> If I rememebr correctly I have tested same before a 6 months agao on
> different table and i rememeber it working. Not sure what changed.
> "Hilary Cotter" wrote:
|||return to your publisher and in qa change to the publication database, then
recreate your replication procs by issuing a sp_scriptpublicationcustomprocs
'publicationName'
then copy what you find in the results pane, go to the subscriber, change to
the subscription database, and paste these results into qa and run them.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"SQL Replication Guy" <SQLReplicationGuy@.discussions.microsoft.com> wrote in
message news:C261558E-58A6-4810-A5E1-AB24439B9A9E@.microsoft.com...[vbcol=seagreen]
> Hi Hilary,
> I think this is what thats happenening
> - As I have scripted ins, upd and del scripts in dev environment by
> generating them by running snapshot in transactional replication, those
> are
> scripted with @.bitmap varaiable.
> - Looks like the code I have used to add subscription
> exec sp_addsubscription @.publication = 'Repl_Source'
> , @.article = TableName
> , @.subscriber = SERVERNAME
> , @.destination_db = 'Repl_Destination'
> is trying for ins, upd and del procs with no @.bitmap.
>
> Instead of above code I have used
> exec sp_addsubscription
> @.publication = Repl_Source,
> @.article = TableName,
> @.subscriber = SERVERNAME,
> @.destination_db = 'Repl_Destination',
> @.sync_type = N'automatic',
> @.subscription_type = N'pull',
> @.update_mode = N'read only'
> then when i made data changes it asked for snapshot to be execute dfirst
> and
> it created sp's at destination with out bitmap
>
> As all my other sp's were created during initial setup with bitmap i would
> like them to be in sync . rather than some with bitmap variable and some
> with
> out..
> Any advise....
>
> "SQL Replication Guy" wrote:
|||Hi Hilary,
I was trying several options soory could get to try your option but this
worked--
sp_addarticle
@.publication = 'Repl_Source',
@.article = 'TableName',
@.source_object = 'TableName',
@.destination_table = 'TableName',
@.ins_cmd = 'call sp_MSins_TableName,
@.del_cmd = 'call sp_MSdel_TableName',
@.upd_cmd = 'mcall sp_MSupd_TableName', -- MCALL CREATED bitmap in UPD sp
@.type = 'logbased',
@.pre_creation_cmd = 'drop',
@.status = 16,
@.source_owner = 'dbo',
@.vertical_partition = 'false',
@.filter = Null,
@.auto_identity_range = 'false'
and then
exec sp_addsubscription @.publication = 'Repl_Source'
, @.article = TableName
, @.subscriber = SERVERNAME
, @.destination_db = 'Repl_Destination'
"SQL Replication Guy" wrote:

> Initially when I had setup my transactional replication I had created it with
> out taking a snapshot and by synching the databases.
> Now I am trying to add new table to one of my existing publication in
> production by creating scripts for ins, upd and del in test server and
> deploying it to subscriber but it throws an error saying
> "sp_MSupd_tablenameexpects parameter '@.bitmap', which was not supplied"
> Inserts just work fine.
> This is what i used to add-
> exec sp_addarticle @.publication = 'Repl_Source'
> , @.article = TableName
> , @.source_table = TableName
> , @.sync_object = null
> exec sp_addsubscription @.publication = 'Repl_Source'
> , @.article = TableName
> , @.subscriber = SERVERNAME
> , @.destination_db = 'Repl_Destination'
>
>